Hi,
I'm trying to run ABySS for different kmers using a for loop with PE, SE and MP reads. The MP R1 and R2 were trimmer using NxTrim which give me only one output file with all the MPs together. Below is the code that I'm running and the error message I'm getting. I did look into 'abyss-pe help' but still don't understand what the problem is. This for loop has worked in the past many times.
CODE:
for k in 61 63 65 67 69; do
mkdir trimk_pe_mp$k; \
abyss-pe -C trimk_pe_mp$k lib='pe200' mp='mp1' np=8 name=gm5_abyss_pe_mp$k \
k=$k n=5 \
pe200='gm5_k21corr_trim.Phred2_1P.fastq gm5_k21corr_trim.Phred2_2P.fastq' \
mp1='gm5_mpreads.mp.fastq' \
se='gm5_k21corr_trim.Phred2_1U.fastq /gm5_k21corr_trim.Phred2_2U.fastq'
done
ERROR MESSAGE:
make: Entering directory `/fungi/taruna/geosmithia/assembly/gm5/abyss/trimk_pe_mp61'
abyss-pe: missing parameter `k`
Try `abyss-pe help` for more information.
make: *** [error] Error 1
make: Leaving directory `/fungi/taruna/geosmithia/assembly/gm5/abyss/trimk_pe_mp61'
Please advice. Thank you!
-Taruna
1 answer
I copied and pasted your script exactly, and it worked for me. I can only guess that it'll be some odd white space issue. Check for spaces after the backslashes. If you still have trouble, can you upload the shell script to gist.github.com?
Cheers,
Shaun
Hi, Taruna. Your script works for me. Can you try running the following two command in an empty directory and report the result? Which version of ABySS are you using?
Cheers,
Shaun
❯❯❯ curl -o for-k.sh https://gist.githubusercontent.com/tarunaaggarwal/a6171fb0dc1218b2e7e2/raw/dcc835bf4c90717b5d21fb92d347449e7ff080f4/How%20to%20run%20ABySS%20using%20a%20for%20loop%20with%20PE,%20SE%20and%20MP%20reads
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 495 100 495 0 0 1350 0 --:--:-- --:--:-- --:--:-- 1352
❯❯❯ bash -x for-k.sh 2>&1 |head
+ for k in 61 63 65 67 69
+ mkdir trimk_pe_mp61
mkdir: trimk_pe_mp61: File exists
+ abyss-pe -C trimk_pe_mp61 lib=pe100 mp=mp1 np=8 name=gm5_abyss_pe_mp61 k=61 n=5 'pe100=/fungi/taruna/geosmithia/trim/gm5/gm5_k21corr_trim.Phred2_1P.fastq /fungi/taruna/geosmithia/trim/gm5/gm5_k21corr_trim.Phred2_2P.fastq' mp1=/fungi/taruna/geosmithia/trim/gm5/gm5_mpreads.mp.fastq 'se=/fungi/taruna/geosmithia/trim/gm5/gm5_k21corr_trim.Phred2_1U.fastq /fungi/taruna/geosmithia/trim/gm5/gm5_k21corr_trim.Phred2_2U.fastq'
/usr/local/bin/mpirun -np 8 ABYSS-P -k61 -q3 --coverage-hist=coverage.hist -s gm5_abyss_pe_mp61-bubbles.fa -o gm5_abyss_pe_mp61-1.fa /fungi/taruna/geosmithia/trim/gm5/gm5_k21corr_trim.Phred2_1P.fastq /fungi/taruna/geosmithia/trim/gm5/gm5_k21corr_trim.Phred2_2P.fastq /fungi/taruna/geosmithia/trim/gm5/gm5_k21corr_trim.Phred2_1U.fastq /fungi/taruna/geosmithia/trim/gm5/gm5_k21corr_trim.Phred2_2U.fastq
ABySS 1.5.2
ABYSS-P -k61 -q3 --coverage-hist=coverage.hist -s gm5_abyss_pe_mp61-bubbles.fa -o gm5_abyss_pe_mp61-1.fa /fungi/taruna/geosmithia/trim/gm5/gm5_k21corr_trim.Phred2_1P.fastq /fungi/taruna/geosmithia/trim/gm5/gm5_k21corr_trim.Phred2_2P.fastq /fungi/taruna/geosmithia/trim/gm5/gm5_k21corr_trim.Phred2_1U.fastq /fungi/taruna/geosmithia/trim/gm5/gm5_k21corr_trim.Phred2_2U.fastq
Running on 8 processors
0: Running on host pshen01-imac.phage.bcgsc.ca
4: Running on host pshen01-imac.phage.bcgsc.ca
It works! Executing the sh script to run ABySS did the trick. Thank you so much Shaun! Do you know what the issue was? I'm just wondering what I was doing wrong this whole time. Thank you for your help!
-Taruna
Which shell are you using at the interactive command line: bash, zsh, csh?
Log in to answer this question.