1
$\begingroup$

I have created a Blast database using a reference genome. Then, I have performed a local blast search in command line using a gene of interest. I have obtained some hits with the usual Blasting information. Now, I want to extract the exact matching sequence from the blast search with their corresponding start and stop position. I have a .gff file for the genes as well for the reference genome. Can you give me any suggestions on how to do that? Thanks a lot.

$\endgroup$
1
  • $\begingroup$ Please edit your question and add an example of the relevant files so we can understand what you need. Do you have multiple HSPs you want to combine? Do you need to model splicing? If you already have the gff of the target sequence, why were you blasting? $\endgroup$
    – terdon
    Dec 11, 2021 at 16:52

2 Answers 2

0
$\begingroup$

FWIW, In the Sequenceserver BLAST software, you can just click on "download alignment" to extract the aligning region.

$\endgroup$
1
$\begingroup$

My usual approach for extracting sequence from a reference genome is to use samtools faidx:

# create genome index; slow; only do once per reference genome
samtools faidx reference_genome.fa
# extract sequence for a specific match
samtools faidx reference_genome.fa chromosome_name1:posStart1-posEnd1 > match1.fa
samtools faidx reference_genome.fa chromosome_name2:posStart2-posEnd2 > match2.fa

You haven't mentioned how many BLAST results you have, or what format they're in, so I'm not sure if it's practical to do this manually, or if it needs to be automated in some way.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.