The error message you get suggests that bash cannot find any fastq files in your current directory, so I guess the first step would be to make sure that the fastq files are in the same directory from which you're running your script. Also make sure they're not actually .fastq.gz
If all the above is legit, you could also try this:
for file in ./*R1_001.fastq
do
FBASE=$(basename $file .fastq)
BASE=${FBASE%R1_001}
tophat -o /path/to/output/${BASE} -G /path/to/genes.gtf /path/to/index/genome ${BASE}R1_001.fastq ${BASE}R2_001.fastq
done
Can you show us example file names for one sample?
Sure, here's an example:
See if this helps
Thanks for the suggestion! Still get the same error though.
Curious about what OS/shell are you using?
can you just try
to see what it prints out and can you also try
to see whether the output from above matches the file names?
edit...I just realized that it piggy backs on Igor's answer :)
edit2...try also to use the whole path for your fastq files, i.e.: