VirHostNet (indra.sources.virhostnet)

This module implements an API for VirHostNet 2.0 (http://virhostnet.prabi.fr/).

VirHostNet API (indra.sources.virhostnet.api)

indra.sources.virhostnet.api.process_from_web(query=None, up_web_fallback=False)[source]

Process host-virus interactions from the VirHostNet website.

Parameters:query (Optional[str]) – A query that constrains the results to a given subset of the VirHostNet database. Example: “taxid:2697049” to search for interactions for SARS-CoV-2. If not provided, By default, the “*” query is used which returns the full database.
Returns:A VirhostnetProcessor object which contains a list of extracted INDRA Statements in its statements attribute.
Return type:VirhostnetProcessor
indra.sources.virhostnet.api.process_tsv(fname, up_web_fallback=False)[source]

Process a TSV data file obtained from VirHostNet.

Parameters:fname (str) – The path to the VirHostNet tabular data file (in the same format as the web service).
Returns:A VirhostnetProcessor object which contains a list of extracted INDRA Statements in its statements attribute.
Return type:VirhostnetProcessor
indra.sources.virhostnet.api.process_df(df, up_web_fallback=False)[source]

Process a VirHostNet pandas DataFrame.

Parameters:df (pandas.DataFrame) – A DataFrame representing VirHostNet interactions (in the same format as the web service).
Returns:A VirhostnetProcessor object which contains a list of extracted INDRA Statements in its statements attribute.
Return type:VirhostnetProcessor

VirHostNet Processor (indra.sources.virhostnet.processor)

class indra.sources.virhostnet.processor.VirhostnetProcessor(df, up_web_fallback=False)[source]

A processor that takes a pandas DataFrame and extracts INDRA Statements.

Parameters:df (pandas.DataFrame) – A pandas DataFrame representing VirHostNet interactions.
df

A pandas DataFrame representing VirHostNet interactions.

Type:pandas.DataFrame
statements

A list of INDRA Statements extracted from the DataFrame.

Type:list[indra.statements.Statement]
indra.sources.virhostnet.processor.get_agent_from_grounding(grounding, up_web_fallback=False)[source]

Return an INDRA Agent based on a grounding annotation.

indra.sources.virhostnet.processor.parse_psi_mi(psi_mi_str)[source]

Parse a PSI-MI annotation into an ID and name pair.

indra.sources.virhostnet.processor.parse_source_ids(source_id_str)[source]

Parse VirHostNet source id annotations into a dict.

indra.sources.virhostnet.processor.parse_text_refs(text_ref_str)[source]

Parse a text reference annotation into a text_refs dict.

indra.sources.virhostnet.processor.process_row(row, up_web_fallback=False)[source]

Process one row of the DataFrame into an INDRA Statement.