Hi,
I am sure this question was already asked, although I could not find any information, I am new to sequences processing and I would like to know if there is a way to merge fastq.gz files:
I have this set of files:
CACTCTGAGT_S7_L001_R1_001.fastq.gz CACTCTGAGT_S7_L001_R2_001.fastq.gz
CACTCTGAGT_S8_L001_R1_001.fastq.gz CACTCTGAGT_S8_L001_R2_001.fastq.gz
I have 33 files and I would like to merge the R1 and R2 files with a for loop or another way that is not in bash.
Thanks a lot!
for example, I am following the vsearch example pipeline:
however, i am new to the for loops so although I understand more or less the steps I cannot make it work with my data because I cannot make the for loop work.. maybe with the vsearch example I can explain better what I want to achieve with merging the pairs
Ah I see. Here VSEARCH is actually doing the read merging as described in point #1. You should be able to use this code as is.
You can try this to see what the loop is actually is doing (assuming VSEARCH can use gzipped files, I am not a VSEARCH user)
great thanks! at the end of the for loop should there be a done?
because I am running the script as it is i the terminal but it gets stuck.. Thanks again!
Use ctrl+c to kill the job. I simply copied what you had above. There was a
done
missing (and one more mistake). I corrected those. See if the new version above is better. This will just print all the command lines to screen.If all looks good then remove the word
echo
before$VESEARCH
to actually run the analysis.great thanks a lot for your help!