Shovill batch assemblies
1
0
Entering edit mode
23 months ago
jellila • 0

Hi,

I am trying to write a bash for loop in order to assemble a group of illumina reads (R1 and R2) with shovill (by T. Seemann). I have activated the conda environment where the shovill package is installed and I have 'cd'ed to the folder where my reads are. I have tried to modify a loop I found here for Spades:

for file1 in *R1*fastq
do
    file2=${file1/R1/R2}
    out=${file1%%.fastq}_output
    shovill --R1 $file1 --R2 $file2 --outdir/Users/laura/Desktop/Pdd-Pdp/shovill --depth 0
done

but of course it doesn't work :(

Could someone help me please? Maybe also explaining how each command is used?

Thank you!
Laura

assembly shovill batch • 1.2k views
ADD COMMENT
1
Entering edit mode

I cleaned up your code a little.

Does your code have --outdir/Users/... or --outdir /Users/...? The space is important.

ADD REPLY
0
Entering edit mode

Right, that was silly of me, thank you! :) However, I think I also need to add some code to create a subdirectory in '/Users/laura/Desktop/Pdd-Pdp/shovill' for each assembly - ideally called with the same name of the input - because after the first assembly, I get the following error:

Folder '/Users/laura/Desktop/Pdd-Pdp/shovill' already exists. Try using --force

the flag --force would overwrite the content of the folder though.

ADD REPLY
1
Entering edit mode
23 months ago
Ram 36k

You're creating the out variable. Why not use it like so:

--outdir /Users/.../$out
ADD COMMENT
0
Entering edit mode

That's absolutely amazing!! Thank you very much!!

ADD REPLY
1
Entering edit mode

No problem - you almost had it, your code just needed a minor addition.

ADD REPLY

Login before adding your answer.

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