Module: ncbi.datasets.metadata.gene

Utility functions for working and reporting on gene data reports.

Module: ncbi.datasets.metadata.gene

Utility functions for working and reporting on gene data reports.
ncbi.datasets.metadata.gene.print_gene_warning_or_error(gene: ncbi.datasets.openapi.model.v1_gene_match.V1GeneMatch)

Reports gene warnings and/or errors per query term

Parameters

gene – A single gene metadata record returned by the API

Returns

None

Side Effects:

Prints report to stdout.

ncbi.datasets.metadata.gene.gene_values_by_fields(gene_descriptor: ncbi.datasets.openapi.model.v1_gene_descriptor.V1GeneDescriptor, fields=typing.List[str])

Filters gene descriptor for provided fields

Parameters
  • gene_descriptor – A single gene metadata record returned by the API

  • fields – List of fields to allow into returned dict

Returns

dict of supplied fields to their values

Side Effects:

Prints report to stdout.

ncbi.datasets.metadata.gene.print_gene_metadata_by_fields(gene: ncbi.datasets.openapi.model.v1_gene_match.V1GeneMatch, fields=typing.List[str])

Reports selected fields for a V1GeneMatch object to stdout

Warning/Error code will be printed if the supplied gene object does not contain a gene field.

Parameters
  • gene – A single gene metadata record returned by the API

  • fields – A list of field names to display. If set to None, print the entire object.

Returns

None

Side Effects:

Prints report to stdout.

Generated October 22, 2021