run module¶
kg-covid-19¶
kg-covid-19 [OPTIONS] COMMAND [ARGS]...
download¶
Downloads data files from list of URLs (default: download.yaml) into data directory (default: data/raw).
- Args:
yaml_file: Specify the YAML file containing a list of datasets to download. output_dir: A string pointing to the directory to download data to. ignore_cache: If specified, will ignore existing files and download again.
- Returns:
None.
kg-covid-19 download [OPTIONS]
Options
-
-y<yaml_file>¶ Required
-
-o<output_dir>¶ Required
-
-i¶ ignore cache and download files even if they exist [false]
holdouts¶
Make holdouts for ML training
Given a graph (from formatted node and edge TSVs), output positive edges and negative edges for use in machine learning.
kg-covid-19 holdouts [OPTIONS]
Options
-
-n<nodes>¶ nodes KGX TSV file
-
-e<edges>¶ edges KGX TSV file
-
-o<output_dir>¶ output directory
-
-t<train_fraction>¶ fraction of input graph to use in training graph [0.8]
-
-v¶ make validation set
merge¶
Use KGX to load subgraphs to create a merged graph.
- Args:
yaml: A string pointing to a KGX compatible config YAML. processes: Number of processes to use.
- Returns:
None.
kg-covid-19 merge [OPTIONS]
Options
-
-y<yaml>¶
-
-p<processes>¶
query¶
Perform a query of knowledge graph using a class contained in query_utils
- Args:
yaml: A rq file containing a SPARQL query in grlc format: https://github.com/CLARIAH/grlc/blob/master/README.md output_dir: Directory to output results of query query_key: the key in the yaml file containing the query string endpoint_key: the key in the yaml file containing the sparql endpoint URL outfile_ext: file extension for output file [.tsv]
- Returns:
None.
kg-covid-19 query [OPTIONS]
Options
-
-y<yaml>¶ Required
-
-o<output_dir>¶
transform¶
Calls scripts in kg_covid_19/transform/[source name]/ to transform each source into nodes and edges.
- Args:
input_dir: A string pointing to the directory to import data from. output_dir: A string pointing to the directory to output data to. sources: A list of sources to transform.
- Returns:
None.
kg-covid-19 transform [OPTIONS]
Options
-
-i<input_dir>¶
-
-o<output_dir>¶
-
-s<sources>¶ - Options
ZhouTransform|DrugCentralTransform|TTDTransform|StringTransform|ScibiteCordTransform|PharmGKB|SARSCoV2GeneAnnot|IntAct|GoTransform|HpTransform|MondoTransform|ChebiTransform|GocamTransform|ChemblTransform