Entering edit mode
4.0 years ago
screadore
▴
20
Can someone provide me insight into how to extract a specific region of a FastQ file to run BLAST on?
Can someone provide me insight into how to extract a specific region of a FastQ file to run BLAST on?
FASTQ files are not aligned, so extracting a specific region is not possible. Align first, then you can pull reads that aligned to specific regions.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Which file type should I be looking for? BAM? Then once I have a BAM or whichever file type how could I pull the specific region.
You can use
samtools view
to extract a specific region/chromosome etc from a sorted and indexed bam file:samtools view -o <out.bam> <in.bam> chr1:100-1000
# saves all alignments against chromosome 1 between 100-1000 bp positions.You can print or save the alignments to SAM format with
samtools view <out.bam> > <out.sam>
. You can visualize the alignments on IGV browser too.Thank you so much this was extremely helpful!