Bowtie2 to map multiple fastq.gz files?
1
0
Entering edit mode
3.1 years ago

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
bowtie2 for loop • 2.1k views
ADD COMMENT
0
Entering edit mode

Can you show us the output of following command?

ls -lh /mnt/home/vascokar/mastitis_study/trimmed/ARS-UCD*
ADD REPLY
0
Entering edit mode
[vascokar@dev-intel16 scripts_toy]$ ls -lh /mnt/home/vascokar/mastitis_study/trimmed/ARS-UCD*
-rw-r----- 1 vascokar epi 868M Mar  5 13:59 /mnt/home/vascokar/mastitis_study/trimmed/ARS-UCD1.2.1.bt2
-rw-r----- 1 vascokar epi 648M Mar  5 13:59 /mnt/home/vascokar/mastitis_study/trimmed/ARS-UCD1.2.2.bt2
-rw-r----- 1 vascokar epi  23K Mar  5 13:59 /mnt/home/vascokar/mastitis_study/trimmed/ARS-UCD1.2.3.bt2
-rw-r----- 1 vascokar epi 648M Mar  5 13:59 /mnt/home/vascokar/mastitis_study/trimmed/ARS-UCD1.2.4.bt2
-rw-r----- 1 vascokar epi 868M Mar  5 13:59 /mnt/home/vascokar/mastitis_study/trimmed/ARS-UCD1.2.rev.1.bt2
-rw-r----- 1 vascokar epi 648M Mar  5 13:59 /mnt/home/vascokar/mastitis_study/trimmed/ARS-UCD1.2.rev.2.bt2
ADD REPLY
0
Entering edit mode
3.1 years ago

I found the problem. Instead of a hyphen "-" I had dashes "–" for my -2 and -S. Now it is working!

ADD COMMENT

Login before adding your answer.

Traffic: 2946 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6