This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Tophat Error: Bam2Fastx Failed To Open Bam

I ran Tophat and near the end of the run it gave the following error:

[2012-09-28 15:51:58] Mapping left_kept_reads.m2g_um to genome mm9 with Bowtie 
[2012-09-28 16:08:04] Searching for junctions via segment mapping
[2012-09-28 16:12:27] Retrieving sequences for splices
[2012-09-28 16:14:34] Indexing splices
[2012-09-28 16:15:02] Mapping left_kept_reads.m2g_um_unmapped to genome segment_juncs with Bowtie (1/1)
open: No such file or directory
Error: bam2fastx failed to open BAM file /mydata/left_kept_reads.m2g_um_unmapped.bam
[2012-09-28 16:15:08] Processing bowtie hits
[2012-09-28 16:26:43] Reporting output tracks

It then warned that it couldn't remove all the temporary files. Any idea what might be happening? I have no idea what the "open: No such file or directory" error means. It must not be finding some files but I cannot tell which.

tophat rna-seq bowtie mapping

2 answers

Really sorry for hijacking this thread, but I am facing the exact same error. Tried using relative or fullpath for the output destination but without any change. This error is persistant. The only relevant log I think is this:

bowtie.left_kept_reads.m2g_um_unmapped.log

Warning: Could not find any reads in "-"

reads processed: 0

reads with at least one reported alignment: 0 (0.00%)

reads that failed to align: 0 (0.00%)

No alignments

Any ideas?

Thank you very much in advance

You have the answer in your post already. The very next line after "open: No such file or directory", tells you exactly which file is missing

Error: bam2fastx failed to open BAM file /mydata/leftkeptreads.m2gumunmapped.bam

Your file

leftkeptreads.m2gumunmapped.bam

is missing.

OK, but since this file is generated by Tophat and not by me, how can I detect why it is missing and how to fix it?

Tophat is trying to find this missing file in /mydata folder. Can you give the fullpath of the folder from where you are running Tophat? Are you on Unix or windows machine?

I am facing something similar. I will add it as a comment below.

Log in to answer this question.