This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Searching an assembly

Hello,

It seems like it would be a simple task, but I was wondering if there is any easy way to search for a particular contig that I know the name of in an assembly. The assembly file is too large to use a text editor to do a search and find. I also tried using the linux command nano to find contigs, and this works but it takes a very long time.

The reason I need the actual dna sequence for a contig is because I want to align this with the sequence from a blast sequence hit.

Thank you,
Zach

assembly

2 answers

samtools faidx assembly.fa
samtools faidx assembly.fa some_name

Alternately, with BBMap:

filterbyname.sh in=assembly.fa out=matched.fa names=some_name include=t

Log in to answer this question.