diff --git a/csq.c b/csq.c index c3fbb337..6cbaa5c9 100644 --- a/csq.c +++ b/csq.c @@ -1110,7 +1110,9 @@ fprintf(stderr,"splice_csq_del: %s>%s .. ex=%d,%d beg,end=%d,%d tbeg,tend=%d,% { if ( splice->check_donor && splice->tr->strand==STRAND_REV ) splice->csq |= CSQ_SPLICE_DONOR; if ( splice->check_acceptor && splice->tr->strand==STRAND_FWD ) splice->csq |= CSQ_SPLICE_ACCEPTOR; - if ( ref && alt && !strncmp(ref+N_SPLICE_REGION_INTRON-N_SPLICE_DONOR,alt+N_SPLICE_REGION_INTRON-N_SPLICE_DONOR,N_SPLICE_DONOR) ) splice->csq |= CSQ_SYNONYMOUS_VARIANT; + + int noff = N_SPLICE_REGION_INTRON - N_SPLICE_DONOR; + if ( ref && alt && noffkref.l && noffkalt.l && !strncmp(ref+noff,alt+noff,N_SPLICE_DONOR) ) splice->csq |= CSQ_SYNONYMOUS_VARIANT; } } } diff --git a/test/csq/ENSCAFT00000047742/test.txt b/test/csq/ENSCAFT00000047742/test.txt index 603cdbef..9f0258e2 100644 --- a/test/csq/ENSCAFT00000047742/test.txt +++ b/test/csq/ENSCAFT00000047742/test.txt @@ -1,3 +1,3 @@ -104 CA C synonymous&splice_acceptor&splice_donor|DUSP3|ENSCAFT00000047742|protein_coding -104 CA C synonymous&splice_acceptor&splice_donor|DUSP3|ENSCAFT00000047742|protein_coding +104 CA C splice_acceptor&splice_donor|DUSP3|ENSCAFT00000047742|protein_coding +104 CA C splice_acceptor&splice_donor|DUSP3|ENSCAFT00000047742|protein_coding diff --git a/test/csq/ENSCAFT00000047742/test.vcf b/test/csq/ENSCAFT00000047742/test.vcf index ff2493d4..188fc29f 100644 --- a/test/csq/ENSCAFT00000047742/test.vcf +++ b/test/csq/ENSCAFT00000047742/test.vcf @@ -4,4 +4,4 @@ ##INFO= ##INFO= #CHROM POS ID REF ALT QUAL FILTER INFO -chr9 104 . CA C . PASS EXP=synonymous&splice_acceptor&splice_donor|DUSP3|ENSCAFT00000047742|protein_coding +chr9 104 . CA C . PASS EXP=splice_acceptor&splice_donor|DUSP3|ENSCAFT00000047742|protein_coding