This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to perform SOAPdenovo for many samples

Dear Friends,

I need a help. I have 30 paired end reads of 30 samples and I need to assemble it in a single go using SOAPdenovo with a single command. I have already done it one by one but I need a command to perform all the 30 read files at once.

Thank you Michael

assembly

Tried anything like looping, GNU parallel or the like?

Do you want a single assembly using all 30 samples as input? Or do you want 30 assemblies, but all running in parallel?

1 answer

#!/bin/bash

for i in `ls *.fastq`
        do
        soapdenovo2 <parameters> $i    &
done

You'll need to set up the config files for each separately though but try that. Otherwise try something like Abyss which doesn't need a config file.

ls *.fastq is not a good idea, it's better to use shell globs directly (for i in *.fastq). Also, why do a loop when you can:

ls *.fastq | parallel -I fastq_file soapdenovo2 <parameters> fastq_file

I’m not too familiar with SOAP, so I might be wrong, but as these are paired end reads, presumably there will need to be a step to pair up the R1 and R2 files before passing them to whatever syntax SOAP expects - i.e. before your loop.

Log in to answer this question.