This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Tophat Error Message

When I run a tophat job script;

#!/bin/bash
#$ -N TH_3hrB1
#$ -o /mnt/scratch/users/40100371/Read_Files/Mlig/3hrB1.$JOB_ID

# send email when job begins end or aborts
#$ -M dwells01@qub.ac.uk -m bea

#$ -pe smp-verbose 10

#load tophat module environment
module load apps/tophat

# set working directory to scratch space project folder
#$ -wd /mnt/scratch/users/40100371/Read_Files/Mlig

# call tophat, define 10 threads, define genome basename, left reads, right reads, define annotation file
tophat -p 10 PRJNA284736 , 3hr_B1_1.fastq.gz 3hr_B1_2.fastq.gz , -G MligAnnos.gff3

I get the error;

   [2017-08-08 00:41:07] Beginning TopHat run (v2.1.0)
-----------------------------------------------

[2017-08-08 00:41:07] Checking for Bowtie
                  Bowtie version:        2.2.6.0
[2017-08-08 00:41:07] Checking for Bowtie index files (genome)..
[2017-08-08 00:41:07] Checking for reference FASTA file
[2017-08-08 00:41:07] Generating SAM header for PRJNA284736
Traceback (most recent call last):
  File "/opt/gridware/pkg/el6/apps/tophat/2.1.0/gcc-4.4.7+boost-1.58.0/bin/tophat", line 4095, in <module>
    sys.exit(main())
  File "/opt/gridware/pkg/el6/apps/tophat/2.1.0/gcc-4.4.7+boost-1.58.0/bin/tophat", line 3949, in main
    params.read_params = check_reads_format(params, reads_list)
  File "/opt/gridware/pkg/el6/apps/tophat/2.1.0/gcc-4.4.7+boost-1.58.0/bin/tophat", line 1844, in check_reads_format
    zf = ZReader(f_name, params)
  File "/opt/gridware/pkg/el6/apps/tophat/2.1.0/gcc-4.4.7+boost-1.58.0/bin/tophat", line 1797, in __init__
    self.file=open(filename)
IOError: [Errno 2] No such file or directory: ''

I've seen a few variations on this error in forums, but none of the solutions in those threads seem to fix this. Would anyone have any suggestions?

Thanks Duncan

tophat rna-seq

2 answers

From the Tophat2 manual:

Usage: tophat [options]* <genome_index_base> <reads1_1[,...,readsN_1]> [reads1_2,...readsN_2]

Your -G parameter should be with your -p flag at the beginning of the command, before the bowtie2 index. Additionally, commas should separate additional files such as unpaired reads. Your command should be along the lines of:

tophat -p 10 -G MligAnnos.gff3 PRJNA284736 3hr_B1_1.fastq.gz 3hr_B1_2.fastq.gz

(assuming that PRJNA284736 is the bowtie2 index prefix in the current directory)

Be aware that Tophat2 is deprecated / in low maintenance mode. I'd recommend STAR, however the intended replacement for Tophat2 is HISAT2.

tophat -p 10 -G MligAnnos.gff3 PRJNA284736 3hr_B1_1.fastq.gz 3hr_B1_2.fastq.gz

The most important thing is to remove the random commas.

Log in to answer this question.