ABySS not finding the 'k' parameter for 'abyss-pe' in a for loop
1
0
Entering edit mode
9.8 years ago
ta2007 ▴ 50

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

assembly abyss • 3.3k views
ADD COMMENT
0
Entering edit mode
9.8 years ago
Shaun Jackman ▴ 420

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

ADD COMMENT
0
Entering edit mode

Hi Shaun,

Thank you for checking! Unfortunately, I'm still having problems so I posted the code/script on github. Below is the link. Thank you for your help!

Best,
Taruna

ADD REPLY
0
Entering edit mode

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
ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

Which shell are you using at the interactive command line: bash, zsh, csh?

ADD REPLY
0
Entering edit mode

We are using bash.

ADD REPLY
0
Entering edit mode

I really don't know what went wrong then. Sorry. I'm glad that you got it working, one way or another.

ADD REPLY
0
Entering edit mode

I'm glad it's working as well! Thank you for your help, Shaun!

ADD REPLY

Login before adding your answer.

Traffic: 1709 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