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
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
#!/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.
Why is this a
blogtype post? Please read: How to Use Biostars, Part II: Post types, Deleting, (Un)Subscribing, Linking and BookmarkingTried 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?
try to follow soapdenovo2 manual here: https://hcc-docs.unl.edu/display/HCCDOC/SOAPdenovo2. For paired end, you can create one single config file and submit it to cluster. Example script is furnished in the manual.