Hi all, I am trying to map DNA sequences using bowtie2 for multiple paired fastq.gz files. I am using a "for loop" that worked well for my other scripts; however, this time it seems that bowtie2 does not recognize the directory paths for my files or index basename. I keep having this message "No index, query, or output file specified!". I downloaded the index files from the bowtie2 website (https://genome-idx.s3.amazonaws.com/bt/ARS-UCD1.2.zip), unzipped it, and checked with bowtie2-inspect (it works well). The *.bt2 files and my sequences are in the same INPUT_DIRECTORY. I do not know why I have that error about not finding the files. I would really appreciate any advice.
INPUT_DIRECTORY=/mnt/home/vascokar/mastitis_study/trimmed
module load GCC/9.3.0 Bowtie2/2.4.1 SAMtools/1.11
cd $INPUT_DIRECTORY
for f in *_R1_paired.fastq.gz
do
n=${f%%_R1_paired.fastq.gz}
bowtie2 –-threads 5 -x $INPUT_DIRECTORY/ARS-UCD1.2 -1 $INPUT_DIRECTORY/${n}_R1_paired.fastq.gz -2 $INPUT_DIRECTORY/${n}_R2_paired.fastq.gz -S $INPUT_DIRECTORY/${n}_R1_host_mapped_and_unmapped.sam
done
Can you show us the output of following command?