dadamap: Produce a map between denoised sequences and their original...

Description Usage Arguments Details Value

View source: R/tzara.R

Description

Produce a map between denoised sequences and their original identifiers.

Usage

1
2
3
4
dadamap(derep, dada, filename = NULL, seq_id = NULL, ...)

## S3 method for class 'list'
dadamap(derep, dada, filename = names(derep), seq_id = NULL, dir = NULL, ...)

Arguments

derep

a derep-class object or list of such objects

dada

(dada-class object or list of such objects) the results of a call to dada on "derep"

filename

(character of same length as "derep") fasta/q file that is the source for "derep", used for setting unique sequence IDs. If "derep" is a named list, then the default is to assume that these filenames are the names of the source files (as returned by derepFastq when multiple files are given). To avoid this behavior, pass an explicit NULL.

seq_id

(character or list of character) unique sequence identifiers for the sequences in "derep". These can alternatively be provided using argument "filename" or calling add_derep_names on "derep".

...

additional columns to add to the output. Names included in the output by default should be avoided.

dir

(character string) A directory to look for files in.

Details

Columns $derep_seq and $dada_seq contain one sequence per read as plain character strings. Keeping a separate, dereplicated list of sequences and storing references to them may seem like it would be more memory efficient, but it is not necessary to do this explicitly, because this is what R already does with character vectors; only one copy of each unique string is actually kept in memory, and everything else is pointers.

Value

a tibble with columns:

$name (character)

names from derep, if it is a named list of named_derep objects. Otherwise absent unless provided in ....

... (character)

any additional arguments, passed on to tibble

$seq_id (character)

the sequence identifiers from the original fasta/q file.

$derep_idx (integer)

the index of each sequence in derep$uniques.

$derep_seq (character)

the sequences.

$dada_seq (character)

the denoised sequences.


brendanf/tzara documentation built on March 11, 2021, 5:40 a.m.