I am trying to use the
adapter_filter() function in fastqCleaner to remove primer sequences, but can still find the primer sequences in the output after running the
adapter_filter() command. I am using sequences from this ENA entry (Project: PRJNA377530) and the following is using just the forward and reverse reads from the first sample with files SRR5314314_1.fastq.gz, and SRR5314314_1.fastq.gz as an example.
fwdRead <- readFastq("~/SRR5314314_1.fastq.gz") revRead <- readFastq("~/SRR5314314_2.fastq.gz") FWD <- "ACCTGCGGARGGATCA" REV <- "GAGATCCRTTGYTRAAAGTT" fwdFilt <- adapter_filter(fwdRead, Lpattern = FWD, anchored=TRUE, fixed = FALSE) refFilt <- adapter_filter(revRead, Lpattern = REV, anchored=TRUE, fixed = FALSE)
There is no error message, but the primer sequences do not get filtered from the reads