tripal.organism package

Module contents

class tripal.organism.OrganismClient(tripalinstance, **requestArgs)

Bases: tripal.client.Client

Manage Tripal organisms

add_organism(genus, species, common=None, abbr=None, comment=None, infraspecific_rank=None, infraspecific_name=None)

Add a new organism to the database

Parameters:
  • genus (str) – The genus of the organism
  • species (str) – The species of the organism
  • common (str) – The common name of the organism
  • abbr (str) – The abbreviation of the organism
  • comment (str) – A comment / description
  • infraspecific_rank (str) – The type name of infraspecific name for any taxon below the rank of species. Must be one of [‘subspecies’, ‘varietas’, ‘subvariety’, ‘forma’, ‘subforma’]
  • infraspecific_name (str) – The infraspecific name for this organism.
Return type:

dict

Returns:

Organism information

delete_orphans(job_name=None, no_wait=None)

Delete orphans Drupal organism nodes

Parameters:
  • job_name (str) – Name of the job
  • no_wait (bool) – Return immediately without waiting for job completion
Return type:

str

Returns:

status

get_organisms(organism_id=None, genus=None, species=None, common=None, abbr=None, comment=None)

Get organisms from chado table

Parameters:
  • organism_id (str) – An organism ID
  • genus (str) – The genus of the organism
  • common (str) – The common name of the organism
  • abbr (str) – The abbreviation of the organism
  • species (str) – The species of the organism
  • comment (str) – A comment / description
Return type:

list of dict

Returns:

Organism information

get_organisms_tripal(organism_id=None)

Get organism entities

Parameters:organism_id (int) – An organism entity ID
Return type:list of dict
Returns:Organism entity information
get_taxonomic_ranks()

Get taxonomic ranks

Return type:list of dict
Returns:Taxonomic ranks
sync(organism=None, organism_id=None, job_name=None, no_wait=None)

Synchronize an organism

Parameters:
  • organism (str) – Common name of the organism to sync
  • organism_id (str) – ID of the organism to sync
  • job_name (str) – Name of the job
  • no_wait (bool) – Return immediately without waiting for job completion
Return type:

str

Returns:

status