Entering edit mode
2.9 years ago
116439372
•
0
I have a large number of samples that I need to assemble using metaspades. They are named as such;
CUH001T1_unclassified_unpaired_R1 and CUH001T1_unclassified_unpaired_R2
CUH002T2_unclassified_unpaired_R1 and CUH002T2_unclassified_unpaired_R2
..
..
The script I'm using for this is;
spades.py --meta --pe1-1 CUH002T2_unclassified_paired_R1.fastq --pe1-2 CUH002T2_unclassified_paired_R2.fastq -t 20 -m 400 -o ../metaspades/CUH002T2
Does anyone know how to write a loop for this? I'm sure its relatively easy but I'm very new to bioinformatics and can't figure it out.
Replace
/home/user
with appropriate directory path. Remove echo once you are okay with dummy runThis worked for me, thank you!
Try this. You'll need to point
MYPATH=
to wherever it is your data is stored (e.g.,/home/myname/metagenomics
). Then try running the entire command from the terminal. It should printspades.py <blah>
to the console, one line each for as many samples as you have. If everything looks fine, remove theecho
in there, and run it.I'm not sure for looping through your datasets is the most efficient way though. Are you working on a local workstation of some sort or a cluster?