This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Extract R1 and R2 from sam file generated by bowtie2

Hi every one

How to extract R1 and R2 from sam file generated by bowtie2 ?

sam bowtie2 samtools bam

What do you mean by "extract R1 and R2"? Do you want to extract the paired mapped reads? In fasta or fastq format?

yes, I need spilt the sam file into R1 and R2 to make re- alignment

I recommend you to search a bit through biostars questions, since it has been asked before (Sam to fastq). There are many tools that can do this job, personally I use Picard SamToFastq ( see here), but there are many nice other alternatives such as bbmap.

1 answer

A combination of two tools can be used to achieve this: gatk PrintReads and picard RevertSam.

Log in to answer this question.