dalliance icon indicating copy to clipboard operation
dalliance copied to clipboard

When you add multiple Blob VCF sources, the same blob is displayed twice

Open danvk opened this issue 9 years ago • 1 comments

Here's what my sources array looks like:

var sources = [
    {
      name: 'Genome',
      twoBitURI: 'http://www.biodalliance.org/datasets/hg19.2bit',
      tier_type: 'sequence'
    },
    {
      name: 'VCF1',
      tier_type: 'memstore',
      payload: 'vcf',
      // uri: '/snv.vcf'
      blob: new Blob([vcfBytes1])
    },
    {
      name: 'VCF2',
      tier_type: 'memstore',
      payload: 'vcf',
      // uri: '/snv2.vcf'
      blob: new Blob([vcfBytes2])
    }
];

When I comment out the blob keys and uncomment the uri keys, I see the expected result: screen shot 2014-10-28 at 5 39 35 pm

But when I use blobs, I see the same thing twice: screen shot 2014-10-28 at 5 39 57 pm

I can verify that vcfBytes1 != vcfBytes2.

Full code here: https://gist.github.com/danvk/a3f63e266bb319c08ab9

danvk avatar Oct 28 '14 21:10 danvk

The Blob support is really expecting File objects, not generic blobs. Try setting the name property on your blobs to (different) strings and all should be well.

I'll tweak the caching code so that it doesn't assume blobs with no names are all the same!

On Tuesday, October 28, 2014, Dan Vanderkam [email protected] wrote:

Here's what my sources array looks like:

var sources = [ { name: 'Genome', twoBitURI: 'http://www.biodalliance.org/datasets/hg19.2bit', tier_type: 'sequence' }, { name: 'VCF1', tier_type: 'memstore', payload: 'vcf', // uri: '/snv.vcf' blob: new Blob([vcfBytes1]) }, { name: 'VCF2', tier_type: 'memstore', payload: 'vcf', // uri: '/snv2.vcf' blob: new Blob([vcfBytes2]) }];

When I comment out the blob keys and uncomment the uri keys, I see the expected result: [image: screen shot 2014-10-28 at 5 39 35 pm] https://cloud.githubusercontent.com/assets/98301/4817659/fd2673fc-5eea-11e4-9333-87117c6ad5b8.png

But when I use blobs, I see the same thing twice: [image: screen shot 2014-10-28 at 5 39 57 pm] https://cloud.githubusercontent.com/assets/98301/4817658/fd246ba2-5eea-11e4-9838-4e29ee3c6e2a.png

I can verify that vcfBytes1 != vcfBytes2.

Full code here: https://gist.github.com/danvk/a3f63e266bb319c08ab9

— Reply to this email directly or view it on GitHub https://github.com/dasmoth/dalliance/issues/125.

dasmoth avatar Oct 28 '14 22:10 dasmoth