remove_unmatched_files | R Documentation |
NOTE: This function is now deprecated in favor of getPairedFastqFiles
and removeUnpairedFastqFiles
.
remove_unmatched_files(
fnFs,
fnRs,
post_samplename_pattern = "_R(1|2).*\\.fastq",
verbose = FALSE
)
fnFs |
Full name(s) of fastq file(s) containing forward-read sequence data. |
fnRs |
Full name(s) of fastq file(s) containing reverse-read sequence data. |
post_samplename_pattern |
(Optional) Character pattern within the filename which immediately follows the end of the sample name. Defaults to "_R(1|2).*\.fastq", as NEON fastq files typically consist of a sample name followed by "_R1.fastq" or "_R2.fastq", etc. |
verbose |
Whether to print messages regarding which files are matched and which are unmatched. |
Removes any forward-read files that do not have reverse-read counterparts, and vise versa. This function is necessary because dada2::filterAndTrim() will throw an error if the forward-read files and the reverse-read files are mismatched.
List of length 2. The first element is a vector of forward-read files that have reverse-read counterparts; the second element is a vector of reverse-read files that have forward-read counterparts.
matched_fn <- remove_unmatched_files(c("sample1_R1.fastq", "sample2_R1.fastq"), c("sample1_R2.fastq", "sample2_R2.fastq", "sample3_R2.fastq"))
fnFs <- matched_fn[[1]]
fnRs <- matched_fn[[2]]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.