# How to use extractfeat?

I am working on a script on bash linux to get the CDS (coding sequence) of a gene using extractfeat by EMBOSS. It gives me the error: Warning: No sequences written to output file

I am unsure if my syntax is right, but this is what I have:

extractfeat inputFile outputFile -type CDS

• Hi, KA97, what is the error? If you can include it, this will help establish what the problem is. – Michael G. Jun 22 at 18:41
• @MichaelG. The error is : Warning: No sequences written to output file It produces a blank output file with no sequence in. – KA97 Jun 23 at 9:54

Perhaps,removing introns (if it is a higher eukaryote)

extractfeat tembl:x65921 -type CDS -join


It is difficult to know without knowing the gene.

BTW NCBI's Entrez "efetch" will do essentially the same thing, but its more complicated

• I tried that syntax with the -join at the end which didn't work either If it matters, I am currently testing it on a Histone H1 gene of C. elegans I'd prefer If I could get the CDS by processing the sequence file in my bash script. Since I'm using efetch to download the sequence anyway, I don't mind trying that out if it's not too complicated. – KA97 Jun 23 at 16:22
• Okay, the syntax you are using is correct, but you don't need to specify the output file – Michael G. Jun 23 at 19:45
• I managed to fix it. I was accidentally using FASTA format files instead of Genbank flat file format which seemed to be the problem. – KA97 Jun 24 at 16:06
• That's good: fasta format has no features for extractfeat to extract, so it would have no chance. The error trapping in the code is clearly absent and it might be worth reporting the bug to the Emboss team. – Michael G. Jun 24 at 16:46