Fork me on GitHub

get-bv-brc-genome-features: Fetch genome features from BV-BRC.

Citations
  • Robert D Olson, Rida Assaf, Thomas Brettin, Neal Conrad, Clark Cucinell, James J Davis, Donald M Dempsey, Allan Dickerman, Emily M Dietrich, Ronald W Kenyon, and others. Introducing the bacterial and viral bioinformatics resource center (bv-brc): a resource combining patric, ird and vipr. Nucleic acids research, 51(D1):D678–D689, 2023.

Docstring:

Usage: qiime rescript get-bv-brc-genome-features [OPTIONS]

  Fetch DNA and protein sequences of genome features from BV-BRC. BV-BRC
  (Bacterial and Viral Bioinformatics Resource Center) is a database for
  bacterial and viral genomes, annotations, and metadata. There are three ways
  to query data: You can use an RQL query to refine your search and get
  targeted features. By providing IDs/values and a corresponding data field,
  you can retrieve all features associated with those specific values in that
  data field. And as a third option a metadata column can be provided, to use
  metadata obtained with the action get-bv-brc-metadata as a new query. Check
  https://www.bv-brc.org/api/doc/ for documentation.

Parameters:
  --m-ids-metadata-file METADATA
  --m-ids-metadata-column COLUMN  MetadataColumn[Numeric | Categorical]
                         A metadata column obtained with the action
                         get-bv-brc-metadata that can be used as a query.
                                                                    [optional]
  --p-rql-query TEXT     Query in RQL format. To download all data for
                         genome_ids "224308.43" and "2030927.4755", the RQL
                         query looks like this:
                         "in(genome_id,(224308.43,2030927.4755))". While "in"
                         is an RQL operator, "genome_id" is a data field and
                         "224308.43,2030927.4755" are the values. It is
                         important to percent encode values if they contain
                         illegal characters like spaces. The values "Bacillus
                         subtilis" and "Bacteroidales bacterium" have to be
                         provided with percent encoded quotes (%22) and spaces
                         (%20) like this:
                         "in(species,(%22Bacillus%20subtilis%22,%22Bacteroidal
                         es%20bacterium%22))". Check
                         https://www.bv-brc.org/api/doc/ for documentation on
                         data types and corresponding data fields.  [optional]
  --p-data-field TEXT    Data field of the data type "genome_feature". This
                         parameter can only be used in conjunction with the
                         "ids" parameter. Retrieves all data associated with
                         the IDs/values specified in parameter "ids" in this
                         data field. Check
                         https://www.bv-brc.org/api/doc/genome_feature for
                         allowed data fields.                       [optional]
  --p-ids TEXT...        IDs/values of the corresponding data field. This
    List[Str]            parameter can only be used in conjunction with the
                         "data-field" parameter. Retrieves all data associated
                         with these IDs/values in the specified data field.
                                                                    [optional]
  --p-ranks TEXT... Choices('domain', 'superkingdom', 'kingdom',
    'subkingdom', 'superphylum', 'phylum', 'subphylum', 'infraphylum',
    'superclass', 'class', 'subclass', 'infraclass', 'cohort', 'superorder',
    'order', 'suborder', 'infraorder', 'parvorder', 'superfamily', 'family',
    'subfamily', 'tribe', 'subtribe', 'genus', 'subgenus', 'species group',
    'species subgroup', 'species', 'subspecies', 'forma')
                         List of taxonomic ranks for building a taxonomy
                         [default: 'kingdom, phylum, class, order, family,
                         genus, species']                           [optional]
  --p-rank-propagation / --p-no-rank-propagation
                         If a rank has no taxonomy associated with it, the
                         taxonomy from the upper-level rank of that lineage,
                         will be propagated downward. For example, if we are
                         missing the genus label for 'f__Pasteurellaceae;
                         g__'then the 'f__' rank will be propagated to become:
                         'f__Pasteurellaceae; g__Pasteurellaceae'.
                                                               [default: True]
Outputs:
  --o-genes ARTIFACT     Gene
    GenomeData[Genes]                                               [required]
  --o-proteins ARTIFACT GenomeData[Proteins]
                         proteins                                   [required]
  --o-taxonomy ARTIFACT FeatureData[Taxonomy]
                         Taxonomy data for all sequences.           [required]
  --o-loci ARTIFACT      loci
    GenomeData[Loci]                                                [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.
  --use-cache DIRECTORY  Specify the cache to be used for the intermediate
                         work of this action. If not provided, the default
                         cache under $TMP/qiime2/ will be used.
                         IMPORTANT FOR HPC USERS: If you are on an HPC system
                         and are using parallel execution it is important to
                         set this to a location that is globally accessible to
                         all nodes in the cluster.
  --help                 Show this message and exit.

Import:

from qiime2.plugins.rescript.methods import get_bv_brc_genome_features

Docstring:

Fetch genome features from BV-BRC.

Fetch DNA and protein sequences of genome features from BV-BRC. BV-BRC
(Bacterial and Viral Bioinformatics Resource Center) is a database for
bacterial and viral genomes, annotations, and metadata. There are three
ways to query data: You can use an RQL query to refine your search and get
targeted features. By providing IDs/values and a corresponding data field,
you can retrieve all features associated with those specific values in that
data field. And as a third option a metadata column can be provided, to use
metadata obtained with the action get-bv-brc-metadata as a new query. Check
https://www.bv-brc.org/api/doc/ for documentation.

Parameters
----------
ids_metadata : MetadataColumn[Numeric | Categorical], optional
    A metadata column obtained with the action get-bv-brc-metadata that can
    be used as a query.
rql_query : Str, optional
    Query in RQL format. To download all data for genome_ids "224308.43"
    and "2030927.4755", the RQL query looks like this:
    "in(genome_id,(224308.43,2030927.4755))". While "in" is an RQL
    operator, "genome_id" is a data field and "224308.43,2030927.4755" are
    the values. It is important to percent encode values if they contain
    illegal characters like spaces. The values "Bacillus subtilis" and
    "Bacteroidales bacterium" have to be provided with percent encoded
    quotes (%22) and spaces (%20) like this: "in(species,(%22Bacillus%20sub
    tilis%22,%22Bacteroidales%20bacterium%22))". Check https://www.bv-
    brc.org/api/doc/ for documentation on data types and corresponding data
    fields.
data_field : Str, optional
    Data field of the data type "genome_feature". This parameter can only
    be used in conjunction with the "ids" parameter. Retrieves all data
    associated with the IDs/values specified in parameter "ids" in this
    data field. Check https://www.bv-brc.org/api/doc/genome_feature for
    allowed data fields.
ids : List[Str], optional
    IDs/values of the corresponding data field. This parameter can only be
    used in conjunction with the "data-field" parameter. Retrieves all data
    associated with these IDs/values in the specified data field.
ranks : List[Str % Choices('domain', 'superkingdom', 'kingdom', 'subkingdom', 'superphylum', 'phylum', 'subphylum', 'infraphylum', 'superclass', 'class', 'subclass', 'infraclass', 'cohort', 'superorder', 'order', 'suborder', 'infraorder', 'parvorder', 'superfamily', 'family', 'subfamily', 'tribe', 'subtribe', 'genus', 'subgenus', 'species group', 'species subgroup', 'species', 'subspecies', 'forma')], optional
    List of taxonomic ranks for building a taxonomy [default: 'kingdom,
    phylum, class, order, family, genus, species']
rank_propagation : Bool, optional
    If a rank has no taxonomy associated with it, the taxonomy from the
    upper-level rank of that lineage, will be propagated downward. For
    example, if we are missing the genus label for 'f__Pasteurellaceae;
    g__'then the 'f__' rank will be propagated to become:
    'f__Pasteurellaceae; g__Pasteurellaceae'.

Returns
-------
genes : GenomeData[Genes]
    Gene
proteins : GenomeData[Proteins]
    proteins
taxonomy : FeatureData[Taxonomy]
    Taxonomy data for all sequences.
loci : GenomeData[Loci]
    loci