elsiklab / multivariantviewer

A JBrowse plugin with a custom variant track for multi-VCF files and optionally plotting LD scores
9 stars 0 forks source link

Mismatch between genotypes displayed by multivariantviewer and genotypes in the vcf file #15

Closed chcir closed 7 years ago

chcir commented 7 years ago

During a SNPs analysis, I made a jbrowse and used the plugin multivariant viewer to see graphically for the SNPs, the genotypes of the individuals tested. Unfortunately, the color assigned to the individuals very often mismatches with their genotype. MVV.docx

cmdcolin commented 7 years ago

Thanks for the detailed report in the word doc, I could try and check this out it does seem like there could be a bug

cmdcolin commented 7 years ago

So I checked this out and it is a weird issue but I think there is a there is a workaround!

Basically I would rename your samples to have, instead of just numbers for names, to have letters at the start

I made the altered version of your vcf with sample names A7, A8, A9, etc and updated the names in the trackList.json also and it appeared to fix the problem

#CHROM  POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  A10 A11 A12 A13 A7  A8  A9
REF_EUCGR_scaffold0001  19860575    .   T   C   2036.85 .   AC=5;AF=0.357;AN=14;BaseQRankSum=0.277;ClippingRankSum=-3.500e-01;DP=350;ExcessHet=2.1085;FS=0.000;MLEAC=5;MLEAF=0.357;MQ=60.95;MQRankSum=-5.210e-01;QD=12.12;ReadPosRankSum=0.984;SOR=0.702    GT:AD:DP:GQ:PL  0/0:45,0:45:99:0,99,1485    0/0:67,0:67:99:0,120,1800   0/0:69,0:69:99:0,120,1800   0/1:24,25:49:99:654,0,524   0/1:58,33:91:99:768,0,1528  1/1:0,13:13:39:463,39,0 0/1:8,7:15:99:179,0,226

Ideally there would be a code fix for this but I'm fairly sure that just renaming your samples like this would work as a workaround for now

capture d ecran 2017-08-22 a 12 57 53 pm

cmdcolin commented 7 years ago

Were you able to try out the workaround by chance?

cmdcolin commented 7 years ago

I pushed a more proper fix for this bug that you can try and test out now. You can pull the latest code from master branch on github or download the "0.9.0" release under the releases on github to try the fix.

Thanks again for reporting, this was a good catch.

cmdcolin commented 7 years ago

Ref 1c3790743721