Fork me on GitHub

extract-seq-segments: Use reference sequences to extract shorter matching sequence segments from longer sequences based on a user-defined ‘perc-identity’ value.

Citations
  • Torbjørn Rognes, Tomáš Flouri, Ben Nichols, Christopher Quince, and Frédéric Mahé. Vsearch: a versatile open source tool for metagenomics. PeerJ, 4:e2584, 2016. doi:10.7717/peerj.2584.

Docstring:

Usage: qiime rescript extract-seq-segments [OPTIONS]

  This action provides the ability to extract a region, or segment, of
  sequence without the need to specify primer pairs. This is very useful in
  cases when one or more of the primer sequences are not present within the
  target sequences, which prevents extraction of the (amplicon) region through
  primer-pair searching. Here, VSEARCH is used to extract these segments based
  on a reference pool of sequences that only span the region of interest.

Inputs:
  --i-input-sequences ARTIFACT FeatureData[Sequence]
                       Sequences from which matching shorter sequence
                       segments (regions) can be extracted from. Sequences
                       containing segments that match those from
                       'reference-segment-sequences' will have those segments
                       extracted and written to file.               [required]
  --i-reference-segment-sequences ARTIFACT FeatureData[Sequence]
                       Reference sequence segments that will be used to
                       search for and extract matching segments from
                       'sequences'.                                 [required]
Parameters:
  --p-perc-identity PROPORTION Range(0, 1, inclusive_start=False,
    inclusive_end=True)
                       The percent identity at which clustering should be
                       performed. This parameter maps to vsearch's --id
                       parameter.                               [default: 0.7]
  --p-min-seq-len INTEGER
    Range(1, None)     Minimum length of sequence allowed for searching. Any
                       sequence less than this will be discarded. If not set,
                       default program settings will be used.       [optional]
  --p-threads INTEGER  Number of computation threads to use (1 to 256). The
    Range(1, 256)      number of threads should be lesser or equal to the
                       number of available CPU cores.             [default: 1]
Outputs:
  --o-extracted-sequence-segments ARTIFACT FeatureData[Sequence]
                       Extracted sequence segments from 'input-sequences'
                       that succesfully aligned to
                       'reference-segment-sequences'.               [required]
  --o-unmatched-sequences ARTIFACT FeatureData[Sequence]
                       Sequences in 'input-sequences' that did not have
                       matching sequence segments within
                       'reference-segment-sequences'.               [required]
Miscellaneous:
  --output-dir PATH    Output unspecified results to a directory
  --verbose / --quiet  Display verbose output to stdout and/or stderr during
                       execution of this action. Or silence output if
                       execution is successful (silence is golden).
  --example-data PATH  Write example data and exit.
  --citations          Show citations and exit.
  --help               Show this message and exit.

Import:

from qiime2.plugins.rescript.methods import extract_seq_segments

Docstring:

Use reference sequences to extract shorter matching sequence segments from
longer sequences based on a user-defined 'perc-identity' value.

This action provides the ability to extract a region, or segment, of
sequence without the need to specify primer pairs. This is very useful in
cases when one or more of the primer sequences are not present within the
target sequences, which prevents extraction of the (amplicon) region
through primer-pair searching. Here, VSEARCH is used to extract these
segments based on a reference pool of sequences that only span the region
of interest.

Parameters
----------
input_sequences : FeatureData[Sequence]
    Sequences from which matching shorter sequence segments (regions) can
    be extracted from. Sequences containing segments that match those from
    'reference-segment-sequences' will have those segments extracted and
    written to file.
reference_segment_sequences : FeatureData[Sequence]
    Reference sequence segments that will be used to search for and extract
    matching segments from 'sequences'.
perc_identity : Float % Range(0, 1, inclusive_start=False, inclusive_end=True), optional
    The percent identity at which clustering should be performed. This
    parameter maps to vsearch's --id parameter.
min_seq_len : Int % Range(1, None), optional
    Minimum length of sequence allowed for searching. Any sequence less
    than this will be discarded. If not set, default program settings will
    be used.
threads : Int % Range(1, 256), optional
    Number of computation threads to use (1 to 256). The number of threads
    should be lesser or equal to the number of available CPU cores.

Returns
-------
extracted_sequence_segments : FeatureData[Sequence]
    Extracted sequence segments from 'input-sequences' that succesfully
    aligned to 'reference-segment-sequences'.
unmatched_sequences : FeatureData[Sequence]
    Sequences in 'input-sequences' that did not have matching sequence
    segments within 'reference-segment-sequences'.