gff3-ffetch segfaults
Closed this issue · 2 comments
wget ftp://ftp.wormbase.org/pub/wormbase/species/c_elegans/sequence/genomic/c_
elegans.WS232.genomic.fa.gz
wget ftp://ftp.wormbase.org/pub/wormbase/species/c_elegans/sequence/genomic/c_
elegans.WS232.genomic.fa.gz
gzip -d *.gz
gff3-ffetch mRNA c_elegans.WS232.annotations.gff3 c_elegans.WS232.genomic.fa
Segmentation fault
(one of Pjotr's links must be ftp://ftp.wormbase.org/pub/wormbase/species/c_elegans/gff/c_elegans.WS232.annotations.gff3.gz)
I think I've found where the issue comes from.
First, Pjotr did specify files in the wrong order, and gff3-ffetch didn't even notice whereas it clearly states in usage information that FASTA should come first. So what happens is the following:
- gff3-ffetch tries to get FASTA from the end of first file
- there's no FASTA at the end of the file, and
get_fasta_range()
returns null - however, if we look back at bio/gff3/conv/fasta.d, we see that the result is not checked for
null
, and propertyall
is accessed. Here's where the segfault is likely to occur. (I haven't checked, though.)
Thanks Artem, I'll fix that right away.