I'm new to Bowtie2 and have been trying to run some simple alignments in Bowtie2. My current bash script looks like this:
index_path= '/path/to/index/hg19_bt2'
read_path_1= 'path/to/read1.fastq.gz'
read_path_2= '/path/to/read2.fastq.gz'
module load gcc/6.2.0
module load bowtie2/2.3.4.3
bowtie2 -x $index_path -1 $read_path_1 -2 $read_path_2 -S bowtie2_test.sam
However, it gives me these errors: 1. For my compressed fastq files:
"cannot execute binary file"
2. For my command line input:
"-S" does not exist or is not a Bowtie 2 index
I'm not sure what is wrong with my script because I followed the Bowtie2 manual.
I see, thank you. So I should have instead this?
Do you know why bowtie2 doesn't work with my -S flag to denote the output file?
Is that still not working after you fixed the variable assignment issue? Do you have permissions to write to the directory you are executing this script from? If you don't, then provide a different location in
-S /path_to/*.sam
in the command above.I will double check, but here is the list of errors I am recieving now:
You are using real/full paths to those files correct?
/path/to/index/
is just place holder and needs to be replaced with actual file paths on your server.Yes. And I do have write access, as I built a bowtie2 index in the same directory using another script.
Can you post the command you used to build the index? Is
hg19_bt2
basename for your index files?Your basename for the index is
hg19_ucsc
. So you should setindex_path='/path/to/index/hg19_ucsc'
This is not the same index that I used in the previous script. Previously, I used a premade script from some one else; here, I am just making my own separately.
Based on the information you provided above
hg19_ucsc
should be the basename for the index you built. Can you show us output ofdu -sh hg19_ucsc
or if that does not produce anything the a listing of directory where you think the index is present.Are you sure the index creation worked without any errors?