matchFastqToMetadata: Match Fastq Files to Metadata

View source: R/utils.R

matchFastqToMetadataR Documentation

Match Fastq Files to Metadata

Description

Helper function to match fastq file names to sequence metadata via the sequence metadata table's "rawDataFileName" column. Tolerant to filenames with appended run ID prefix (e.g. "runB69RN_...") and agnostic to .gz compression.

Usage

matchFastqToMetadata(fn, meta, verbose = TRUE)

Arguments

fn

Full name(s) of fastq file(s).

meta

Metadata downloaded using downloadSequenceMetadata that corresponds to the fastq files.

verbose

(Optional) Default TRUE. Whether to print warning messages when metadata does not contain records corresponding to all provided fastq files.

Details

Used in getPairedFastqFiles and removeUnpairedFastqFiles.

Value

Data frame, in which the first column contains the fastq file names in the order received, and the remaining columns contain corresponding metadata records. Has as many rows as the number of input filenames.

Examples

## Not run: 
meta_ext <- matchFastqToMetadata(c("sample1_R1.fastq", "sample1_R2.fastq"), meta)

## End(Not run)

claraqin/neonMicrobe documentation built on April 11, 2024, 11:47 a.m.