I am working on RStudio and trying to analyze 16S sequencing data using the workflow found on this website: 16S rDNA amplicon sequencing analysis using R. What I am expecting to happen is that R will transform my raw DNA sequencing files and trim them using the cutadapt environment in qiime2 (all this is outlined in the link above). The files should then be saved to my computer in a folder I named "trimmed".
normalizePath(trimmed)
[1] "/home/cory/Documents/Rtrial"
When I try the workflow above, characters are appearing in my R environment as expected, and their values are the files I am expecting. For example, when I run the code below I am getting values in the fnFs.cut row in my environment that show a file path. However, these values are not actually saving to my actual "trimmed" folder.
fnFs = fns[grep("L001_R1_001.fastq.gz", fns)]
fnFs.cut = file.path(trimmed, basename(fnFs))
Values | |
---|---|
fnFs.cut | chr [1:37] trimmed/1_S8_L001_R1_001.fastq.gz ... |
But when I try to find the file outputs of fnFs.cut, I get this error:
normalizePath(fnFs.cut)
[1] "trimmed/1_S8_L001_R1_001.fastq.gz" ... There were 37 warnings (use warnings() to see them)
warnings()
Warning messages: 1: In normalizePath(fnFs.cut) : path[1]="trimmed/1_S8_L001_R1_001.fastq.gz": No such file or directory
My question is how would I save the "trimmed/1_S8_L001_R1_001.fastq.gz" file to my computer from my R environment?