Skip to content

Resources

Tiago Jesu edited this page Oct 25, 2018 · 3 revisions

Resources

Multiple Queries

Every query made in this section is supposed to receive multiple queries at once, hence the usage of POST to allow for larger requests.

/api/getspecies/

Methods:

  • POST

This route uses the GetSpecies resource. This resource is used to query a list of accession numbers and retrieve the associated taxa as a result.

Usage in pATLAS: this is used for tables and plots in pATLAS. It uses listGiFilter (which stores the currently selected plasmids) as the query for this resource.

/api/getplasmidname/

Methods:

  • POST

This route uses the GetPlasmidName resource. This resource is used to query a list of accession numbers and retrieve the associated plasmid names as a result.

Usage in pATLAS: this is used for tables and plots in pATLAS. It uses listGiFilter (which stores the currently selected plasmids) as the query for this resource.

/api/getresistances/

Methods:

  • POST

This route uses the GetResistances resource. This resource is used to query a list of accession numbers and retrieve the associated antibiotic resistance genes as a result.

Usage in pATLAS: this is used for tables and plots in pATLAS. It uses listGiFilter (which stores the currently selected plasmids) as the query for this resource.

/api/getvirulence/

Methods:

  • POST

This route uses the GetVirulence resource. This resource is used to query a list of accession numbers and retrieve the associated virulence genes as a result.

Usage in pATLAS: this is used for tables and plots in pATLAS. It uses listGiFilter (which stores the currently selected plasmids) as the query for this resource.

/api/getmetal/

Methods:

  • POST

This route uses the GetMetal resource. This resource is used to query a list of accession numbers and retrieve the associated metal resistance genes as a result.

Usage in pATLAS: this is used for tables and plots in pATLAS. It uses listGiFilter (which stores the currently selected plasmids) as the query for this resource.

/api/getplasmidfinder/

Methods:

  • POST

This route uses the GetPlasmidFinder resource. This resource is used to query a list of accession numbers and retrieve the associated plasmid families as a result.

Usage in pATLAS: this is used for tables and plots in pATLAS. It uses listGiFilter (which stores the currently selected plasmids) as the query for this resource.

Single Queries

Every query in this section is intended to return accession numbers to the frontend that may be highlighted or filtered, with the exception of the GetAccessionHashes, which is used to filter links rather than nodes.

/api/getaccession/

Methods:

  • GET

This route uses the GetAccession resource. This resource is used to query a species in the database and return a list with all entries that matched the query, which is then parsed in the frontend for instance to highlight plasmids for a given species.

/api/getaccessionres/

Methods:

  • GET

This route uses the GetAccessionRes resource. This resource is used to query a resistance gene in the database and return a list with all entries that matched the query, which is then parsed in the frontend for instance to highlight plasmids for a given resistance gene.

/api/getaccessionpf/

Methods:

  • GET

This route uses the GetAccessionPF resource. This resource is used to query a plasmidfinder in the database and return a list with all entries that matched the query, which is then parsed in the frontend for instance to highlight plasmids for a given plasmidfinder gene.

/api/getaccessionvir/

Methods:

  • GET

This route uses the GetAccessionVir resource. This resource is used to query a virulence gene in the database and return a list with all entries that matched the query, which is then parsed in the frontend for instance to highlight plasmids for a given virulence gene.

/api/getaccessionmetal/

Methods:

  • GET

This route uses the GetAccessionMetal resource. This resource is used to query a metal resistance gene in the database and return a list with all entries that matched the query, which is then parsed in the frontend for instance to highlight plasmids for a given metal resistance gene.

/api/getaccessiontaxa/

Methods:

  • GET

This route uses the GetAccessionTaxa resource. This resource is used to query a taxa (genus, family or order) in the database and return a list with all entries that matched the query, which is then parsed in the frontend for instance to highlight plasmids for a given taxa. This resource is similar to GetAccession but it doesn't check for an exact match of the string but rather if any of the queried taxa is present in an array that stores the taxa information (as described in Models).

/api/getaccessionhash/

Methods:

  • GET

This route uses the GetAccessionHashes resource. This resource is used to filter the current selections based in shared hashes between plasmids, giving an idea of how much of the sequences of two plasmids are shared. This is a little bit more complicated resource but the rational is that it will retrieve any hash within the limits of the queried values. This will then be used to remove links that are not within the user defined criteria.