[Biopython] File format autodetection.

Ivan Gregoretti ivangreg at gmail.com
Tue Jun 24 16:16:11 UTC 2014


Hello Biopythoneers,

The question:

What is the strategy currently used for file format autodetection?


The context:

I have written a command line program that gets a stream of FASTQ data
and reports how many records are contained. You can visualise it like
this

zcat myfile.fq.gz | fxcounttags.py -i /dev/stdin -o /dev/stdout > myfile.counts

That works fine for FASTQ but I need to extend the functionality to
FASTA streams. How would you write fxcounttags.py to detect
FASTQ/FASTA?

Thank you,

Ivan



Ivan Gregoretti, PhD
Bioinformatics


More information about the Biopython mailing list