Question: .bam files to fastq including the unmapped reads
0
gravatar for galozs
3.5 years ago by
galozs20
galozs20 wrote:

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 alignment • 1.4k views
ADD COMMENTlink modified 3.5 years ago by igor8.8k • written 3.5 years ago by galozs20
4
gravatar for igor
3.5 years ago by
igor8.8k
United States
igor8.8k wrote:

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 COMMENTlink modified 3.5 years ago • written 3.5 years ago by igor8.8k

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 REPLYlink written 3.5 years ago by galozs20
1
gravatar for mastal511
3.5 years ago by
mastal5112.0k
mastal5112.0k wrote:

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 COMMENTlink written 3.5 years ago by mastal5112.0k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2209 users visited in the last hour