View source: R/dada_wrappers.R
trimPrimers16S | R Documentation |
Trims primers from 16S sequences using filterAndTrim
.
This function assumes that each read begins with its full primer sequence
and operates by truncating the beginning of each read by the length of its
primer sequence.
trimPrimers16S(
fn,
in_subdir,
out_subdir,
meta,
in_explicitdir = NULL,
out_explicitdir = NULL,
primer_16S_fwd = "CCTACGGGNBGCASCAG",
primer_16S_rev = "GACTACNVGGGTATCTAATCC",
multithread = FALSE
)
fn |
Base names of input fastq files. If inputs are not base names (i.e. if they include directory paths), the directory paths will be removed. Files that do not exist will be ignored; however, if all files do not exist, this function will issue a warning. |
in_subdir |
Subdirectory name from which to retrieve input fastq files. Enter "raw" for raw sequence files, or any other character string to specify a subdirectory within |
out_subdir |
Subdirectory name where output fastq files will be written. Enter any character string to specify a subdirectory within |
meta |
The output of |
in_explicitdir , out_explicitdir |
Directory names to use instead of 'in_subdir' and 'out_subdir', if static directory names or directories outside of |
primer_16S_fwd , primer_16S_rev |
DNA sequences of 16S forward and reverse primer, respectively |
multithread |
Default FALSE. Whether to use multithreading. Note that Windows does not support multithreading in this function because it uses mclapply, so this argument must be set to FALSE on Windows systems. |
(Invisibly) Integer matrix denoting the number of reads remaining after primer-trimming for each input file.
## Not run:
fl_nm <- c("BMI_Plate37WellA12_16S_BJ8RK_R1.fastq.gz", "BMI_Plate37WellA12_16S_BJ8RK_R2.fastq.gz")
trim_trackReads <- trimPrimers16S(
fl_nm, in_subdir = "raw", out_subdir = "1_trimmed", meta = seqmeta_greatplains_16s,
multithread = TRUE # set multithread = FALSE on Windows computers though
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.