Reference Manual

module PseudomonasDotComScraper:
 Hosting the PseudomonasDotComScraper, an API for the https://www.pseudomonas.com database web interface.
class GenDBScraper.PseudomonasDotComScraper.PseudomonasDotComScraper(query=None)[source]

An API for the pseudomonas.com genome database using web scraping technology.

connect()[source]

Connect to the database.

from_json(infile)[source]

Deserialize a json file into a results dictionary (a dict of pandas.DataFrame).

Parameters:infile (str) – The file path of the json file to load.
query

Get the query.

Returns:The query object.
Return type:pdc_query
run_query(query=None)[source]

Run a query on pseudomonas.com

Parameters:query ([list of] (pdc_query | dict)) – The query object to run.
Returns:The query results as a dictionary with ‘strain_feature’ keys.
Return type:dict
to_json(results, outfile=None)[source]

Serialize results dictionary to json.

Parameters:
  • results (dict) – The results dictionary (dict of pandas.DataFrame).
  • outfile (str) – Path to file for writing query results to. Default: None, will write to temp file.
Raises:

IOError – ‘outfile’ not writable.

Returns:

If successful, path to written file.

class GenDBScraper.PseudomonasDotComScraper.pdc_query(strain, feature, organism)
feature

Alias for field number 1

organism

Alias for field number 2

strain

Alias for field number 0