spholmes / F1000_workflow

43 stars 33 forks source link

Problem with Trim and Filtering #1

Closed Fumm95 closed 7 years ago

Fumm95 commented 7 years ago

When I try to run the code:

for(i in seq_along(fnFs)) {
   fastqPairedFilter(c(fnFs[[i]], fnRs[[i]]),
                    c(fnFs[[i]], fnRs[[i]]),
                    trimLeft=10, truncLen=c(245, 160),
                    maxN=0, maxEE=2, truncQ=2,
                    compress=TRUE)
}

on my PC, I always get the error

Warning in file.remove(fout[[1]]) :
  cannot remove file 'C:/Users/Martina/Documents/Martina Stats Summer/StabilityNoMetaG/F3D0_S188_L001_R1_001.fastq.gz', reason 'Permission denied'
Error in fastqPairedFilter(c(fnFs[[i]], fnRs[[i]]), c(fnFs[[i]], fnRs[[i]]),  : 
  Failed to overwrite file:C:/Users/Martina/Documents/Martina Stats Summer/StabilityNoMetaG/F3D0_S188_L001_R1_001.fastq.gz

Consequently, it's not allowing me to trim and filter the sequences for future steps.

benjjneb commented 7 years ago

This is solved in the updated workflow. The problem here is that the filtered file is being written over the input fastq file (very bad practice that should not have been in the workflow) and windows is stopping you from doing that.

In the updated workflow, filtered files are written to their own directory.