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.
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?
• 1,675 views
•
link
1 answer
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.
• 0 views
•
link
• 0 views
•
link
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.
• 0 views
•
link
Thank you so much this was extremely helpful!
• 0 views
•
link
Log in to answer this question.