Greetings
I'm trying to utilize Bowtie2 to align multiple paired-end RAD reads into a reference genome. I am building my script based on the information provided by the Bowtie2 manual. However, I keep encountering a problem when using the -1
and -2
arguments to put the comma separated list of the input files.
I have a total of 30 files, thus a make a list
-1 file_1.1.fq,file2_1.fq,…,file_30.1.fq -2 file_1.2.fq,file_2.2.fq,…,file_30.2.fq
But when I run my script a get an error that:
"File name too long"
As a test, I tried running the same script, but utilized only 5 of the 30 samples to make sure there wasn't any more errors, but still get the same problems.
Here's my script:
module load bowtie2/2.1.0
REFindex=/directory/and/basename/of/ref/index
IN_DIR=/directory/containing/input/.fq/files
OUT_DIR=/directory/of/output/.sam/files
for input in $IN_DIR/*.fq
do
bowtie2 -p 16 -x $REFindex -1 <file_1.1.fq,file2_1.fq,…,file_30.1.fq> -2 <file_1.2.fq,file_2.2.fq,…,file_30.2.fq> $OUT_DIR/$(basename $input .fq).sam --sensitive
done
Other solutions online suggested utilizing a wildcard to obtain all the samples, but I am not sure what would be the correct procedure there.
Sorry to ask. I am pretty new doing all this computational work.
Thanks for all the help
Angel R.
If you need the
$IN_DIR
prefix for one of the samples, you'll need it for all of them.If I understood you correctly, this means that when I do the
$IN_DIR/$MATE1
the script only reads the very first file, in this casesample_1.1.fq
, right?Do you know a way in which they can all be read?
Thanks