.bam files to fastq including the unmapped reads
2
0
Entering edit mode
8.5 years ago
galozs ▴ 20

Hello,

I have tophat output (.bam) generated by tophat and I want to convert them back to fastq files. Since it was mapped using tophat, I thought that the best tool to do that will be: bam2fastx. Though, I want to refer both the mapped reads (tophat output: accepted_hits.bam) and the unmapped ones (tophat output: unmapped.bam). How can it be done?

Thanks!!

RNA-Seq rna-seq alignment • 2.8k views
ADD COMMENT
4
Entering edit mode
8.5 years ago
igor 13k

You can convert accepted_hits.bam and unmapped.bam separately and then just merge the two FASTQs. It's just a text file, so the order does not matter.

ADD COMMENT
0
Entering edit mode

If I only use the accepted reads (and afterwards turn it again to bam during the analysis) I can loose some information right? I wonder why there is no feature for doing this step backwards without loosing information...

ADD REPLY
1
Entering edit mode
8.5 years ago
mastal511 ★ 2.1k

Try bedtools bamtofastq. I have recently used this with single end reads from RNA-Seq, so not sure how well it works if you have paired-end reads.

ADD COMMENT

Login before adding your answer.

Traffic: 2314 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6