This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How can I extract upstream regions in fasta for all blastx hits locally performed on nr database?

I have performed blastx on a fasta file. I am trying to extract out the upstream region in fasta for all blastx hits.

I will be grateful to you if you can show me how to parse blastx output to get the final fasta file with only upstream regions.

fasta nr blastx upstream region

2 answers

saving in outfmt6, converting to gtf/bed, and getting upstream sequences with bedtools or bedops.

Thank you. This worked for me

You can use the blastdbcmd command to extract sequences (or ranges of it) directly from the blastDBs. Using the tabular blast output (as shenwei356 mentioned as well) will make this more easy.

Thank you for your answer lieven.sterck

Log in to answer this question.