Thanks so much, I am trying to run this code, but for some reason it keeps saying their is no such directory as _1.fastq.gz and "gzip: can't stat: _2.fastq.gz (_2.fastq.gz.gz)". For my loop I had put
for i in trimmed_reads/*_1.fastq.gz
do ... what you said had in the code
my file names are named like: iPS-CTL-Chr_S1_1.fastq.gz iPS-CTL-Chr_S1_2.fastq.gz iPS-CTL-Nuc_S2_1.fastq.gz iPS-CTL-Nuc_S2_2.fastq.gz iPS-U4ATAC-Chr_S1_1.fastq.gz iPS-U4ATAC-Chr_S1_2.fastq.gz
etc.
Any suggestions on how to fix this error? Thank you so much for your help though, I am just starting to get used to coding and bioinformatics recently, so sorry if my question is very simple.