Skip to content

Commit

Permalink
Stop printing protein sequence with start_lost events
Browse files Browse the repository at this point in the history
Remove an unnecessary assert. Fixes samtools#1025 (comment)
  • Loading branch information
pd3 committed Jun 6, 2019
1 parent 2db4c0b commit bb5eedf
Show file tree
Hide file tree
Showing 10 changed files with 668 additions and 9 deletions.
5 changes: 1 addition & 4 deletions csq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1826,9 +1826,6 @@ int shifted_del_synonymous(args_t *args, splice_t *splice, uint32_t ex_beg, uint
int32_t vcf_block_beg = splice->vcf.pos + ref_len - 2*ndel; // the position of the first base of the ref block that could potentially replace the deletion
if ( vcf_block_beg < 0 ) return 0;

if ( !(vcf_block_beg < ex_beg) ) fprintf(stderr,"vcf_pos=%d ref_len=%d ndel=%d .. vcf_block_beg=%d ?< ex_beg=%d\n",splice->vcf.pos,ref_len,ndel,vcf_block_beg,ex_beg);
assert( vcf_block_beg < ex_beg );

#if XDBG
fprintf(stderr,"vcf_block_beg: %d\n",vcf_block_beg+1);
#endif
Expand Down Expand Up @@ -2185,7 +2182,7 @@ fprintf(stderr,"cds splice_csq: %d [%s][%s] .. beg,end=%d %d, ret=%d, csq=%d\n\n
#endif

if ( ret==SPLICE_VAR_REF ) return 2; // not a variant, eg REF=CA ALT=CA
if ( ret==SPLICE_OUTSIDE || ret==SPLICE_OVERLAP ) // not a coding csq
if ( ret==SPLICE_OUTSIDE || ret==SPLICE_OVERLAP || splice.csq==CSQ_START_LOST ) // not a coding csq
{
free(splice.kref.s);
free(splice.kalt.s);
Expand Down
635 changes: 635 additions & 0 deletions test/csq/ENST00000230048/ENST00000230048.fa

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions test/csq/ENST00000230048/ENST00000230048.fa.fai
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6 38016 23 60 61
8 changes: 8 additions & 0 deletions test/csq/ENST00000230048/ENST00000230048.gff
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
6 ensembl_havana gene -15 38015 . + . ID=gene:ENSG00000112304;Name=ACOT13;biotype=protein_coding;description=acyl-CoA thioesterase 13 [Source:HGNC Symbol%3BAcc:20999];gene_id=ENSG00000112304;logic_name=ensembl_havana_gene;version=6
6 ensembl_havana transcript 21 37996 . + . ID=transcript:ENST00000230048;Parent=gene:ENSG00000112304;Name=ACOT13-001;biotype=protein_coding;ccdsid=CCDS4558.1;havana_transcript=OTTHUMT00000040010;havana_version=2;tag=basic;transcript_id=ENST00000230048;version=4
6 ensembl_havana exon 21 294 . + . Parent=transcript:ENST00000230048;Name=ENSE00001174688;constitutive=0;ensembl_end_phase=0;ensembl_phase=-1;exon_id=ENSE00001174688;rank=1;version=3
6 ensembl_havana CDS 214 294 . + 0 ID=CDS:ENSP00000230048;Parent=transcript:ENST00000230048;protein_id=ENSP00000230048
6 ensembl_havana exon 30833 31017 . + . Parent=transcript:ENST00000230048;Name=ENSE00003657839;constitutive=0;ensembl_end_phase=2;ensembl_phase=0;exon_id=ENSE00003657839;rank=2;version=1
6 ensembl_havana CDS 30833 31017 . + 0 ID=CDS:ENSP00000230048;Parent=transcript:ENST00000230048;protein_id=ENSP00000230048
6 ensembl_havana CDS 34409 34565 . + 1 ID=CDS:ENSP00000230048;Parent=transcript:ENST00000230048;protein_id=ENSP00000230048
6 ensembl_havana exon 34409 37996 . + . Parent=transcript:ENST00000230048;Name=ENSE00003680711;constitutive=0;ensembl_end_phase=-1;ensembl_phase=2;exon_id=ENSE00003680711;rank=3;version=2
8 changes: 8 additions & 0 deletions test/csq/ENST00000230048/ascii-art.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

6:214 AT A

....eeeeeee
CACGATGACCA
CACGA-GACCA


3 changes: 3 additions & 0 deletions test/csq/ENST00000230048/start-del.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
214 AT A start_lost|ACOT13|ENST00000230048|protein_coding|+
214 AT A start_lost|ACOT13|ENST00000230048|protein_coding|+

7 changes: 7 additions & 0 deletions test/csq/ENST00000230048/start-del.vcf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
##fileformat=VCFv4.2
##contig=<ID=6,length=249250621>
##INFO=<ID=type,Number=.,Type=String,Description="">
##INFO=<ID=EXP,Number=1,Type=String,Description="Expected consequence">
##INFO=<ID=EXPL,Number=1,Type=String,Description="Expected consequence with bt/csq -l">
#CHROM POS ID REF ALT QUAL FILTER INFO
6 214 . AT A . . type=ENST00000230048:24667492-AT-A;EXP=start_lost|ACOT13|ENST00000230048|protein_coding|+
4 changes: 2 additions & 2 deletions test/csq/ENST00000318249/start-lost.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
4959 GA G frameshift&start_lost|NBPF3|ENST00000318249|protein_coding|+|1M>1?|4959GA>G
4959 GA G frameshift&start_lost|NBPF3|ENST00000318249|protein_coding|+|1M>1?|4959GA>G
4959 GA G start_lost|NBPF3|ENST00000318249|protein_coding|+
4959 GA G start_lost|NBPF3|ENST00000318249|protein_coding|+

4 changes: 2 additions & 2 deletions test/csq/ENST00000318249/start-lost.txt-l
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
4959 GA G frameshift&start_lost|NBPF3|ENST00000318249|protein_coding|+|1M>1?|4959GA>G
4959 GA G frameshift&start_lost|NBPF3|ENST00000318249|protein_coding|+|1M>1?|4959GA>G
4959 GA G start_lost|NBPF3|ENST00000318249|protein_coding|+
4959 GA G start_lost|NBPF3|ENST00000318249|protein_coding|+

2 changes: 1 addition & 1 deletion test/csq/ENST00000318249/start-lost.vcf
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
##INFO=<ID=type,Number=.,Type=String,Description="">
##INFO=<ID=EXP,Number=1,Type=String,Description="Expected consequence">
#CHROM POS ID REF ALT QUAL FILTER INFO
1 4959 . GA G . . EXP=frameshift&start_lost|NBPF3|ENST00000318249|protein_coding|+|1M>1?|4959GA>G;type=ENST00000318249:21771579-GA-G
1 4959 . GA G . . EXP=start_lost|NBPF3|ENST00000318249|protein_coding|+;type=ENST00000318249:21771579-GA-G

0 comments on commit bb5eedf

Please sign in to comment.