This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Shovill batch assemblies

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

I cleaned up your code a little.

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

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.

1 answer

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

--outdir /Users/.../$out

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

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

Log in to answer this question.