Hello everyone.
I'm now running tophat in our server. First, I just simply tried "tophat -p 8 -G <gtf_file> <ref_genome> <fa1><fa2>"
and it worked. Then I wrote a for loop scripts but It reported error:
[2019-04-03 10:49:16] Beginning TopHat run (v2.1.0)
-----------------------------------------------
[2019-04-03 10:49:16] Checking for Bowtie
Bowtie version: 2.2.9.0
[2019-04-03 10:49:16] Checking for Bowtie index files (genome)..
[2019-04-03 10:49:16] Checking for reference FASTA file
Warning: Could not find FASTA file mouse/bowtie2_index_mouse/mouse_ref.fa
[2019-04-03 10:49:16] Reconstituting reference FASTA file from Bowtie index
Executing: /opt/sw/packages/gcc-4.8/bowtie2/2.2.9/bin/bowtie2-inspect
mouse/bowtie2_index_mouse/mouse_ref > ./tophat_out/tmp/mouse_ref.fa
[2019-04-03 10:51:05] Generating SAM header for mouse/bowtie2_index_mouse/mouse_ref
Traceback (most recent call last):
File "/opt/sw/packages/gcc-4.8.3/mvapich2-2.1/boost-1.59.0/tophat2/2.1.0/bin/tophat", line 4095, in <module>
sys.exit(main())
File "/opt/sw/packages/gcc-4.8.3/mvapich2-2.1/boost-1.59.0/tophat2/2.1.0/bin/tophat", line 3949, in main
params.read_params = check_reads_format(params, reads_list)
File "/opt/sw/packages/gcc-4.8.3/mvapich2-2.1/boost-1.59.0/tophat2/2.1.0/bin/tophat", line 1844, in check_reads_format
zf = ZReader(f_name, params)
File "/opt/sw/packages/gcc-4.8.3/mvapich2-2.1/boost-1.59.0/tophat2/2.1.0/bin/tophat", line 1797, in __init__
self.file=open(filename)
IOError: [Errno 2] No such file or directory: '-o'
My for loop code is shown as below:
for name1 in R1/*_R1_001.fastq.trimmed_val.fq;
do
name2="R2/$(basename "$name1" _R1_001.fastq.trimmed_val.fq)_R2_001.fastq.trimmed_val.fq";
if [ ! -f "$name2" ]; then printf 'Missing "%s"\n' "$name2";
continue;
fi;
tophat -p 8 mouse/bowtie2_index_mouse/mouse_ref -o tophat_out/ -G mouse/ensembl_gtf/Mus_musculus.GRCm38.95.chr_patch_hapl_scaff.gtf $name1 $name2;
done
It looks like the directory path problem but I have changed the path several times it still report this error. I wonder if anyone could help me about this?
Thank you!
You should probably not be using tophat! See this tweet from Lior Pachter one of the inventors of tophat. Use HISAT or STAR instead.
Does the
tophat_out
directory already exist before you run the program?Can you share one file name belonging to the same sample from R1 and R2 directory?