I have 16S amplicon 80 fastq paired-end data files in 80 different folders but I want all to be in one folder for analysis. How can I do this through R?
I have 16S amplicon 80 fastq paired-end data files in 80 different folders but I want all to be in one folder for analysis. How can I do this through R?
Do you want to physically move them into a single folder? You should use command line, not R.
Are all folders in the same parent folder? You can make a vector of file paths very easily in R and load them in to R without moving them around.
In linux, use following command:
If your fastq format looks like: sample1_1.fastq.gz sampl1_2.fastq.gz; Folders containing these files are stored in ~/data/fq/sample1/ ~/data/fq/sample2/.
Then:
mv ~/data/fq/*/*.gz ~/data/
It will move all files with ".gz" surffix in each folder to ~/data/
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
so in place of DIR1, DIR2, and DIR3, I will write folder names? And in place of DESTDIR, I will write my new folder name.