This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to use extractfeat to get coding sequences?

Hi,

I am trying to get the CDS of a sequence using extractfeat on bash linux. 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
emboss extractfeat sequence linux bash

What is the input data format? Can you show a snippet of the input data?

Check if you have CDS under FEATURES (assuming inputFile is in GenBank Flat File Format), for example:

......
FEATURES             Location/Qualifiers
     source          1..2016
                     /organism="Homo sapiens"
                     /mol_type="genomic DNA"
                     /db_xref="taxon:9606"
                     /clone="15.1"
                     /clone_lib="CML cosmid"
     gene            408..>1912
                     /gene="fau 1"
     mRNA            join(408..504,774..856,951..1095,1557..1612,1787..>1912)
                     /gene="fau 1"
     exon            408..504
                     /gene="fau 1"
                     /number=1
     intron          505..773
                     /gene="fau 1"
                     /number=1
     exon            774..856
                     /gene="fau 1"
                     /number=2
     CDS             join(782..856,951..1095,1557..1612,1787..1912)
                     /gene="fau 1"
                     /codon_start=1
                     /protein_id="CAA46714.1"
                     /db_xref="GDB:135476"
                     /db_xref="GOA:P35544"
                     /db_xref="GOA:P62861"
                     /db_xref="HGNC:HGNC:3597"
                     /db_xref="InterPro:IPR000626"
                     /db_xref="InterPro:IPR006846"
                     /db_xref="InterPro:IPR019954"
                     /db_xref="InterPro:IPR019955"
                     /db_xref="InterPro:IPR019956"
                     /db_xref="UniProtKB/Swiss-Prot:P35544"
                     /db_xref="UniProtKB/Swiss-Prot:P62861"
                     /translation="MQLFVRAQELHTFEVTGQETVAQIKAHVASLEGIAPEDQVVLLA
                     GAPLEDEATLGQCGVEALTTLEVAGRMLGGKVHGSLARAGKVRGQTPKVAKQEKKKKK
                     TGRAKRRMQYNRRFVNVVPTFGKKKGPNANS"
......

Additionally, if you want the whole CDS, try adding -join after -type CDS.

1 answer

I managed to fix it. I was accidentally using FASTA formatted files instead of Genbank flat file format which was a problem.

Log in to answer this question.