You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a BAM file that was created with BWA, 0.7.10 that contains MD tags, but the JBRowse 1.11.4 we have does not seem to show the bases in most cases. The reads has a MD tag (See second screenshot) and you can also see on the right side of the first screenshot that SOME reads DO show the mismatch...
Why does my read show a grey box?
NOTE: The read that is showing the SNP is in a read that is a supplementary read...Could that be the reason it does not render the read correctly?
The text was updated successfully, but these errors were encountered:
Would you be able to export a small snippet of the BAM data with samtools view for testing? The sample data that's part of jbrowse doesn't appear to have supplementary alignments.
Thanks for sharing this. From what I can tell, JBrowse is using both the CIGAR and the MD string to call SNPs. To do so, it does some arithmatic on getTemplateCoord, but I think this arithmetic is doing the wrong thing in the case of hard clipping because in the case of hard clipping, the bases are actually removed from the template!
Proposed patch:
diff --git a/src/JBrowse/Store/SeqFeature/_MismatchesMixin.js b/src/JBrowse/Store/SeqFeature/_MismatchesMixin.js
index 72968a0..b59e54e 100644
--- a/src/JBrowse/Store/SeqFeature/_MismatchesMixin.js
+++ b/src/JBrowse/Store/SeqFeature/_MismatchesMixin.js
@@ -126,7 +126,7 @@ return declare( null, {
for( var i = 0; i < cigarOps.length && refOffset <= refCoord ; i++ ) {
var op = cigarOps[i][0];
var len = cigarOps[i][1];
- if( op == 'H' || op == 'S' || op == 'I' ) {
+ if( op == 'S' || op == 'I' ) {
templateOffset += len;
}
else if( op == 'D' || op == 'N' || op == 'P' ) {
I have a BAM file that was created with BWA, 0.7.10 that contains MD tags, but the JBRowse 1.11.4 we have does not seem to show the bases in most cases. The reads has a MD tag (See second screenshot) and you can also see on the right side of the first screenshot that SOME reads DO show the mismatch...
Why does my read show a grey box?
NOTE: The read that is showing the SNP is in a read that is a supplementary read...Could that be the reason it does not render the read correctly?
The text was updated successfully, but these errors were encountered: