Fork me on GitHub

get-bv-brc-metadata: Fetch BV-BCR metadata.

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-metadata [OPTIONS]

  Fetch BV-BCR metadata for a specific data type. 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 results. By
  providing IDs/values and a corresponding data field, you can retrieve all
  metadata associated with those specific values in that data field. And as a
  third option a metadata column can be provided, to use the results from
  other data types 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-data-type TEXT Choices('antibiotics', 'enzyme_class_ref', 'epitope',
    'epitope_assay', 'experiment', 'bioset', 'bioset_result',
    'gene_ontology_ref', 'genome', 'strain', 'genome_amr', 'feature_sequence',
    'genome_feature', 'genome_sequence', 'id_ref', 'misc_niaid_sgc',
    'pathway', 'pathway_ref', 'ppi', 'protein_family_ref', 'sequence_feature',
    'sequence_feature_vt', 'sp_gene', 'sp_gene_ref', 'spike_lineage',
    'spike_variant', 'structured_assertion', 'subsystem', 'subsystem_ref',
    'taxonomy', 'protein_structure', 'protein_feature', 'surveillance',
    'serology')          BV-BCR data type for which metadata should be
                         downloaded. Check https://www.bv-brc.org/api/doc/ for
                         documentation.                             [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 specified "data-type". This
                         parameter can only be used in conjunction with the
                         "ids" parameter. Retrieves metadata associated with
                         the IDs/values specified in parameter "ids" in this
                         data field. Check https://www.bv-brc.org/api/doc/ for
                         allowed data fields in the specified "data-type".
                                                                    [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]
Outputs:
  --o-metadata ARTIFACT  BV-BCR metadata of specified data type.
    ImmutableMetadata                                               [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_metadata

Docstring:

Fetch BV-BCR metadata.

Fetch BV-BCR metadata for a specific data type. 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 results. By
providing IDs/values and a corresponding data field, you can retrieve all
metadata associated with those specific values in that data field. And as a
third option a metadata column can be provided, to use the results from
other data types 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.
data_type : Str % Choices('antibiotics', 'enzyme_class_ref', 'epitope', 'epitope_assay', 'experiment', 'bioset', 'bioset_result', 'gene_ontology_ref', 'genome', 'strain', 'genome_amr', 'feature_sequence', 'genome_feature', 'genome_sequence', 'id_ref', 'misc_niaid_sgc', 'pathway', 'pathway_ref', 'ppi', 'protein_family_ref', 'sequence_feature', 'sequence_feature_vt', 'sp_gene', 'sp_gene_ref', 'spike_lineage', 'spike_variant', 'structured_assertion', 'subsystem', 'subsystem_ref', 'taxonomy', 'protein_structure', 'protein_feature', 'surveillance', 'serology'), optional
    BV-BCR data type for which metadata should be downloaded. Check
    https://www.bv-brc.org/api/doc/ for documentation.
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 specified "data-type". This parameter can only be
    used in conjunction with the "ids" parameter. Retrieves metadata
    associated with the IDs/values specified in parameter "ids" in this
    data field. Check https://www.bv-brc.org/api/doc/ for allowed data
    fields in the specified "data-type".
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.

Returns
-------
metadata : ImmutableMetadata
    BV-BCR metadata of specified data type.