Hi guys
I am looking for a tool that is able to automatically detect and validate type of a file.
More specifically I am interested for detecting between SAM, BAM, FASTA, FASTQ (if possible discriminating between these types), BED, BED12, BED15, GFF, GFF2, GFF3.
The detection should be performed without just looking at the extension of the file....
Is there an easy way to accomplish something like this?
Thank you in advance
best way would be to build a magic database for `file`: http://linux.die.net/man/5/magic http://linux.die.net/man/1/file . But IMHO, I've always find 'magic' too complicated.
asked on SE: http://unix.stackexchange.com/questions/154001