# denoise-paired: Denoise and dereplicate paired-end sequences¶

#### Docstring:

Usage: qiime dada2 denoise-paired [OPTIONS]

This method denoises paired-end sequences, dereplicates them, and filters
chimeras.

Options:
--i-demultiplexed-seqs ARTIFACT PATH SampleData[PairedEndSequencesWithQuality]
The paired-end demultiplexed sequences to be
denoised.  [required]
--p-trunc-len-f INTEGER         Position at which forward read sequences
should be truncated due to decrease in
quality. This truncates the 3' end of the of
the input sequences, which will be the bases
that were sequenced in the last cycles.
Reads that are shorter than this value will
be discarded. After this parameter is
applied there must still be at least a 20
nucleotide overlap between the forward and
reverse reads. If 0 is provided, no
truncation or length filtering will be
performed  [required]
--p-trunc-len-r INTEGER         Position at which reverse read sequences
should be truncated due to decrease in
quality. This truncates the 3' end of the of
the input sequences, which will be the bases
that were sequenced in the last cycles.
Reads that are shorter than this value will
be discarded. After this parameter is
applied there must still be at least a 20
nucleotide overlap between the forward and
reverse reads. If 0 is provided, no
truncation or length filtering will be
performed  [required]
--p-trim-left-f INTEGER         Position at which forward read sequences
should be trimmed due to low quality. This
trims the 5' end of the input sequences,
which will be the bases that were sequenced
in the first cycles.  [default: 0]
--p-trim-left-r INTEGER         Position at which reverse read sequences
should be trimmed due to low quality. This
trims the 5' end of the input sequences,
which will be the bases that were sequenced
in the first cycles.  [default: 0]
--p-max-ee FLOAT                Reads with number of expected errors higher
than this value will be discarded.
[default: 2.0]
--p-trunc-q INTEGER             Reads are truncated at the first instance of
a quality score less than or equal to this
value. If the resulting read is then shorter
than trunc_len_f or trunc_len_r
(depending on the direction of the read) it
--p-chimera-method [pooled|consensus|none]
The method used to remove chimeras. "none":
No chimera removal is performed. "pooled":
All reads are pooled prior to chimera
detection. "consensus": Chimeras are
detected in samples individually, and
sequences found chimeric in a sufficient
fraction of samples are removed.  [default:
consensus]
--p-min-fold-parent-over-abundance FLOAT
The minimum abundance of potential parents
of a sequence being tested as chimeric,
expressed as a fold-change versus the
abundance of the sequence being tested.
Values should be greater than or equal to 1
(i.e. parents should be more abundant than
the sequence being tested). This parameter
has no effect if chimera_method is "none".
[default: 1.0]
multithreaded processing. If 0 is provided,
all available cores will be used.  [default:
1]
error model. Smaller numbers will result in
a shorter run time but a less reliable error
model.  [default: 1000000]
--p-hashed-feature-ids / --p-no-hashed-feature-ids
If true, the feature ids in the resulting
table will be presented as hashes of the
sequences defining each feature. The hash
will always be the same for the same
sequence so this allows feature tables to be
merged across runs of this method. You
should only merge tables if the exact same
parameters are used for each run.  [default:
True]
--o-table ARTIFACT PATH FeatureTable[Frequency]
The resulting feature table.  [required if
not passing --output-dir]
--o-representative-sequences ARTIFACT PATH FeatureData[Sequence]
The resulting feature sequences. Each
feature in the feature table will be
represented by exactly one sequence, and
these sequences will be the joined paired-
end sequences.  [required if not passing
--output-dir]
[required if not passing --output-dir]
--output-dir DIRECTORY          Output unspecified results to a directory
--cmd-config FILE               Use config file for command options
--verbose                       Display verbose output to stdout and/or
stderr during execution of this action.
[default: False]
--quiet                         Silence output if execution is successful
(silence is golden).  [default: False]
--citations                     Show citations and exit.
--help                          Show this message and exit.

#### Import:

from qiime2.plugins.dada2.methods import denoise_paired


#### Docstring:

Denoise and dereplicate paired-end sequences

This method denoises paired-end sequences, dereplicates them, and filters
chimeras.

Parameters
----------
demultiplexed_seqs : SampleData[PairedEndSequencesWithQuality]
The paired-end demultiplexed sequences to be denoised.
trunc_len_f : Int
Position at which forward read sequences should be truncated due to
decrease in quality. This truncates the 3' end of the of the input
sequences, which will be the bases that were sequenced in the last
cycles. Reads that are shorter than this value will be discarded. After
this parameter is applied there must still be at least a 20 nucleotide
overlap between the forward and reverse reads. If 0 is provided, no
truncation or length filtering will be performed
trunc_len_r : Int
Position at which reverse read sequences should be truncated due to
decrease in quality. This truncates the 3' end of the of the input
sequences, which will be the bases that were sequenced in the last
cycles. Reads that are shorter than this value will be discarded. After
this parameter is applied there must still be at least a 20 nucleotide
overlap between the forward and reverse reads. If 0 is provided, no
truncation or length filtering will be performed
trim_left_f : Int, optional
Position at which forward read sequences should be trimmed due to low
quality. This trims the 5' end of the input sequences, which will be
the bases that were sequenced in the first cycles.
trim_left_r : Int, optional
Position at which reverse read sequences should be trimmed due to low
quality. This trims the 5' end of the input sequences, which will be
the bases that were sequenced in the first cycles.
max_ee : Float, optional
Reads with number of expected errors higher than this value will be
trunc_q : Int, optional
Reads are truncated at the first instance of a quality score less than
or equal to this value. If the resulting read is then shorter than
trunc_len_f or trunc_len_r (depending on the direction of the read)
chimera_method : Str % Choices({'consensus', 'none', 'pooled'}), optional
The method used to remove chimeras. "none": No chimera removal is
performed. "pooled": All reads are pooled prior to chimera detection.
"consensus": Chimeras are detected in samples individually, and
sequences found chimeric in a sufficient fraction of samples are
removed.
min_fold_parent_over_abundance : Float, optional
The minimum abundance of potential parents of a sequence being tested
as chimeric, expressed as a fold-change versus the abundance of the
sequence being tested. Values should be greater than or equal to 1
(i.e. parents should be more abundant than the sequence being tested).
This parameter has no effect if chimera_method is "none".
The number of threads to use for multithreaded processing. If 0 is
provided, all available cores will be used.
The number of reads to use when training the error model. Smaller
numbers will result in a shorter run time but a less reliable error
model.
hashed_feature_ids : Bool, optional
If true, the feature ids in the resulting table will be presented as
hashes of the sequences defining each feature. The hash will always be
the same for the same sequence so this allows feature tables to be
merged across runs of this method. You should only merge tables if the
exact same parameters are used for each run.

Returns
-------
table : FeatureTable[Frequency]
The resulting feature table.
representative_sequences : FeatureData[Sequence]
The resulting feature sequences. Each feature in the feature table will
be represented by exactly one sequence, and these sequences will be the
joined paired-end sequences.
denoising_stats : SampleData[DADA2Stats]