INDRA DB Processor (indra_cogex.sources.indra_db)

Processor for the INDRA database.

class DbProcessor(dir_path=None)[source]

Bases: Processor

Processor for the INDRA database.

Initialize the INDRA database processor.

Parameters:

dir_path (Union[None, Path, str]) – The path to the directory containing unique and grounded statements as a *.tsv.gz file, source counts as a pickle file and belief scores as a pickle file.

get_nodes()[source]

Iterate over the nodes to upload.

get_relations(max_complex_members=3)[source]

Iterate over the relations to upload.

class EvidenceProcessor[source]

Bases: Processor

Initialize the Evidence processor

get_nodes(num_rows=None)[source]

Get INDRA Evidence and Publication nodes

Return type:

Iterable[Node]

get_relations()[source]

Iterate over the relations to upload.

exception StatementJSONDecodeError[source]

Bases: Exception

get_ag_ns_id(ag)[source]

Return a namespace, identifier tuple for a given agent.

Parameters:

ag (Agent) – The agent to get the namespace and identifier for.

Return type:

Tuple[str, str]

Returns:

A namespace, identifier tuple.