This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Save SeqFeature to .fasta fle for blast search

Hello community,

I am wondering if it is possible to add SeqFeature from BioPython library directly to .fasta file? I need it because when I going to launch blast search on the local database created from some fasta sequences, I would like to exclude some sequences from search based on the condition in SeqFeature annotation (for example if sequence corresponds to cDNA).

If it is not possible, what kind of alternative could be used?

biopython blast seqfeature

1 answer

You can add whatever you want to a description line because there is no set format.
As an example, I have a script here called add_source_organism_info_to_FASTA.py that adds the organism information in brackets to the end of a description/header line if it isn't there. It uses the GI number to look up the Genbank entry and get the information from there and so it has to have that or it fails. Because it needs some information already there and there isn't a set format in FAST header/description lines, it isn't universal. And, right now it is using for accession a tag that is being phased out and so needs updating to rectify that. However, as an example of adding things the the description line, it is valid.

gi numbers are deprecated for end users by NCBI, so it would be best to use accession numbers if possible.

Log in to answer this question.