diff --git a/.dockerignore b/.dockerignore
index 93f13619..a94ab9fc 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -1,2 +1,7 @@
node_modules
npm-debug.log
+snakemake_logs
+snakemake_data
+logs
+.snakemake
+venv
diff --git a/.eslintrc.json b/.eslintrc.json
index 1b884780..91f5665e 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -101,7 +101,7 @@
"error",
"always"
],
- "sort-keys": "warn",
+ "sort-keys": ["warn", "asc", {"caseSensitive": true, "natural": false}],
"sort-keys-fix/sort-keys-fix": "warn",
"space-in-parens": [
"error",
diff --git a/.github/workflows/npm-test.yml b/.github/workflows/npm-test.yml
index befa703c..f461dc2f 100644
--- a/.github/workflows/npm-test.yml
+++ b/.github/workflows/npm-test.yml
@@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- node: [10]
+ node: [10, 12, 14]
name: node-${{ matrix.node }}
steps:
- uses: actions/checkout@v2
diff --git a/.gitignore b/.gitignore
index a9e74c8d..7587b6cc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,9 +2,11 @@
.nyc_output
coverage
node_modules/
+node_modules.bk
.orientdb_history
dist
*png
+!docs/*png
*gz
*zip
*tar
@@ -32,7 +34,14 @@ logs
pm2_logs
errorLog-*
.~*
-data/asco.json
data/ligand_actions.json
*.log
tmp
+
+# snakemake stuff
+.snakemake
+venv
+snakemake_data
+snakemake_logs
+dag.svg
+dag.png
diff --git a/README.md b/README.md
index 936fb76a..5e0de327 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# GraphKB Loader
-![build](https://github.com/bcgsc/pori_graphkb_loader/workflows/build/badge.svg?branch=master)
+![build](https://github.com/bcgsc/pori_graphkb_loader/workflows/build/badge.svg?branch=master) ![Docker Image Version (latest semver)](https://img.shields.io/docker/v/bcgsc/pori-graphkb-loader?label=docker%20image) ![node versions](https://img.shields.io/badge/node-10%20%7C%2012%20%7C%2014-blue)
This package is used to import content from a variety of sources into GraphKB using the API.
@@ -12,6 +12,7 @@ This package is used to import content from a variety of sources into GraphKB us
- [Creating a new Loader](#creating-a-new-loader)
- [API Loaders](#api-loaders)
- [File Loaders](#file-loaders)
+- [Initializing GraphKB Content](#initializing-graphkb-content)
Automatic Import modules are provided for a variety of input sources. To Start importing external data, first the GraphKB API
must already be running. Then the command line interface can be used for upload. Get the help menu
@@ -21,6 +22,12 @@ detailing the commands and required inputs as follows
node bin/load.js -- --help
```
+or using docker
+
+```bash
+docker run bcgsc/pori-graphkb-loader --help
+```
+
## Loaders
### Ontologies
@@ -50,7 +57,8 @@ node bin/load.js -- --help
- [DGIdb](./src/dgidb)
- [DoCM](./src/docm)
- [OncoKB](./src/oncokb)
-- [tcgaFusions](./src/tcgaFusions)
+- [PMC4468049](./src/PMC4468049)
+- [PMC4232638](./src/PMC4232638)
## Guidelines for Developers
@@ -59,8 +67,8 @@ node bin/load.js -- --help
Clone the repository
```bash
-git clone https://svn.bcgsc.ca/bitbucket/scm/dat/knowledgebase_importer.git
-cd knowledgebase_importer
+git clone https://github.com/bcgsc/pori_graphkb_loader.git
+cd pori_graphkb_loader
git checkout develop
```
@@ -113,3 +121,39 @@ export is called `uploadFile` and accepts an additional argument. For example se
*/
const uploadFile = async ({ filename, conn }) => {
```
+
+## Initializing GraphKB Content
+
+For convenience, a snakemake workflow is included to run all available loaders in an optimal order
+to initialize the content in a new instance of GraphKB. This is done via python snakemake. To set
+up snakemake in a virtual environment run the following
+
+```bash
+python3 -m venv venv
+source venv/bin/activate
+pip install -U pip setuptools
+pip install snakemake
+```
+
+Then the workflow can be run as follows (single core by default but can be adjusted depending on
+your server settings)
+
+```bash
+snakemake -j 1
+```
+
+![default workflow](./docs/basic_workflow.png)
+
+The COSMIC and DrugBank options require licensing and are therefore not run by default. If you have
+a license to use them then you can include one or both of them by providing email and password
+as config parameters
+
+```bash
+snakemake -j 1 \
+ --config drugbank_email="YOUR EMAIL" \
+ drugbank_password="YOUR PASSWORD" \
+ cosmic_email="YOUR EMAIL" \
+ cosmic_password="YOUR PASSWORD"
+```
+
+![full workflow](./docs/full_workflow.png)
diff --git a/Snakefile b/Snakefile
new file mode 100644
index 00000000..915a0475
--- /dev/null
+++ b/Snakefile
@@ -0,0 +1,421 @@
+import os
+from textwrap import dedent
+
+
+DATA_DIR = 'snakemake_data'
+LOGS_DIR = 'snakemake_logs'
+
+if not os.path.exists(DATA_DIR):
+ os.mkdir(DATA_DIR)
+
+if not os.path.exists(LOGS_DIR):
+ os.mkdir(LOGS_DIR)
+
+DRUGBANK_EMAIL = config.get('drugbank_email')
+DRUGBANK_PASSWORD = config.get('drugbank_password')
+USE_DRUGBANK = DRUGBANK_EMAIL or DRUGBANK_PASSWORD
+COSMIC_EMAIL = config.get('cosmic_email')
+COSMIC_PASSWORD = config.get('cosmic_password')
+USE_COSMIC = COSMIC_EMAIL or COSMIC_PASSWORD
+BACKFILL_TRIALS = config.get('trials')
+GITHUB_DATA = 'https://raw.githubusercontent.com/bcgsc/pori_graphkb_loader/develop/data'
+CONTAINER = 'docker://bcgsc/pori-graphkb-loader:latest'
+
+rule all:
+ input: f'{DATA_DIR}/civic.COMPLETE',
+ f'{DATA_DIR}/cgi.COMPLETE',
+ f'{DATA_DIR}/docm.COMPLETE',
+ f'{DATA_DIR}/PMC4468049.COMPLETE',
+ f'{DATA_DIR}/PMC4232638.COMPLETE',
+ f'{DATA_DIR}/uberon.COMPLETE',
+ f'{DATA_DIR}/ncitFdaXref.COMPLETE',
+ f'{DATA_DIR}/fdaApprovals.COMPLETE',
+ f'{DATA_DIR}/cancerhotspots.COMPLETE',
+ *([f'{DATA_DIR}/clinicaltrialsgov.COMPLETE'] if BACKFILL_TRIALS else []),
+ *([f'{DATA_DIR}/cosmic_resistance.COMPLETE', f'{DATA_DIR}/cosmic_fusions.COMPLETE'] if USE_COSMIC else [])
+
+
+rule download_ncit:
+ output: f'{DATA_DIR}/ncit/Thesaurus.txt',
+ shell: dedent(f'''\
+ cd {DATA_DIR}/ncit
+ wget https://evs.nci.nih.gov/ftp1/NCI_Thesaurus/Thesaurus.FLAT.zip
+ unzip Thesaurus.FLAT.zip
+ rm Thesaurus.FLAT.zip
+ rm -rf __MACOSX''')
+
+
+rule download_ncit_fda:
+ output: f'{DATA_DIR}/ncit/FDA-UNII_NCIt_Subsets.txt'
+ shell: dedent(f'''\
+ cd {DATA_DIR}/ncit
+ wget https://evs.nci.nih.gov/ftp1/FDA/UNII/FDA-UNII_NCIt_Subsets.txt''')
+
+
+rule download_ensembl:
+ output: f'{DATA_DIR}/ensembl/biomart_export.tsv'
+ shell: dedent(f'''\
+ cd {DATA_DIR}/ensembl
+ query_string=''
+ wget -O biomart_export.tsv "http://www.ensembl.org/biomart/martservice?query=$query_string"
+ ''')
+
+
+rule download_fda_srs:
+ output: f'{DATA_DIR}/fda/UNII_Records.txt'
+ shell: dedent(f'''\
+ cd {DATA_DIR}/fda
+ wget https://fdasis.nlm.nih.gov/srs/download/srs/UNII_Data.zip
+ unzip UNII_Data.zip
+ rm UNII_Data.zip
+
+ mv UNII*.txt UNII_Records.txt
+ ''')
+
+
+rule download_refseq:
+ output: f'{DATA_DIR}/refseq/LRG_RefSeqGene.tab'
+ shell: dedent(f'''\
+ cd {DATA_DIR}/refseq
+ wget -O LRG_RefSeqGene.tab ftp://ftp.ncbi.nih.gov/refseq/H_sapiens/RefSeqGene/LRG_RefSeqGene
+ ''')
+
+
+rule download_uberon:
+ output: f'{DATA_DIR}/uberon/uberon.owl'
+ shell: dedent(f'''\
+ cd {DATA_DIR}/uberon
+ wget http://purl.obolibrary.org/obo/uberon.owl
+ ''')
+
+
+rule download_do:
+ output: f'{DATA_DIR}/do/doid.json'
+ shell: dedent(f'''\
+ cd {DATA_DIR}/do;
+ REPO=https://github.com/DiseaseOntology/HumanDiseaseOntology.git;
+ LATEST=$(git ls-remote $REPO --tags v\\* | cut -f 2 | sed 's/refs\\/tags\///' | grep '\\bv[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]\\b' | sort -d | tail -n 1)
+ echo $LATEST
+ wget https://github.com/DiseaseOntology/HumanDiseaseOntology/raw/$LATEST/src/ontology/doid.json
+ ''')
+
+
+rule download_drugbank:
+ output: f'{DATA_DIR}/drugbank/full_database.xml'
+ shell: dedent(f'''\
+ cd {DATA_DIR}/drugbank
+ wget https://www.drugbank.ca/releases
+ latest=$(grep 'href="/releases/[^"]*"' -o releases | cut -f 3 -d/ | sed 's/"//' | sort -V | tail -n 2 | head -n 1)
+ rm releases
+ filename="drugbank_all_full_database_v$latest".xml
+
+ curl -Lfv -o ${{filename}}.zip -u {DRUGBANK_EMAIL}:{DRUGBANK_PASSWORD} https://go.drugbank.com/releases/5-1-8/downloads/all-full-database
+ unzip ${{filename}}.zip
+ mv full\ database.xml full_database.xml''')
+
+
+rule download_PMC4468049:
+ output: f'{DATA_DIR}/PMC4468049/NIHMS632238-supplement-2.xlsx'
+ shell: dedent(f'''\
+ cd {DATA_DIR}/PMC4468049
+ wget https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4468049/bin/NIHMS632238-supplement-2.xlsx
+ ''')
+
+
+rule download_PMC4232638:
+ output: f'{DATA_DIR}/PMC4232638/13059_2014_484_MOESM2_ESM.xlsx'
+ shell: dedent(f'''\
+ cd {DATA_DIR}/PMC4232638
+ wget https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4232638/bin/13059_2014_484_MOESM2_ESM.xlsx
+ ''')
+
+
+rule download_cgi:
+ output: f'{DATA_DIR}/cgi/cgi_biomarkers_per_variant.tsv'
+ shell: dedent(f'''\
+ cd {DATA_DIR}/cgi
+ wget https://www.cancergenomeinterpreter.org/data/cgi_biomarkers_latest.zip
+ unzip cgi_biomarkers_latest.zip
+ ''')
+
+
+rule download_local_data:
+ output: f'{DATA_DIR}/local/{{local}}.json'
+ shell: dedent(f'''\
+ cd {DATA_DIR}/local
+ wget {GITHUB_DATA}/{{wildcards.local}}.json
+ ''')
+
+
+rule download_cancerhotspots:
+ output: f'{DATA_DIR}/cancerhotspots/cancerhotspots.v2.maf'
+ shell: dedent(f'''\
+ cd {DATA_DIR}/cancerhotspots
+ wget http://download.cbioportal.org/cancerhotspots/cancerhotspots.v2.maf.gz
+ gunzip cancerhotspots.v2.maf.gz
+ ''')
+
+
+rule download_clinicaltrialsgov:
+ output: directory(f'{DATA_DIR}/clinicaltrialsgov')
+ shell: dedent(f'''\
+ cd {DATA_DIR}/clinicaltrialsgov
+ wget https://clinicaltrials.gov/AllPublicXML.zip
+ unzip AllPublicXML.zip''')
+
+
+rule download_cosmic_resistance:
+ output: f'{DATA_DIR}/cosmic/CosmicResistanceMutations.tsv'
+ shell: dedent(f'''
+ cd {DATA_DIR}/cosmic
+ AUTH=$( echo "{COSMIC_EMAIL}:{COSMIC_PASSWORD}" | base64 )
+ resp=$( curl -H "Authorization: Basic $AUTH" https://cancer.sanger.ac.uk/cosmic/file_download/GRCh38/cosmic/v92/CosmicResistanceMutations.tsv.gz );
+ url=$( node -e "var resp = $resp; console.log(resp.url);" );
+ curl "$url" -o CosmicResistanceMutations.tsv.gz
+ gunzip CosmicResistanceMutations.tsv.gz
+ ''')
+
+
+rule download_cosmic_diseases:
+ output: f'{DATA_DIR}/cosmic/classification.csv'
+ shell: dedent(f'''
+ cd {DATA_DIR}/cosmic
+ AUTH=$( echo "{COSMIC_EMAIL}:{COSMIC_PASSWORD}" | base64 )
+ resp=$( curl -H "Authorization: Basic $AUTH" https://cancer.sanger.ac.uk/cosmic/file_download/GRCh38/cosmic/v92/classification.csv );
+ url=$( node -e "var resp = $resp; console.log(resp.url);" );
+ curl "$url" -o classification.csv
+ ''')
+
+
+rule download_cosmic_fusions:
+ output: f'{DATA_DIR}/cosmic/CosmicFusionExport.tsv'
+ shell: dedent(f'''
+ cd {DATA_DIR}/cosmic
+ AUTH=$( echo "{COSMIC_EMAIL}:{COSMIC_PASSWORD}" | base64 )
+ resp=$( curl -H "Authorization: Basic $AUTH" https://cancer.sanger.ac.uk/cosmic/file_download/GRCh38/cosmic/v92/CosmicFusionExport.tsv.gz );
+ url=$( node -e "var resp = $resp; console.log(resp.url);" );
+ curl "$url" -o CosmicFusionExport.tsv.gz
+ gunzip CosmicFusionExport.tsv.gz
+ ''')
+
+
+rule load_local:
+ input: f'{DATA_DIR}/local/{{local}}.json'
+ container: CONTAINER
+ log: f'{LOGS_DIR}/local-{{local}}.logs.txt'
+ output: f'{DATA_DIR}/local-{{local}}.COMPLETE'
+ shell: 'node bin/load.js file ontology {input} &> {log}; cp {log} {output}'
+
+
+rule load_ncit:
+ input: expand(rules.load_local.output, local=['vocab']),
+ data=rules.download_ncit.output
+ container: CONTAINER
+ log: f'{LOGS_DIR}/ncit.logs.txt'
+ output: f'{DATA_DIR}/ncit.COMPLETE'
+ shell: 'node bin/load.js file ncit {input.data} &> {log}; cp {log} {output}'
+
+
+rule load_fda_srs:
+ input: expand(rules.load_local.output, local=['vocab']),
+ data=rules.download_fda_srs.output
+ container: CONTAINER
+ log: f'{LOGS_DIR}/fdaSrs.logs.txt'
+ output: f'{DATA_DIR}/fdaSrs.COMPLETE'
+ shell: 'node bin/load.js file fdaSrs {input.data} &> {log}; cp {log} {output}'
+
+
+rule load_ncit_fda:
+ input: rules.load_ncit.output,
+ rules.load_fda_srs.output,
+ data=rules.download_ncit_fda.output
+ container: CONTAINER
+ log: f'{LOGS_DIR}/ncitFdaXref.logs.txt'
+ output: f'{DATA_DIR}/ncitFdaXref.COMPLETE'
+ shell: 'node bin/load.js file ncitFdaXref {input.data} &> {log}; cp {log} {output}'
+
+
+rule load_refseq:
+ input: expand(rules.load_local.output, local=['vocab']),
+ data=rules.download_refseq.output
+ container: CONTAINER
+ log: f'{LOGS_DIR}/refseq.logs.txt'
+ output: f'{DATA_DIR}/refseq.COMPLETE'
+ shell: 'node bin/load.js file refseq {input.data} &> {log}; cp {log} {output}'
+
+
+rule load_ensembl:
+ input: rules.load_refseq.output,
+ data=rules.download_ensembl.output
+ container: CONTAINER
+ log: f'{LOGS_DIR}/ensembl.logs.txt'
+ output: f'{DATA_DIR}/ensembl.COMPLETE'
+ shell: 'node bin/load.js file ensembl {input.data} &> {log}; cp {log} {output}'
+
+
+rule load_do:
+ input: rules.load_ncit.output,
+ data=rules.download_do.output
+ container: CONTAINER
+ log: f'{LOGS_DIR}/do.logs.txt'
+ output: f'{DATA_DIR}/do.COMPLETE'
+ shell: 'node bin/load.js file diseaseOntology {input.data} &> {log}; cp {log} {output}'
+
+
+rule load_uberon:
+ input: rules.load_ncit.output,
+ data=rules.download_uberon.output
+ container: CONTAINER
+ log: f'{LOGS_DIR}/uberon.logs.txt'
+ output: f'{DATA_DIR}/uberon.COMPLETE'
+ shell: 'node bin/load.js file uberon {input.data} &> {log}; cp {log} {output}'
+
+
+rule load_drugbank:
+ input: rules.load_fda_srs.output,
+ data=rules.download_drugbank.output
+ container: CONTAINER
+ log: f'{LOGS_DIR}/drugbank.logs.txt'
+ output: f'{DATA_DIR}/drugbank.COMPLETE'
+ shell: 'node bin/load.js file drugbank {input.data} &> {log}; cp {log} {output}'
+
+
+rule load_oncotree:
+ input: rules.load_ncit.output
+ container: CONTAINER
+ log: f'{LOGS_DIR}/oncotree.logs.txt'
+ output: f'{DATA_DIR}/oncotree.COMPLETE'
+ shell: 'node bin/load.js api oncotree &> {log}; cp {log} {output}'
+
+
+rule load_dgidb:
+ input: rules.load_local.output
+ container: CONTAINER
+ log: f'{LOGS_DIR}/dgidb.logs.txt'
+ output: f'{DATA_DIR}/dgidb.COMPLETE'
+ shell: 'node bin/load.js api dgidb &> {log}; cp {log} {output}'
+
+
+def get_drug_inputs(wildcards):
+ inputs = [*rules.load_fda_srs.output, *rules.load_ncit.output]
+ container: CONTAINER
+ if USE_DRUGBANK:
+ inputs.append(*rules.load_drugbank.output)
+ return inputs
+
+
+rule all_drugs:
+ input: lambda wildcards: get_drug_inputs(wildcards)
+ container: CONTAINER
+ output: f'{LOGS_DIR}/all_drugs.COMPLETE'
+ shell: 'touch {output}'
+
+
+rule all_diseases:
+ input: rules.load_do.output,
+ rules.load_ncit.output,
+ rules.load_oncotree.output
+ container: CONTAINER
+ output: f'{LOGS_DIR}/all_diseases.COMPLETE'
+ shell: 'touch {output}'
+
+
+rule load_cancerhotspots:
+ input: expand(rules.load_local.output, local=['vocab', 'signatures', 'chromosomes']),
+ rules.load_oncotree.output,
+ rules.load_ensembl.output,
+ data=rules.download_cancerhotspots.output
+ container: CONTAINER
+ log: f'{LOGS_DIR}/cancerhotspots.logs.txt'
+ output: f'{DATA_DIR}/cancerhotspots.COMPLETE'
+ shell: 'node bin/load.js file cancerhotspots {input.data} &> {log}; cp {log} {output}'
+
+
+rule load_PMC4232638:
+ input: expand(rules.load_local.output, local=['vocab', 'signatures', 'chromosomes']),
+ data=rules.download_PMC4232638.output
+ container: CONTAINER
+ log: f'{LOGS_DIR}/PMC4232638.logs.txt'
+ output: f'{DATA_DIR}/PMC4232638.COMPLETE'
+ shell: 'node bin/load.js file PMC4232638 {input.data} &> {log}; cp {log} {output}'
+
+
+rule load_PMC4468049:
+ input: expand(rules.load_local.output, local=['vocab', 'signatures', 'chromosomes']),
+ rules.all_diseases.output,
+ data=rules.download_PMC4468049.output
+ container: CONTAINER
+ log: f'{LOGS_DIR}/PMC4468049.logs.txt'
+ output: f'{DATA_DIR}/PMC4468049.COMPLETE'
+ shell: 'node bin/load.js file PMC4468049 {input.data} &> {log}; cp {log} {output}'
+
+
+rule load_civic:
+ input: expand(rules.load_local.output, local=['vocab', 'signatures', 'chromosomes', 'evidenceLevels', 'aacr', 'asco']),
+ rules.load_ncit.output,
+ rules.load_do.output
+ container: CONTAINER
+ log: f'{LOGS_DIR}/civic.logs.txt'
+ output: f'{DATA_DIR}/civic.COMPLETE'
+ shell: 'node bin/load.js api civic &> {log}; cp {log} {output}'
+
+
+rule load_cgi:
+ input: expand(rules.load_local.output, local=['vocab', 'signatures', 'chromosomes', 'evidenceLevels']),
+ rules.all_diseases.output,
+ rules.all_drugs.output,
+ data=rules.download_cgi.output
+ container: CONTAINER
+ log: f'{LOGS_DIR}/cgi.logs.txt'
+ output: f'{DATA_DIR}/cgi.COMPLETE'
+ shell: 'node bin/load.js file cgi {input.data} &> {log}; cp {log} {output}'
+
+
+rule load_docm:
+ input: expand(rules.load_local.output, local=['vocab', 'signatures', 'chromosomes']),
+ rules.load_ncit.output,
+ rules.load_do.output
+ container: CONTAINER
+ log: f'{LOGS_DIR}/docm.logs.txt'
+ output: f'{DATA_DIR}/docm.COMPLETE'
+ shell: 'node bin/load.js api docm &> {log}; cp {log} {output}'
+
+
+rule load_approvals:
+ container: CONTAINER
+ log: f'{LOGS_DIR}/fdaApprovals.logs.txt'
+ output: f'{DATA_DIR}/fdaApprovals.COMPLETE'
+ shell: 'node bin/load.js api fdaApprovals &> {log}; cp {log} {output}'
+
+
+rule load_clinicaltrialsgov:
+ input: expand(rules.load_local.output, local=['vocab']),
+ rules.all_diseases.output,
+ rules.all_drugs.output,
+ data=rules.download_clinicaltrialsgov.output
+ container: CONTAINER
+ log: f'{LOGS_DIR}/clinicaltrialsgov.logs.txt'
+ output: f'{DATA_DIR}/clinicaltrialsgov.COMPLETE'
+ shell: 'node bin/load.js api clinicaltrialsgov &> {log}; cp {log} {output}'
+
+
+rule load_cosmic_resistance:
+ input: expand(rules.load_local.output, local=['vocab', 'chromosomes']),
+ rules.all_diseases.output,
+ rules.all_drugs.output,
+ main=rules.download_cosmic_resistance.output,
+ supp=rules.download_cosmic_diseases.output
+ container: CONTAINER
+ log: f'{LOGS_DIR}/cosmic_resistance.logs.txt'
+ output: f'{DATA_DIR}/cosmic_resistance.COMPLETE'
+ shell: 'node bin/load.js cosmic resistance {input.main} {input.supp} &> {log}; cp {log} {output}'
+
+
+rule load_cosmic_fusions:
+ input: rules.all_diseases.output,
+ main=rules.download_cosmic_fusions.output,
+ supp=rules.download_cosmic_diseases.output
+ container: CONTAINER
+ log: f'{LOGS_DIR}/cosmic_fusions.logs.txt'
+ output: f'{DATA_DIR}/cosmic_fusions.COMPLETE'
+ shell: 'node bin/load.js cosmic fusions {input.main} {input.supp} &> {log}; cp {log} {output}'
diff --git a/bin/load.js b/bin/load.js
index 0eb20678..a73f9b31 100644
--- a/bin/load.js
+++ b/bin/load.js
@@ -18,13 +18,14 @@ const drugbank = require('../src/drugbank');
const ensembl = require('../src/ensembl');
const fdaSrs = require('../src/fdaSrs');
const gscTherapeuticOntology = require('../src/gscTherapeuticOntology');
-const iprkb = require('../src/iprkb');
const ncit = require('../src/ncit');
const ncitFdaXref = require('../src/ncit/ncitFdaXref');
const ontology = require('../src/ontology');
const refseq = require('../src/refseq');
-const tcgaFusions = require('../src/tcgaFusions');
+const PMC4468049 = require('../src/PMC4468049');
+const PMC4232638 = require('../src/PMC4232638');
const uberon = require('../src/uberon');
+const variants = require('../src/variants');
const clinicaltrialsgov = require('../src/clinicaltrialsgov');
@@ -36,6 +37,8 @@ const API_MODULES = {
};
const FILE_MODULES = {
+ PMC4232638,
+ PMC4468049,
cancerhotspots,
cgi,
cgl,
@@ -45,13 +48,12 @@ const FILE_MODULES = {
ensembl,
fdaSrs,
gscTherapeuticOntology,
- iprkb,
ncit,
ncitFdaXref,
ontology,
refseq,
- tcgaFusions,
uberon,
+ variants,
};
const COSMIC_MODULES = {
diff --git a/data/aacr.json b/data/aacr.json
index e414da76..33f0e0fe 100644
--- a/data/aacr.json
+++ b/data/aacr.json
@@ -1,10 +1,12 @@
{
"class": "Abstract",
- "source": {
- "displayName": "AACR",
- "longName": "American Association for Cancer Research",
- "name": "aacr",
- "url": "https://aacrjournals.org"
+ "sources": {
+ "default": {
+ "displayName": "AACR",
+ "longName": "American Association for Cancer Research",
+ "name": "aacr",
+ "url": "https://aacrjournals.org"
+ }
},
"records": {
"Proceedings: AACR 102nd Annual Meeting 2011‐‐ Apr 2‐6, 2011; Orlando, FL Abstract#4192": {
@@ -258,4 +260,4 @@
"displayName": "AACR 2017 (abstract CT152)"
}
}
-}
\ No newline at end of file
+}
diff --git a/data/asco.json b/data/asco.json
new file mode 100644
index 00000000..a1101e26
--- /dev/null
+++ b/data/asco.json
@@ -0,0 +1,421 @@
+{
+ "class": "Abstract",
+ "sources": {
+ "default": {
+ "displayName": "ASCO",
+ "longName": "American Society of Clinical Oncology",
+ "name": "asco",
+ "url": "https://meetinglibrary.asco.org"
+ }
+ },
+ "records": {
+ "2011 ASCO Annual Meeting Abstract#10006": {
+ "url": "https://meetinglibrary.asco.org/record/62790",
+ "year": "2011",
+ "name": "A phase II study of dasatinib for patients with imatinib-resistant gastrointestinal stromal tumor (GIST).",
+ "abstractNumber": "10006",
+ "meeting": "2011 ASCO Annual Meeting",
+ "displayName": "ASCO 2011 (abstract 10006)"
+ },
+ "2011 ASCO Annual Meeting Abstract#10009": {
+ "url": "https://meetinglibrary.asco.org/record/63320",
+ "year": "2011",
+ "name": "Sorafenib (SOR) in patients (pts) with imatinib (IM) and sunitinib (SU)-resistant (RES) gastrointestinal stromal tumors (GIST): Final results of a University of Chicago Phase II Consortium trial.",
+ "abstractNumber": "10009",
+ "meeting": "2011 ASCO Annual Meeting",
+ "displayName": "ASCO 2011 (abstract 10009)"
+ },
+ "2013 ASCO Annual Meeting Abstract#2500": {
+ "url": "https://meetinglibrary.asco.org/record/82444/abstract",
+ "year": "2013",
+ "name": "A first-in-human phase I study of the CDK4/6 inhibitor, LY2835219, for patients with advanced cancer.",
+ "abstractNumber": "2500",
+ "meeting": "2013 ASCO Annual Meeting",
+ "displayName": "ASCO 2013 (abstract 2500)"
+ },
+ "2013 ASCO Annual Meeting Abstract#2532": {
+ "url": "https://meetinglibrary.asco.org/record/85566",
+ "year": "2013",
+ "name": "A pilot study of sirolimus (S) in subjects with Cowden syndrome (CS) with germ-line mutations in PTEN.",
+ "abstractNumber": "2532",
+ "meeting": "2013 ASCO Annual Meeting",
+ "displayName": "ASCO 2013 (abstract 2532)"
+ },
+ "2013 ASCO Annual Meeting Abstract#2605": {
+ "url": "https://meetinglibrary.asco.org/record/82827",
+ "year": "2013",
+ "name": "Phase Ib dose-escalation trial of the AKT inhibitor (AKTi) MK2206 in combination with paclitaxel (P) and trastuzumab (H) in patients (pts) with HER2-overexpressing (HER2+) cancer.",
+ "abstractNumber": "2605",
+ "meeting": "2013 ASCO Annual Meeting",
+ "displayName": "ASCO 2013 (abstract 2605)"
+ },
+ "2013 ASCO Annual Meeting Abstract#8023": {
+ "url": "https://meetinglibrary.asco.org/record/82496",
+ "year": "2013",
+ "name": "NTRK1 gene fusions as a novel oncogene target in lung cancer.",
+ "abstractNumber": "8023",
+ "meeting": "2013 ASCO Annual Meeting",
+ "displayName": "ASCO 2013 (abstract 8023)"
+ },
+ "2013 ASCO Annual Meeting Abstract#9029": {
+ "url": "https://meetinglibrary.asco.org/record/80857",
+ "year": "2013",
+ "name": "Preliminary results from a phase Ib/II, open-label, dose-escalation study of the oral BRAF inhibitor LGX818 in combination with the oral MEK1/2 inhibitor MEK162 in BRAF V600-dependent advanced solid tumors.",
+ "abstractNumber": "9029",
+ "meeting": "2013 ASCO Annual Meeting",
+ "displayName": "ASCO 2013 (abstract 9029)"
+ },
+ "2013 ASCO Annual Meeting Abstract#CRA9003": {
+ "url": "https://meetinglibrary.asco.org/record/80820",
+ "year": "2013",
+ "name": "Phase II study of selumetinib (sel) versus temozolomide (TMZ) in gnaq/Gna11 (Gq/11) mutant (mut) uveal melanoma (UM).",
+ "abstractNumber": "CRA9003",
+ "meeting": "2013 ASCO Annual Meeting",
+ "displayName": "ASCO 2013 (abstract CRA9003)"
+ },
+ "2014 ASCO Annual Meeting Abstract#10018": {
+ "url": "https://meetinglibrary.asco.org/record/92029",
+ "year": "2014",
+ "name": "Phase I study of the MEK1/2 inhibitor selumetinib (AZD6244) hydrogen sulfate in children and young adults with neurofibromatosis type 1 (NF1) and inoperable plexiform neurofibromas (PNs).",
+ "abstractNumber": "10018",
+ "meeting": "2014 ASCO Annual Meeting",
+ "displayName": "ASCO 2014 (abstract 10018)"
+ },
+ "2014 ASCO Annual Meeting Abstract#2514": {
+ "url": "https://meetinglibrary.asco.org/record/94866",
+ "year": "2014",
+ "name": "A phase I/II, first-in-human dose-escalation study of GSK2636771 in patients (pts) with PTEN-deficient advanced tumors.",
+ "abstractNumber": "2514",
+ "meeting": "2014 ASCO Annual Meeting",
+ "displayName": "ASCO 2014 (abstract 2514)"
+ },
+ "2014 ASCO Annual Meeting Abstract#2528": {
+ "url": "https://meetinglibrary.asco.org/record/94422",
+ "year": "2014",
+ "name": "A phase I study of the single-agent CDK4/6 inhibitor LEE011 in pts with advanced solid tumors and lymphomas.",
+ "abstractNumber": "2528",
+ "meeting": "2014 ASCO Annual Meeting",
+ "displayName": "ASCO 2014 (abstract 2528)"
+ },
+ "2014 ASCO Annual Meeting Abstract#3515": {
+ "url": "https://meetinglibrary.asco.org/record/94751",
+ "year": "2014",
+ "name": "Efficacy and tolerability in an open-label phase I/II study of MEK inhibitor trametinib (T), BRAF inhibitor dabrafenib (D), and anti-EGFR antibody panitumumab (P) in combination in patients (pts) with BRAF V600E mutated colorectal cancer (CRC).",
+ "abstractNumber": "3515",
+ "meeting": "2014 ASCO Annual Meeting",
+ "displayName": "ASCO 2014 (abstract 3515)"
+ },
+ "2014 ASCO Annual Meeting Abstract#8001": {
+ "url": "https://meetinglibrary.asco.org/record/92507",
+ "year": "2014",
+ "name": "Efficacy and safety of crizotinib in patients with advanced c-MET-amplified non-small cell lung cancer (NSCLC).",
+ "abstractNumber": "8001",
+ "meeting": "2014 ASCO Annual Meeting",
+ "displayName": "ASCO 2014 (abstract 8001)"
+ },
+ "2014 ASCO Annual Meeting Abstract#8009": {
+ "url": "https://meetinglibrary.asco.org/record/92346",
+ "year": "2014",
+ "name": "Clinical activity of the mutant-selective EGFR inhibitor AZD9291 in patients (pts) with EGFR inhibitor–resistant non-small cell lung cancer (NSCLC).",
+ "abstractNumber": "8009",
+ "meeting": "2014 ASCO Annual Meeting",
+ "displayName": "ASCO 2014 (abstract 8009)"
+ },
+ "2014 ASCO Annual Meeting Abstract#8015": {
+ "url": "https://meetinglibrary.asco.org/record/92532",
+ "year": "2014",
+ "name": "Phase II study of the AKT inhibitor MK-2206 plus erlotinib (E) in patients (pts) with advanced non-small cell lung cancer (NSCLC) who progressed on prior erlotinib: A California Cancer Consortium Phase II trial (NCI 8698).",
+ "abstractNumber": "8015",
+ "meeting": "2014 ASCO Annual Meeting",
+ "displayName": "ASCO 2014 (abstract 8015)"
+ },
+ "2015 ASCO Annual Meeting Abstract#1003": {
+ "url": "https://meetinglibrary.asco.org/record/109828",
+ "year": "2015",
+ "name": "Results from a phase 2 study of enzalutamide (ENZA), an androgen receptor (AR) inhibitor, in advanced AR+ triple-negative breast cancer (TNBC).",
+ "abstractNumber": "1003",
+ "meeting": "2015 ASCO Annual Meeting",
+ "displayName": "ASCO 2015 (abstract 1003)"
+ },
+ "2015 ASCO Annual Meeting Abstract#10517": {
+ "url": "https://meetinglibrary.asco.org/record/112012",
+ "year": "2015",
+ "name": "Detection of KIT mutants in circulating tumor DNA (ctDNA) and their association with ponatinib anti-tumor activity in patients (pts) with advanced gastrointestinal stromal tumors (GIST).",
+ "abstractNumber": "10517",
+ "meeting": "2015 ASCO Annual Meeting",
+ "displayName": "ASCO 2015 (abstract 10517)"
+ },
+ "2015 ASCO Annual Meeting Abstract#11010": {
+ "url": "https://meetinglibrary.asco.org/record/111857",
+ "year": "2015",
+ "name": "Next-generation sequencing to reveal somatic mutations that confer sensitivity to everolimus.",
+ "abstractNumber": "11010",
+ "meeting": "2015 ASCO Annual Meeting",
+ "displayName": "ASCO 2015 (abstract 11010)"
+ },
+ "2015 ASCO Annual Meeting Abstract#11075": {
+ "url": "https://meetinglibrary.asco.org/record/111332",
+ "year": "2015",
+ "name": "A phase I, first-in-human dose study of the dual PI3K/mTOR inhibitor LY3023414 (LY) in patients (pts) with advanced cancer.",
+ "abstractNumber": "11075",
+ "meeting": "2015 ASCO Annual Meeting",
+ "displayName": "ASCO 2015 (abstract 11075)"
+ },
+ "2015 ASCO Annual Meeting Abstract#2500": {
+ "url": "https://meetinglibrary.asco.org/record/109086",
+ "year": "2015",
+ "name": "A Pharmacokinetically and Pharmacodynamically Driven Phase I Trial of the Pan-AKT Inhibitor AZD5363 with Expansion Cohorts in PIK3CA Mutant Breast and Gynecological Cancers",
+ "abstractNumber": "2500",
+ "meeting": "2015 ASCO Annual Meeting",
+ "displayName": "ASCO 2015 (abstract 2500)"
+ },
+ "2015 ASCO Annual Meeting Abstract#2501": {
+ "url": "https://meetinglibrary.asco.org/record/109089",
+ "year": "2015",
+ "name": "First-in-Human, Phase I, Dose-Escalation Study of Selective PI3Ka Isoform Inhibitor MLN1117 in Patients with Advanced Solid Malignancies",
+ "abstractNumber": "2501",
+ "meeting": "2015 ASCO Annual Meeting",
+ "displayName": "ASCO 2015 (abstract 2501)"
+ },
+ "2015 ASCO Annual Meeting Abstract#2508": {
+ "url": "https://meetinglibrary.asco.org/record/109100",
+ "year": "2015",
+ "name": "Phase II Multicenter Proof of Concept Study of AZD4547 in FGFR Amplified Tumours",
+ "abstractNumber": "2508",
+ "meeting": "2015 ASCO Annual Meeting",
+ "displayName": "ASCO 2015 (abstract 2508)"
+ },
+ "2015 ASCO Annual Meeting Abstract#2516": {
+ "url": "https://meetinglibrary.asco.org/record/112038",
+ "year": "2015",
+ "name": "Genomic mutation profiling (GMP) and clinical outcome of patients treated with buparlisib (PI3K inhibitor) in the “Signature” program.",
+ "abstractNumber": "2516",
+ "meeting": "2015 ASCO Annual Meeting",
+ "displayName": "ASCO 2015 (abstract 2516)"
+ },
+ "2015 ASCO Annual Meeting Abstract#3508": {
+ "url": "https://meetinglibrary.asco.org/record/112091",
+ "year": "2015",
+ "name": "Trastuzumab and lapatinib in HER2-amplified metastatic colorectal cancer patients (mCRC): The HERACLES trial.",
+ "abstractNumber": "3508",
+ "meeting": "2015 ASCO Annual Meeting",
+ "displayName": "ASCO 2015 (abstract 3508)"
+ },
+ "2015 ASCO Annual Meeting Abstract#4119": {
+ "url": "https://meetinglibrary.asco.org/record/108962",
+ "year": "2015",
+ "name": "SWOG S1115: Randomized phase II trial of selumetinib (AZD6244; ARRY 142886) hydrogen sulfate (NSC-748727) and MK-2206 (NSC-749607) vs. mFOLFOX in pretreated patients (Pts) with metastatic pancreatic cancer.",
+ "abstractNumber": "4119",
+ "meeting": "2015 ASCO Annual Meeting",
+ "displayName": "ASCO 2015 (abstract 4119)"
+ },
+ "2015 ASCO Annual Meeting Abstract#5508": {
+ "url": "https://meetinglibrary.asco.org/record/109476",
+ "year": "2015",
+ "name": "Results of ARIEL2: a Phase 2 trial to prospectively identify ovarian cancer patients likely to respond to rucaparib using tumor genetic analysis.",
+ "abstractNumber": "5508",
+ "meeting": "2015 ASCO Annual Meeting",
+ "displayName": "ASCO 2015 (abstract 5508)"
+ },
+ "2015 ASCO Annual Meeting Abstract#e15516": {
+ "url": "https://meetinglibrary.asco.org/record/110379",
+ "year": "2015",
+ "name": "Association of HER2 and ErbB3 molecular alterations with afatinib sensitivity in platinum-refractory metastatic urothelial carcinoma (UC) in a phase II trial.",
+ "abstractNumber": "e15516",
+ "meeting": "2015 ASCO Annual Meeting",
+ "displayName": "ASCO 2015 (abstract e15516)"
+ },
+ "2015 ASCO Annual Meeting Abstract#e19028": {
+ "url": "https://meetinglibrary.asco.org/record/114718",
+ "year": "2015",
+ "name": "A Phase II study to evaluate the efficacy of erlotinib in advanced NSCLC patients who have wild-type EGFR and EGFR gene amplification.",
+ "abstractNumber": "e19028",
+ "meeting": "2015 ASCO Annual Meeting",
+ "displayName": "ASCO 2015 (abstract e19028)"
+ },
+ "2015 ASCO Annual Meeting Abstract#11091": {
+ "url": "https://meetinglibrary.asco.org/record/111274",
+ "year": "2015",
+ "name": "Investigation of non-V600 BRAF mutations commonly found in NSCLC for their sensitivity to dabrafenib or trametinib.",
+ "abstractNumber": "11091",
+ "meeting": "2015 ASCO Annual Meeting",
+ "displayName": "ASCO 2015 (abstract 11091)"
+ },
+ "2016 ASCO Annual Meeting Abstract#10555": {
+ "url": "https://meetinglibrary.asco.org/record/123089",
+ "year": "2016",
+ "name": "Dose-finding study of vinblastine in combination with nilotinib in children, adolescents and young adults with refractory or recurrent low-grade glioma: Results of the ITCC/SIOPE-Brain VINILO phase I trial (NCT01887522).",
+ "abstractNumber": "10555",
+ "meeting": "2016 ASCO Annual Meeting",
+ "displayName": "ASCO 2016 (abstract 10555)"
+ },
+ "2016 ASCO Annual Meeting Abstract#11010": {
+ "url": "https://meetinglibrary.asco.org/record/123163",
+ "year": "2016",
+ "name": "Dose escalating study of crenolanib besylate in advanced GIST patients with PDGFRA D842V activating mutations.",
+ "abstractNumber": "11010",
+ "meeting": "2016 ASCO Annual Meeting",
+ "displayName": "ASCO 2016 (abstract 11010)"
+ },
+ "2016 ASCO Annual Meeting Abstract#11053": {
+ "url": "https://meetinglibrary.asco.org/record/123172",
+ "year": "2016",
+ "name": "SARC016: Phase II study of everolimus in combination with bevacizumab in sporadic and neurofibromatosis type 1 (NF1) related refractory malignant peripheral nerve sheath tumors (MPNST).",
+ "abstractNumber": "11053",
+ "meeting": "2016 ASCO Annual Meeting",
+ "displayName": "ASCO 2016 (abstract 11053)"
+ },
+ "2016 ASCO Annual Meeting Abstract#2019": {
+ "url": "https://meetinglibrary.asco.org/record/125346",
+ "year": "2016",
+ "name": "Phase II part of EORTC study 26101: The sequence of bevacizumab and lomustine in patients with first recurrence of a glioblastoma.",
+ "abstractNumber": "2019",
+ "meeting": "2016 ASCO Annual Meeting",
+ "displayName": "ASCO 2016 (abstract 2019)"
+ },
+ "2016 ASCO Annual Meeting Abstract#2558": {
+ "url": "https://meetinglibrary.asco.org/record/125729",
+ "year": "2016",
+ "name": "A phase 1 study of AR-42 in patients with advanced solid tumors, including nervous system tumors.",
+ "abstractNumber": "2558",
+ "meeting": "2016 ASCO Annual Meeting",
+ "displayName": "ASCO 2016 (abstract 2558)"
+ },
+ "2016 ASCO Annual Meeting Abstract#9067": {
+ "url": "https://meetinglibrary.asco.org/record/123470",
+ "year": "2016",
+ "name": "Phase (Ph) I study of the safety and efficacy of the cMET inhibitor capmatinib (INC280) in patients (pts) with advanced cMET+ non-small cell lung cancer (NSCLC).",
+ "abstractNumber": "9067",
+ "meeting": "2016 ASCO Annual Meeting",
+ "displayName": "ASCO 2016 (abstract 9067)"
+ },
+ "2016 ASCO Annual Meeting Abstract#2581": {
+ "url": "https://meetinglibrary.asco.org/record/125736",
+ "year": "2016",
+ "name": "A phase 1 study of the MDM2 inhibitor DS-3032b in patients (pts) with advanced solid tumors and lymphomas.",
+ "abstractNumber": "2581",
+ "meeting": "2016 ASCO Annual Meeting",
+ "displayName": "ASCO 2016 (abstract 2581)"
+ },
+ "2016 ASCO Annual Meeting Abstract#520": {
+ "url": "https://meetinglibrary.asco.org/record/124326",
+ "year": "2016",
+ "name": "A phase II study of the PI3K inhibitor taselisib (GDC-0032) combined with fulvestrant (F) in patients (pts) with HER2-negative (HER2-), hormone receptor-positive (HR+) advanced breast cancer (BC).",
+ "abstractNumber": "520",
+ "meeting": "2016 ASCO Annual Meeting",
+ "displayName": "ASCO 2016 (abstract 520)"
+ },
+ "2017 ASCO Annual Meeting Abstract#2500": {
+ "url": "https://meetinglibrary.asco.org/record/144575",
+ "year": "2017",
+ "name": "Debio 1347, an oral FGFR inhibitor: Results from a first-in-human, phase I dose-escalation study in patients with FGFR genomically activated advanced solid tumors.",
+ "abstractNumber": "2500",
+ "meeting": "2017 ASCO Annual Meeting",
+ "displayName": "ASCO 2017 (abstract 2500)"
+ },
+ "2017 ASCO Annual Meeting Abstract#2508": {
+ "url": "https://meetinglibrary.asco.org/record/144577",
+ "year": "2017",
+ "name": "First-in-class oral ERK1/2 inhibitor Ulixertinib (BVD-523) in patients with advanced solid tumors: Final results of a phase I dose escalation and expansion study.",
+ "abstractNumber": "2508",
+ "meeting": "2017 ASCO Annual Meeting",
+ "displayName": "ASCO 2017 (abstract 2508)"
+ },
+ "2017 ASCO Annual Meeting Abstract#2572": {
+ "url": "https://meetinglibrary.asco.org/record/149359",
+ "year": "2017",
+ "name": "Investigating novel resistance mechanisms to third generation EGFR TKI osimertinib in non-small cell lung cancer patients using next generation sequencing.",
+ "abstractNumber": "2572",
+ "meeting": "2017 ASCO Annual Meeting",
+ "displayName": "ASCO 2017 (abstract 2572)"
+ },
+ "2017 ASCO Annual Meeting Abstract#8510": {
+ "url": "https://meetinglibrary.asco.org/record/145463",
+ "year": "2017",
+ "name": "Ado-trastuzumab emtansine in patients with HER2 mutant lung cancers: Results from a phase II basket trial.",
+ "abstractNumber": "8510",
+ "meeting": "2017 ASCO Annual Meeting",
+ "displayName": "ASCO 2017 (abstract 8510)"
+ },
+ "2017 ASCO Annual Meeting Abstract#9054": {
+ "url": "https://meetinglibrary.asco.org/record/152443",
+ "year": "2017",
+ "name": "A phase II study of GDC-0032 (taselisib) for previously treated PI3K positive patients with stage IV squamous cell lung cancer (SqNSCLC): LUNG-MAP sub-study SWOG S1400B.",
+ "abstractNumber": "9054",
+ "meeting": "2017 ASCO Annual Meeting",
+ "displayName": "ASCO 2017 (abstract 9054)"
+ },
+ "2017 ASCO Annual Meeting Abstract#9056": {
+ "url": "https://meetinglibrary.asco.org/record/145758",
+ "year": "2017",
+ "name": "A phase II study of palbociclib (P) for previously treated cell cycle gene alteration positive patients (pts) with stage IV squamous cell lung cancer (SCC): Lung-MAP sub-study SWOG S1400C.",
+ "abstractNumber": "9056",
+ "meeting": "2017 ASCO Annual Meeting",
+ "displayName": "ASCO 2017 (abstract 9056)"
+ },
+ "2017 ASCO Annual Meeting Abstract#9062": {
+ "url": "https://meetinglibrary.asco.org/record/152621",
+ "year": "2017",
+ "name": "Response of germline and somatic smoothened (SMO) mutations in non-small cell lung cancer (NSCLC) to hedgehog inhibitor vismodegib.",
+ "abstractNumber": "9062",
+ "meeting": "2017 ASCO Annual Meeting",
+ "displayName": "ASCO 2017 (abstract 9062)"
+ },
+ "2017 ASCO Annual Meeting Abstract#9065": {
+ "url": "https://meetinglibrary.asco.org/record/145774",
+ "year": "2017",
+ "name": "Activity of brigatinib (BRG) in crizotinib (CRZ)-resistant ALK+ NSCLC patients (pts) according to ALK plasma mutation status.",
+ "abstractNumber": "9065",
+ "meeting": "2017 ASCO Annual Meeting",
+ "displayName": "ASCO 2017 (abstract 9065)"
+ },
+ "2017 ASCO Annual Meeting Abstract#9072": {
+ "url": "https://meetinglibrary.asco.org/record/145735",
+ "year": "2017",
+ "name": "BRAF fusions in clinically advanced non-small cell lung cancer: An emerging target for anti-BRAF therapies.",
+ "abstractNumber": "9072",
+ "meeting": "2017 ASCO Annual Meeting",
+ "displayName": "ASCO 2017 (abstract 9072)"
+ },
+ "2017 ASCO Annual Meeting Abstract#e23150": {
+ "url": "https://meetinglibrary.asco.org/record/146441",
+ "year": "2017",
+ "name": "In vitro functional analysis of HER2 variants in lung cancers to evaluate their oncogenic activity and predict clinical response to HER2 targeted therapies.",
+ "abstractNumber": "e23150",
+ "meeting": "2017 ASCO Annual Meeting",
+ "displayName": "ASCO 2017 (abstract e23150)"
+ },
+ "2017 ASCO Annual Meeting Abstract#9519": {
+ "url": "https://meetinglibrary.asco.org/record/147511",
+ "year": "2017",
+ "name": "Phase 1b/2 trial of ribociclib+binimetinib in metastatic NRAS-mutant melanoma: Safety, efficacy, and recommended phase 2 dose (RP2D).",
+ "abstractNumber": "9519",
+ "meeting": "2017 ASCO Annual Meeting",
+ "displayName": "ASCO 2017 (abstract 9519)"
+ },
+ "2018 ASCO Annual Meeting Abstract#4503": {
+ "url": "https://meetinglibrary.asco.org/record/160559",
+ "year": "2018",
+ "name": "First results from the primary analysis population of the phase 2 study of erdafitinib (ERDA; JNJ-42756493) in patients (pts) with metastatic or unresectable urothelial carcinoma (mUC) and FGFR alterations (FGFRalt).",
+ "abstractNumber": "4503",
+ "meeting": "2018 ASCO Annual Meeting",
+ "displayName": "ASCO 2018 (abstract 4503)"
+ },
+ "2018 ASCO Annual Meeting Abstract#102": {
+ "url": "https://meetinglibrary.asco.org/record/161573",
+ "year": "2018",
+ "name": "A phase 1 study of LOXO-292, a potent and highly selective RET inhibitor, in patients with RET-altered cancers.",
+ "abstractNumber": "102",
+ "meeting": "2018 ASCO Annual Meeting",
+ "displayName": "ASCO 2018 (abstract 102)"
+ },
+ "2018 ASCO Annual Meeting Abstract#TPS7081": {
+ "url": "https://meetinglibrary.asco.org/record/165501",
+ "year": "2018",
+ "name": "Clinical development of asciminib (ABL001) in chronic myeloid leukemia (CML): A randomized phase 3 study vs. bosutinib.",
+ "abstractNumber": "TPS7081",
+ "meeting": "2018 ASCO Annual Meeting",
+ "displayName": "ASCO 2018 (abstract TPS7081)"
+ }
+ }
+}
diff --git a/data/evidenceLevels.json b/data/evidenceLevels.json
index 51ea95f6..80758403 100644
--- a/data/evidenceLevels.json
+++ b/data/evidenceLevels.json
@@ -452,6 +452,42 @@
"sourceId": "e5",
"url": "https://civicdb.org/glossary"
},
+ "cosmic-1": {
+ "description": "Approved marketed drug with demonstrated efficacy at the mutation",
+ "displayName": "COSMIC-1",
+ "source": "cosmic",
+ "sourceId": "1"
+ },
+ "cosmic-2": {
+ "description": "Phase 2/3 clinical results meet primary outcome measures",
+ "displayName": "COSMIC-2",
+ "source": "cosmic",
+ "sourceId": "2"
+ },
+ "cosmic-3": {
+ "description": "Drug in ongoing clinical trials",
+ "displayName": "COSMIC-3",
+ "source": "cosmic",
+ "sourceId": "3"
+ },
+ "cosmic-4": {
+ "description": "Case studies",
+ "displayName": "COSMIC-4",
+ "source": "cosmic",
+ "sourceId": "4"
+ },
+ "cosmic-6": {
+ "description": "Use dependent on test for another mutation",
+ "displayName": "COSMIC-6",
+ "source": "cosmic",
+ "sourceId": "6"
+ },
+ "cosmic-7": {
+ "description": "Trial results all negative",
+ "displayName": "COSMIC-7",
+ "source": "cosmic",
+ "sourceId": "7"
+ },
"ipr-a": {
"description": "Evidence pertaining to biomarkers associated with FDA-approved therapies or professional guidelines for this tumour type",
"displayName": "IPR-A",
@@ -680,6 +716,13 @@
"url": "https://civicdb.org",
"usage": "https://creativecommons.org/publicdomain/zero/1.0"
},
+ "cosmic": {
+ "description": "COSMIC, the Catalogue Of Somatic Mutations In Cancer, is the world's largest and most comprehensive resource for exploring the impact of somatic mutations in human cancer.",
+ "displayName": "COSMIC",
+ "name": "cosmic",
+ "url": "https://cancer.sanger.ac.uk/cosmic",
+ "usage": "https://cancer.sanger.ac.uk/cosmic/license"
+ },
"cpic": {
"citation": "https://cpicpgx.org/publications",
"description": "the clinical pharmacogenetics implementation consortium (cpic®) is an international consortium of individual volunteers and a small dedicated staff who are interested in facilitating use of pharmacogenetic tests for patient care. cpic guidelines are indexed in pubmed as clinical guidelines, endorsed by ashp and ascpt, and referenced in clingen and pharmgkb",
diff --git a/docs/basic_workflow.png b/docs/basic_workflow.png
new file mode 100644
index 00000000..f760b73a
Binary files /dev/null and b/docs/basic_workflow.png differ
diff --git a/docs/full_workflow.png b/docs/full_workflow.png
new file mode 100644
index 00000000..aab6808e
Binary files /dev/null and b/docs/full_workflow.png differ
diff --git a/package-lock.json b/package-lock.json
index ac200db5..1096b450 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "@bcgsc-pori/graphkb-loader",
- "version": "5.0.0",
+ "version": "5.1.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -691,11 +691,11 @@
}
},
"@babel/runtime": {
- "version": "7.4.4",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.4.4.tgz",
- "integrity": "sha512-w0+uT71b6Yi7i5SE0co4NioIpSYS6lLiXvCzWzGSKvpK5vdQtCbICHMj+gbAKAOtxiV6HsVh/MBdaF9EQ6faSg==",
+ "version": "7.13.10",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.13.10.tgz",
+ "integrity": "sha512-4QPkjJq6Ns3V/RgpEahRk+AGfL0eO6RHHtTWoNNr5mO49G6B5+X6d6THgWEAvTrznU5xYpbAlVKRYcsCgh/Akw==",
"requires": {
- "regenerator-runtime": "^0.13.2"
+ "regenerator-runtime": "^0.13.4"
}
},
"@babel/template": {
@@ -1303,6 +1303,63 @@
"@types/yargs": "^12.0.9"
}
},
+ "@peculiar/asn1-schema": {
+ "version": "2.0.27",
+ "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.0.27.tgz",
+ "integrity": "sha512-1tIx7iL3Ma3HtnNS93nB7nhyI0soUJypElj9owd4tpMrRDmeJ8eZubsdq1sb0KSaCs5RqZNoABCP6m5WtnlVhQ==",
+ "requires": {
+ "@types/asn1js": "^2.0.0",
+ "asn1js": "^2.0.26",
+ "pvtsutils": "^1.1.1",
+ "tslib": "^2.0.3"
+ },
+ "dependencies": {
+ "tslib": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz",
+ "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w=="
+ }
+ }
+ },
+ "@peculiar/json-schema": {
+ "version": "1.1.12",
+ "resolved": "https://registry.npmjs.org/@peculiar/json-schema/-/json-schema-1.1.12.tgz",
+ "integrity": "sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==",
+ "requires": {
+ "tslib": "^2.0.0"
+ },
+ "dependencies": {
+ "tslib": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz",
+ "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w=="
+ }
+ }
+ },
+ "@peculiar/webcrypto": {
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/@peculiar/webcrypto/-/webcrypto-1.1.6.tgz",
+ "integrity": "sha512-xcTjouis4Y117mcsJslWAGypwhxtXslkVdRp7e3tHwtuw0/xCp1te8RuMMv/ia5TsvxomcyX/T+qTbRZGLLvyA==",
+ "requires": {
+ "@peculiar/asn1-schema": "^2.0.27",
+ "@peculiar/json-schema": "^1.1.12",
+ "pvtsutils": "^1.1.2",
+ "tslib": "^2.1.0",
+ "webcrypto-core": "^1.2.0"
+ },
+ "dependencies": {
+ "tslib": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz",
+ "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w=="
+ }
+ }
+ },
+ "@sinonjs/text-encoding": {
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz",
+ "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ=="
+ },
"@solid/cli": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/@solid/cli/-/cli-0.1.1.tgz",
@@ -1381,41 +1438,55 @@
}
},
"@solid/oidc-rp": {
- "version": "0.8.0",
- "resolved": "https://registry.npmjs.org/@solid/oidc-rp/-/oidc-rp-0.8.0.tgz",
- "integrity": "sha512-AAHd+J1IiASDmqDQkU8ou8Gxmc7+VfpcgGFW1rCul/obCsNzSemwvEslxjstK7Yy725HtucoAbZN2BGKujeQAg==",
+ "version": "0.11.5",
+ "resolved": "https://registry.npmjs.org/@solid/oidc-rp/-/oidc-rp-0.11.5.tgz",
+ "integrity": "sha512-b/Vkkrp1aKi/u5mCdDfIxwIknRG6oKgx5hzTCHuqGzmZKNkZos1EAQGSrxLtyNUFKKO0ipdXmUfOALOLrf2vVw==",
"requires": {
- "@solid/jose": "0.1.8",
- "@trust/json-document": "^0.1.4",
- "@trust/webcrypto": "0.9.2",
- "base64url": "^3.0.0",
- "node-fetch": "^2.1.2",
+ "@solid/jose": "^0.6.5",
+ "assert": "^2.0.0",
+ "base64url": "^3.0.1",
+ "node-fetch": "^2.6.1",
"standard-http-error": "^2.0.1",
- "text-encoding": "^0.6.4",
- "whatwg-url": "^6.4.1"
+ "whatwg-url": "^8.4.0"
},
"dependencies": {
- "@trust/webcrypto": {
- "version": "0.9.2",
- "resolved": "https://registry.npmjs.org/@trust/webcrypto/-/webcrypto-0.9.2.tgz",
- "integrity": "sha512-5iMAVcGYKhqLJGjefB1nzuQSqUJTru0nG4CytpBT/GGp1Piz/MVnj2jORdYf4JBYzggCIa8WZUr2rchP2Ngn/w==",
+ "@solid/jose": {
+ "version": "0.6.5",
+ "resolved": "https://registry.npmjs.org/@solid/jose/-/jose-0.6.5.tgz",
+ "integrity": "sha512-EkEw47sxXu/r0KQFqa7FmpXJWAiHOWsQXdUxxuzgPWF2kcblLDl4VOAwIh5lfq8MhG4+GZJHSPeRdkZgcE85+g==",
"requires": {
- "@trust/keyto": "^0.3.4",
- "base64url": "^3.0.0",
- "elliptic": "^6.4.0",
- "node-rsa": "^0.4.0",
- "text-encoding": "^0.6.1"
+ "@sinonjs/text-encoding": "^0.7.1",
+ "base64url": "^3.0.1",
+ "isomorphic-webcrypto": "^2.3.6"
}
},
- "base64url": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz",
- "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A=="
- },
"node-fetch": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
"integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw=="
+ },
+ "tr46": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.0.2.tgz",
+ "integrity": "sha512-3n1qG+/5kg+jrbTzwAykB5yRYtQCTqOGKq5U5PE3b0a1/mzo6snDhjGS0zJVJunO0NrT3Dg1MLy5TjWP/UJppg==",
+ "requires": {
+ "punycode": "^2.1.1"
+ }
+ },
+ "webidl-conversions": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz",
+ "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w=="
+ },
+ "whatwg-url": {
+ "version": "8.5.0",
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.5.0.tgz",
+ "integrity": "sha512-fy+R77xWv0AiqfLl4nuGUlQ3/6b5uNfQ4WAbGQVMYshCTCCPK9psC1nWh3XHuxGVCtlcDDQPQW1csmmIQo+fwg==",
+ "requires": {
+ "lodash": "^4.7.0",
+ "tr46": "^2.0.2",
+ "webidl-conversions": "^6.1.0"
+ }
}
}
},
@@ -1456,6 +1527,11 @@
}
}
},
+ "@types/asn1js": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@types/asn1js/-/asn1js-2.0.0.tgz",
+ "integrity": "sha512-Jjzp5EqU0hNpADctc/UqhiFbY1y2MqIxBVa2S4dBlbnZHTLPMuggoL5q43X63LpsOIINRDirBjP56DUUKIUWIA=="
+ },
"@types/babel__core": {
"version": "7.1.7",
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.7.tgz",
@@ -1599,6 +1675,25 @@
}
}
},
+ "@unimodules/core": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/@unimodules/core/-/core-7.0.0.tgz",
+ "integrity": "sha512-hKxNN6ad2VmmJqB3i1C8IJe27TcchY7YAKpkQhshjPxso61f7iM7AUFeG4vcU1vPH5d/X4Vk1ds8bWxaxg7nnw==",
+ "optional": true,
+ "requires": {
+ "compare-versions": "^3.4.0"
+ }
+ },
+ "@unimodules/react-native-adapter": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/@unimodules/react-native-adapter/-/react-native-adapter-6.1.0.tgz",
+ "integrity": "sha512-Fg+Dzt6KxwJLiTfEy1thgntqI/hybx5MsqbJkSfFAfZRmi/5+ypcl5LZQf8gqplgjzXWqeM3M184GAwezwIbjQ==",
+ "optional": true,
+ "requires": {
+ "invariant": "^2.2.4",
+ "lodash": "^4.5.0"
+ }
+ },
"JSONSelect": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/JSONSelect/-/JSONSelect-0.4.0.tgz",
@@ -1683,7 +1778,8 @@
"ansi-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
- "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg="
+ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
+ "dev": true
},
"ansi-styles": {
"version": "3.2.1",
@@ -1743,6 +1839,11 @@
"integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=",
"dev": true
},
+ "array-filter": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-1.0.0.tgz",
+ "integrity": "sha1-uveeYubvTCpMC4MSMtr/7CUfnYM="
+ },
"array-includes": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz",
@@ -1759,6 +1860,11 @@
"integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
"dev": true
},
+ "asmcrypto.js": {
+ "version": "0.22.0",
+ "resolved": "https://registry.npmjs.org/asmcrypto.js/-/asmcrypto.js-0.22.0.tgz",
+ "integrity": "sha512-usgMoyXjMbx/ZPdzTSXExhMPur2FTdz/Vo5PVx2gIaBcdAAJNOFlsdgqveM8Cff7W0v+xrf9BwjOV26JSAF9qA=="
+ },
"asn1": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
@@ -1767,6 +1873,25 @@
"safer-buffer": "~2.1.0"
}
},
+ "asn1js": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-2.1.1.tgz",
+ "integrity": "sha512-t9u0dU0rJN4ML+uxgN6VM2Z4H5jWIYm0w8LsZLzMJaQsgL3IJNbxHgmbWDvJAwspyHpDFuzUaUFh4c05UB4+6g==",
+ "requires": {
+ "pvutils": "^1.0.17"
+ }
+ },
+ "assert": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz",
+ "integrity": "sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==",
+ "requires": {
+ "es6-object-assign": "^1.1.0",
+ "is-nan": "^1.2.1",
+ "object-is": "^1.0.1",
+ "util": "^0.12.0"
+ }
+ },
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
@@ -1822,6 +1947,14 @@
"resolved": "https://registry.npmjs.org/auth-header/-/auth-header-1.0.0.tgz",
"integrity": "sha512-CPPazq09YVDUNNVWo4oSPTQmtwIzHusZhQmahCKvIsk0/xH6U3QsMAv3sM+7+Q0B1K2KJ/Q38OND317uXs4NHA=="
},
+ "available-typed-arrays": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.2.tgz",
+ "integrity": "sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ==",
+ "requires": {
+ "array-filter": "^1.0.0"
+ }
+ },
"aws-sign2": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
@@ -1841,6 +1974,22 @@
"ast-types-flow": "0.0.7"
}
},
+ "b64-lite": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/b64-lite/-/b64-lite-1.4.0.tgz",
+ "integrity": "sha512-aHe97M7DXt+dkpa8fHlCcm1CnskAHrJqEfMI0KN7dwqlzml/aUe1AGt6lk51HzrSfVD67xOso84sOpr+0wIe2w==",
+ "requires": {
+ "base-64": "^0.1.0"
+ }
+ },
+ "b64u-lite": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/b64u-lite/-/b64u-lite-1.1.0.tgz",
+ "integrity": "sha512-929qWGDVCRph7gQVTC6koHqQIpF4vtVaSbwLltFQo44B1bYUquALswZdBKFfrJCPEnsCOvWkJsPdQYZ/Ukhw8A==",
+ "requires": {
+ "b64-lite": "^1.4.0"
+ }
+ },
"babel-code-frame": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
@@ -2073,6 +2222,22 @@
}
}
},
+ "base-64": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/base-64/-/base-64-0.1.0.tgz",
+ "integrity": "sha1-eAqZyE59YAJgNhURxId2E78k9rs="
+ },
+ "base64-js": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
+ "optional": true
+ },
+ "base64url": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz",
+ "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A=="
+ },
"bcrypt-pbkdf": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
@@ -2109,9 +2274,9 @@
"integrity": "sha512-FG+nFEZChJrbQ9tIccIfZJBz3J7mLrAhxakAbnrJWn8d7aKOC+LWifa0G+p4ZqKp4y13T7juYvdhq9NzKdsrjw=="
},
"bn.js": {
- "version": "4.11.9",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz",
- "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw=="
+ "version": "4.12.0",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
+ "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
},
"brace-expansion": {
"version": "1.1.11",
@@ -2231,6 +2396,15 @@
"integrity": "sha512-VvxA0xhNqIIfg0V9AmJkDg91DaJwryutH5rVEZAhcNi4iJFj9f+QxmAjgK1LT9I8OgToX27fypX6/MeCXVbBjQ==",
"dev": true
},
+ "call-bind": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
+ "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
+ "requires": {
+ "function-bind": "^1.1.1",
+ "get-intrinsic": "^1.0.2"
+ }
+ },
"caller-path": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz",
@@ -2409,11 +2583,6 @@
"integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
"dev": true
},
- "code-point-at": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
- "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
- },
"collection-visit": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
@@ -2485,7 +2654,8 @@
"commander": {
"version": "2.20.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz",
- "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ=="
+ "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==",
+ "dev": true
},
"commitizen": {
"version": "4.2.1",
@@ -2582,6 +2752,12 @@
}
}
},
+ "compare-versions": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz",
+ "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==",
+ "optional": true
+ },
"component-emitter": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
@@ -2687,11 +2863,6 @@
"pad": "^3.2.0"
}
},
- "cycle": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz",
- "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI="
- },
"cz-conventional-changelog": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/cz-conventional-changelog/-/cz-conventional-changelog-3.2.0.tgz",
@@ -2757,7 +2928,8 @@
"decamelize": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
- "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
+ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
+ "dev": true
},
"decode-uri-component": {
"version": "0.2.0",
@@ -2788,7 +2960,6 @@
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
"integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
- "dev": true,
"requires": {
"object-keys": "^1.0.12"
}
@@ -2905,24 +3076,6 @@
"webidl-conversions": "^4.0.2"
}
},
- "domhandler": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-3.0.0.tgz",
- "integrity": "sha512-eKLdI5v9m67kbXQbJSNn1zjh0SDzvzWVWtX+qEI3eMjZw8daH9k8rlj1FZY9memPwjiskQFbe7vHVVJIAqoEhw==",
- "requires": {
- "domelementtype": "^2.0.1"
- }
- },
- "domutils": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.0.0.tgz",
- "integrity": "sha512-n5SelJ1axbO636c2yUtOGia/IcJtVtlhQbFiVDBZHKV5ReJO1ViX7sFEemtuyoAnBxk5meNSYgA8V4s0271efg==",
- "requires": {
- "dom-serializer": "^0.2.1",
- "domelementtype": "^2.0.1",
- "domhandler": "^3.0.0"
- }
- },
"duplexer2": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz",
@@ -2978,17 +3131,24 @@
}
},
"elliptic": {
- "version": "6.5.3",
- "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz",
- "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==",
+ "version": "6.5.4",
+ "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz",
+ "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==",
"requires": {
- "bn.js": "^4.4.0",
- "brorand": "^1.0.1",
+ "bn.js": "^4.11.9",
+ "brorand": "^1.1.0",
"hash.js": "^1.0.0",
- "hmac-drbg": "^1.0.0",
- "inherits": "^2.0.1",
- "minimalistic-assert": "^1.0.0",
- "minimalistic-crypto-utils": "^1.0.0"
+ "hmac-drbg": "^1.0.1",
+ "inherits": "^2.0.4",
+ "minimalistic-assert": "^1.0.1",
+ "minimalistic-crypto-utils": "^1.0.1"
+ },
+ "dependencies": {
+ "inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+ }
}
},
"emoji-regex": {
@@ -3074,6 +3234,11 @@
"is-symbol": "^1.0.2"
}
},
+ "es6-object-assign": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz",
+ "integrity": "sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw="
+ },
"es6-promise": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-2.3.0.tgz",
@@ -3614,6 +3779,15 @@
"jest-regex-util": "^24.3.0"
}
},
+ "expo-random": {
+ "version": "11.0.0",
+ "resolved": "https://registry.npmjs.org/expo-random/-/expo-random-11.0.0.tgz",
+ "integrity": "sha512-5x+F4KZlO2v9MZI79fvhuHUdSLCXAz1l8a6a7ABU+3/eBD5TIwtgBuu3YLtGldadVV7hX19HGfZy4GCO2R1dFA==",
+ "optional": true,
+ "requires": {
+ "base64-js": "^1.3.0"
+ }
+ },
"extend": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
@@ -3751,11 +3925,6 @@
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz",
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
},
- "fast.js": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/fast.js/-/fast.js-0.1.1.tgz",
- "integrity": "sha1-fAJNVa4USIL7zuRLeQBf4tyr2f4="
- },
"fb-watchman": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz",
@@ -3789,14 +3958,6 @@
"object-assign": "^4.0.1"
}
},
- "file-stream-rotator": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/file-stream-rotator/-/file-stream-rotator-0.4.1.tgz",
- "integrity": "sha512-W3aa3QJEc8BS2MmdVpQiYLKHj3ijpto1gMDlsgCRSKfIUe6MwkcpODGPQ3vZfb0XvCeCqlu9CBQTN7oQri2TZQ==",
- "requires": {
- "moment": "^2.11.2"
- }
- },
"file-uri-to-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
@@ -3845,6 +4006,7 @@
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
"integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
+ "dev": true,
"requires": {
"locate-path": "^2.0.0"
}
@@ -3879,6 +4041,11 @@
"integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=",
"dev": true
},
+ "foreach": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz",
+ "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k="
+ },
"forever-agent": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
@@ -3969,12 +4136,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -3994,7 +4163,8 @@
"concat-map": {
"version": "0.0.1",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"console-control-strings": {
"version": "1.1.0",
@@ -4142,6 +4312,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -4234,7 +4405,8 @@
"npm-normalize-package-bin": {
"version": "1.0.1",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"npm-packlist": {
"version": "1.4.8",
@@ -4472,8 +4644,7 @@
"function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
- "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
- "dev": true
+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
},
"functional-red-black-tree": {
"version": "1.0.1",
@@ -4481,11 +4652,6 @@
"integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=",
"dev": true
},
- "generic-pool": {
- "version": "3.7.1",
- "resolved": "https://registry.npmjs.org/generic-pool/-/generic-pool-3.7.1.tgz",
- "integrity": "sha512-ug6DAZoNgWm6q5KhPFA+hzXfBLFQu5sTXxPpv44DmE0A2g+CiHoq9LTVdkXpZMkYVMoGw83F6W+WT0h0MFMK/w=="
- },
"gensync": {
"version": "1.0.0-beta.1",
"resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz",
@@ -4498,6 +4664,23 @@
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
"dev": true
},
+ "get-intrinsic": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
+ "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
+ "requires": {
+ "function-bind": "^1.1.1",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.1"
+ },
+ "dependencies": {
+ "has-symbols": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
+ "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw=="
+ }
+ }
+ },
"get-stream": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
@@ -4603,7 +4786,6 @@
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
- "dev": true,
"requires": {
"function-bind": "^1.1.1"
}
@@ -4625,6 +4807,11 @@
}
}
},
+ "has-bigints": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz",
+ "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA=="
+ },
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
@@ -4634,8 +4821,7 @@
"has-symbols": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz",
- "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=",
- "dev": true
+ "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q="
},
"has-value": {
"version": "1.0.0",
@@ -4776,17 +4962,6 @@
}
}
},
- "htmlparser2": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-4.0.0.tgz",
- "integrity": "sha512-cChwXn5Vam57fyXajDtPXL1wTYc8JtLbr2TN76FYu05itVVVealxLowe2B3IEznJG4p9HAYn/0tJaRlGuEglFQ==",
- "requires": {
- "domelementtype": "^2.0.1",
- "domhandler": "^3.0.0",
- "domutils": "^2.0.0",
- "entities": "^2.0.0"
- }
- },
"http-signature": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
@@ -4933,9 +5108,9 @@
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"ini": {
- "version": "1.3.5",
- "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
- "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
+ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
"dev": true
},
"inquirer": {
@@ -4964,16 +5139,10 @@
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
"integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
- "dev": true,
"requires": {
"loose-envify": "^1.0.0"
}
},
- "invert-kv": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
- "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY="
- },
"is-accessor-descriptor": {
"version": "0.1.6",
"resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
@@ -4994,11 +5163,32 @@
}
}
},
+ "is-arguments": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz",
+ "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==",
+ "requires": {
+ "call-bind": "^1.0.0"
+ }
+ },
"is-arrayish": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
"integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ=="
},
+ "is-bigint": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.1.tgz",
+ "integrity": "sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg=="
+ },
+ "is-boolean-object": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz",
+ "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==",
+ "requires": {
+ "call-bind": "^1.0.0"
+ }
+ },
"is-buffer": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
@@ -5043,8 +5233,7 @@
"is-date-object": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
- "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=",
- "dev": true
+ "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY="
},
"is-descriptor": {
"version": "0.1.6",
@@ -5080,7 +5269,8 @@
"is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "dev": true
},
"is-generator-fn": {
"version": "2.1.0",
@@ -5088,6 +5278,11 @@
"integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==",
"dev": true
},
+ "is-generator-function": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.8.tgz",
+ "integrity": "sha512-2Omr/twNtufVZFr1GhxjOMFPAj2sjc/dKaIqBhvo4qciXfJmITGH6ZGd8eZYNHza8t1y0e01AuqRhJwfWp26WQ=="
+ },
"is-glob": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
@@ -5097,6 +5292,20 @@
"is-extglob": "^2.1.1"
}
},
+ "is-nan": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz",
+ "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==",
+ "requires": {
+ "call-bind": "^1.0.0",
+ "define-properties": "^1.1.3"
+ }
+ },
+ "is-negative-zero": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz",
+ "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w=="
+ },
"is-number": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
@@ -5117,6 +5326,11 @@
}
}
},
+ "is-number-object": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz",
+ "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw=="
+ },
"is-plain-object": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
@@ -5146,15 +5360,96 @@
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
},
+ "is-string": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz",
+ "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ=="
+ },
"is-symbol": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz",
"integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==",
- "dev": true,
"requires": {
"has-symbols": "^1.0.0"
}
},
+ "is-typed-array": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.5.tgz",
+ "integrity": "sha512-S+GRDgJlR3PyEbsX/Fobd9cqpZBuvUS+8asRqYDMLCb2qMzt1oz5m5oxQCxOgUDxiWsOVNi4yaF+/uvdlHlYug==",
+ "requires": {
+ "available-typed-arrays": "^1.0.2",
+ "call-bind": "^1.0.2",
+ "es-abstract": "^1.18.0-next.2",
+ "foreach": "^2.0.5",
+ "has-symbols": "^1.0.1"
+ },
+ "dependencies": {
+ "es-abstract": {
+ "version": "1.18.0",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0.tgz",
+ "integrity": "sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw==",
+ "requires": {
+ "call-bind": "^1.0.2",
+ "es-to-primitive": "^1.2.1",
+ "function-bind": "^1.1.1",
+ "get-intrinsic": "^1.1.1",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.2",
+ "is-callable": "^1.2.3",
+ "is-negative-zero": "^2.0.1",
+ "is-regex": "^1.1.2",
+ "is-string": "^1.0.5",
+ "object-inspect": "^1.9.0",
+ "object-keys": "^1.1.1",
+ "object.assign": "^4.1.2",
+ "string.prototype.trimend": "^1.0.4",
+ "string.prototype.trimstart": "^1.0.4",
+ "unbox-primitive": "^1.0.0"
+ }
+ },
+ "es-to-primitive": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
+ "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
+ "requires": {
+ "is-callable": "^1.1.4",
+ "is-date-object": "^1.0.1",
+ "is-symbol": "^1.0.2"
+ }
+ },
+ "has-symbols": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
+ "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw=="
+ },
+ "is-callable": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz",
+ "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ=="
+ },
+ "is-regex": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz",
+ "integrity": "sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==",
+ "requires": {
+ "call-bind": "^1.0.2",
+ "has-symbols": "^1.0.1"
+ }
+ },
+ "object.assign": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz",
+ "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==",
+ "requires": {
+ "call-bind": "^1.0.0",
+ "define-properties": "^1.1.3",
+ "has-symbols": "^1.0.1",
+ "object-keys": "^1.1.1"
+ }
+ }
+ }
+ },
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
@@ -5194,7 +5489,8 @@
"isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
- "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
+ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
+ "dev": true
},
"isobject": {
"version": "3.0.1",
@@ -5211,6 +5507,24 @@
"whatwg-fetch": ">=0.10.0"
}
},
+ "isomorphic-webcrypto": {
+ "version": "2.3.8",
+ "resolved": "https://registry.npmjs.org/isomorphic-webcrypto/-/isomorphic-webcrypto-2.3.8.tgz",
+ "integrity": "sha512-XddQSI0WYlSCjxtm1AI8kWQOulf7hAN3k3DclF1sxDJZqOe0pcsOt675zvWW91cZH9hYs3nlA3Ev8QK5i80SxQ==",
+ "requires": {
+ "@peculiar/webcrypto": "^1.0.22",
+ "@unimodules/core": "*",
+ "@unimodules/react-native-adapter": "*",
+ "asmcrypto.js": "^0.22.0",
+ "b64-lite": "^1.3.1",
+ "b64u-lite": "^1.0.1",
+ "expo-random": "*",
+ "msrcrypto": "^1.5.6",
+ "react-native-securerandom": "^0.1.1",
+ "str2buf": "^1.3.0",
+ "webcrypto-shim": "^0.1.4"
+ }
+ },
"isstream": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
@@ -7173,8 +7487,7 @@
"js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
- "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
- "dev": true
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
},
"js-yaml": {
"version": "3.13.1",
@@ -7491,14 +7804,6 @@
"colornames": "^1.1.1"
}
},
- "lcid": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
- "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=",
- "requires": {
- "invert-kv": "^1.0.0"
- }
- },
"left-pad": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz",
@@ -7561,6 +7866,7 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
"integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
+ "dev": true,
"requires": {
"p-locate": "^2.0.0",
"path-exists": "^3.0.0"
@@ -7647,11 +7953,6 @@
}
}
},
- "long": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/long/-/long-2.1.0.tgz",
- "integrity": "sha1-6Xk5ohpla3qIuocco0qvMrJcDLE="
- },
"longest": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/longest/-/longest-2.0.1.tgz",
@@ -7662,7 +7963,6 @@
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
- "dev": true,
"requires": {
"js-tokens": "^3.0.0 || ^4.0.0"
}
@@ -7671,6 +7971,7 @@
"version": "4.1.5",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
"integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
+ "dev": true,
"requires": {
"pseudomap": "^1.0.2",
"yallist": "^2.1.2"
@@ -7718,14 +8019,6 @@
"object-visit": "^1.0.0"
}
},
- "mem": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz",
- "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=",
- "requires": {
- "mimic-fn": "^1.0.0"
- }
- },
"merge": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/merge/-/merge-1.2.1.tgz",
@@ -7775,7 +8068,8 @@
"mimic-fn": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
- "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ=="
+ "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==",
+ "dev": true
},
"minimalistic-assert": {
"version": "1.0.1",
@@ -7829,16 +8123,16 @@
"minimist": "^1.2.5"
}
},
- "moment": {
- "version": "2.24.0",
- "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz",
- "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg=="
- },
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
},
+ "msrcrypto": {
+ "version": "1.5.8",
+ "resolved": "https://registry.npmjs.org/msrcrypto/-/msrcrypto-1.5.8.tgz",
+ "integrity": "sha512-ujZ0TRuozHKKm6eGbKHfXef7f+esIhEckmThVnz7RNyiOJd7a6MXj2JGBoL9cnPDW+JMG16MoTUh5X+XXjI66Q=="
+ },
"mute-stream": {
"version": "0.0.7",
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz",
@@ -7886,29 +8180,13 @@
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
"dev": true
},
- "node-biginteger": {
- "version": "0.0.10",
- "resolved": "https://registry.npmjs.org/node-biginteger/-/node-biginteger-0.0.10.tgz",
- "integrity": "sha1-Iys3PnTRy4z3Ij43s2KEQm4zPhw=",
- "requires": {
- "clone": "~0.2.0",
- "long": "~2.1.0"
- },
- "dependencies": {
- "clone": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz",
- "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8="
- }
- }
- },
"node-expat": {
- "version": "2.3.17",
- "resolved": "https://registry.npmjs.org/node-expat/-/node-expat-2.3.17.tgz",
- "integrity": "sha512-mNTxY/GMiZGayqdKZXyf6lJR7OM1JqyL0EISjE4XF7Ov7+X4zJjmlnfxCi6Gml90IEOyiYBcyJg9MHDsDp6YHw==",
+ "version": "2.3.18",
+ "resolved": "https://registry.npmjs.org/node-expat/-/node-expat-2.3.18.tgz",
+ "integrity": "sha512-9dIrDxXePa9HSn+hhlAg1wXkvqOjxefEbMclGxk2cEnq/Y3U7Qo5HNNqeo3fQ4bVmLhcdt3YN1TZy7WMZy4MHw==",
"requires": {
- "bindings": "^1.2.1",
- "nan": "^2.10.0"
+ "bindings": "^1.5.0",
+ "nan": "^2.13.2"
}
},
"node-fetch": {
@@ -8006,15 +8284,11 @@
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
"integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
+ "dev": true,
"requires": {
"path-key": "^2.0.0"
}
},
- "number-is-nan": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
- "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
- },
"nwsapi": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz",
@@ -8063,16 +8337,24 @@
}
}
},
- "object-hash": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz",
- "integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA=="
+ "object-inspect": {
+ "version": "1.9.0",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz",
+ "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw=="
+ },
+ "object-is": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz",
+ "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==",
+ "requires": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.1.3"
+ }
},
"object-keys": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
- "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
- "dev": true
+ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA=="
},
"object-visit": {
"version": "1.0.1",
@@ -8185,183 +8467,6 @@
"wordwrap": "~1.0.0"
}
},
- "orientjs": {
- "version": "3.0.11",
- "resolved": "https://registry.npmjs.org/orientjs/-/orientjs-3.0.11.tgz",
- "integrity": "sha512-5mSUtpLTdTUNrMheaH5VWwAS+RhhIGl0SIvDSLoDS3QeFHTqtxz1n1cnBtHauCQbfU4ec51eifkOMRlpazLAIQ==",
- "requires": {
- "bluebird": "~3.5.1",
- "fast.js": "^0.1.1",
- "generic-pool": "^3.1.6",
- "node-biginteger": "^0.0.10",
- "orientjs-native": "^2.2.0",
- "parse-function": "5.4.4",
- "request": "^2.87.0",
- "signed-varint": "2.0.1",
- "tls": "~0.0.1",
- "yargs": "~11.0.0"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
- },
- "camelcase": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
- "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0="
- },
- "cliui": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz",
- "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==",
- "requires": {
- "string-width": "^2.1.1",
- "strip-ansi": "^4.0.0",
- "wrap-ansi": "^2.0.0"
- }
- },
- "get-caller-file": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
- "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w=="
- },
- "is-fullwidth-code-point": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
- "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
- "requires": {
- "number-is-nan": "^1.0.0"
- }
- },
- "require-main-filename": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
- "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE="
- },
- "wrap-ansi": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
- "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
- "requires": {
- "string-width": "^1.0.1",
- "strip-ansi": "^3.0.1"
- },
- "dependencies": {
- "string-width": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
- "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
- "requires": {
- "code-point-at": "^1.0.0",
- "is-fullwidth-code-point": "^1.0.0",
- "strip-ansi": "^3.0.0"
- }
- },
- "strip-ansi": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
- "requires": {
- "ansi-regex": "^2.0.0"
- }
- }
- }
- },
- "y18n": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
- "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE="
- },
- "yargs": {
- "version": "11.0.0",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.0.0.tgz",
- "integrity": "sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==",
- "requires": {
- "cliui": "^4.0.0",
- "decamelize": "^1.1.1",
- "find-up": "^2.1.0",
- "get-caller-file": "^1.0.1",
- "os-locale": "^2.0.0",
- "require-directory": "^2.1.1",
- "require-main-filename": "^1.0.1",
- "set-blocking": "^2.0.0",
- "string-width": "^2.0.0",
- "which-module": "^2.0.0",
- "y18n": "^3.2.1",
- "yargs-parser": "^9.0.2"
- }
- },
- "yargs-parser": {
- "version": "9.0.2",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz",
- "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=",
- "requires": {
- "camelcase": "^4.1.0"
- }
- }
- }
- },
- "orientjs-native": {
- "version": "2.2.4",
- "resolved": "https://registry.npmjs.org/orientjs-native/-/orientjs-native-2.2.4.tgz",
- "integrity": "sha512-QiroTbDa1N2fTkNIHTu6wqwkiwwbs7IRsQtzGBSlkQZzTnkAkC+hmy6Hl6dmAWROudLiLbCo0sjC/hxtUpPHGg==",
- "optional": true,
- "requires": {
- "bindings": "~1.2.1",
- "nan": "^2.13.2"
- },
- "dependencies": {
- "bindings": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz",
- "integrity": "sha1-FK1hE4EtLTfXLme0ystLtyZQXxE=",
- "optional": true
- }
- }
- },
- "os-locale": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz",
- "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==",
- "requires": {
- "execa": "^0.7.0",
- "lcid": "^1.0.0",
- "mem": "^1.1.0"
- },
- "dependencies": {
- "cross-spawn": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
- "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
- "requires": {
- "lru-cache": "^4.0.1",
- "shebang-command": "^1.2.0",
- "which": "^1.2.9"
- }
- },
- "execa": {
- "version": "0.7.0",
- "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz",
- "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=",
- "requires": {
- "cross-spawn": "^5.0.1",
- "get-stream": "^3.0.0",
- "is-stream": "^1.1.0",
- "npm-run-path": "^2.0.0",
- "p-finally": "^1.0.0",
- "signal-exit": "^3.0.0",
- "strip-eof": "^1.0.0"
- }
- },
- "get-stream": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
- "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
- }
- }
- },
"os-tmpdir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
@@ -8380,22 +8485,35 @@
"p-finally": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
- "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4="
+ "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=",
+ "dev": true
},
"p-limit": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
- "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
"requires": {
- "p-try": "^1.0.0"
+ "yocto-queue": "^0.1.0"
}
},
"p-locate": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
"integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
+ "dev": true,
"requires": {
"p-limit": "^1.1.0"
+ },
+ "dependencies": {
+ "p-limit": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
+ "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
+ "dev": true,
+ "requires": {
+ "p-try": "^1.0.0"
+ }
+ }
}
},
"p-reduce": {
@@ -8407,7 +8525,8 @@
"p-try": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
- "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M="
+ "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
+ "dev": true
},
"pad": {
"version": "3.2.0",
@@ -8431,21 +8550,6 @@
"callsites": "^3.0.0"
}
},
- "parse-function": {
- "version": "5.4.4",
- "resolved": "https://registry.npmjs.org/parse-function/-/parse-function-5.4.4.tgz",
- "integrity": "sha512-2Uj96OJJ9rkx1a5UM/QBh2aYpPmNE1fUjscdv8pqv48OVNHN96okTtcTehkVj0S6z6gbzLztSzVNUz4C1zR+9Q==",
- "requires": {
- "@babel/parser": "^7.6.4"
- },
- "dependencies": {
- "@babel/parser": {
- "version": "7.9.6",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.6.tgz",
- "integrity": "sha512-AoeIEJn8vt+d/6+PXDRPaksYhnlbMIiejioBZvvMQsOjW/JYK6k/0dKnvvP3EhK5GfMBWDPtrxRtegWdAcdq9Q=="
- }
- }
- },
"parse-json": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
@@ -8475,7 +8579,8 @@
"path-exists": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
- "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU="
+ "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
+ "dev": true
},
"path-is-absolute": {
"version": "1.0.1",
@@ -8491,7 +8596,8 @@
"path-key": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
- "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A="
+ "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
+ "dev": true
},
"path-parse": {
"version": "1.0.6",
@@ -8610,7 +8716,8 @@
"pseudomap": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
- "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM="
+ "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
+ "dev": true
},
"psl": {
"version": "1.1.31",
@@ -8632,6 +8739,26 @@
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
},
+ "pvtsutils": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.1.2.tgz",
+ "integrity": "sha512-Yfm9Dsk1zfEpOWCaJaHfqtNXAFWNNHMFSCLN6jTnhuCCBCC2nqge4sAgo7UrkRBoAAYIL8TN/6LlLoNfZD/b5A==",
+ "requires": {
+ "tslib": "^2.1.0"
+ },
+ "dependencies": {
+ "tslib": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz",
+ "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w=="
+ }
+ }
+ },
+ "pvutils": {
+ "version": "1.0.17",
+ "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.0.17.tgz",
+ "integrity": "sha512-wLHYUQxWaXVQvKnwIDWFVKDJku9XDCvyhhxoq8dc5MFdIlRenyPI9eSfEtcvgHgD7FlvCyGAlWgOzRnZD99GZQ=="
+ },
"qs": {
"version": "6.5.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
@@ -8677,6 +8804,15 @@
"integrity": "sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA==",
"dev": true
},
+ "react-native-securerandom": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/react-native-securerandom/-/react-native-securerandom-0.1.1.tgz",
+ "integrity": "sha1-8TBiOkEsM4sK+t7bwgTFy7i/IHA=",
+ "optional": true,
+ "requires": {
+ "base64-js": "*"
+ }
+ },
"read-excel-file": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/read-excel-file/-/read-excel-file-4.0.1.tgz",
@@ -8729,9 +8865,9 @@
}
},
"regenerator-runtime": {
- "version": "0.13.2",
- "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz",
- "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA=="
+ "version": "0.13.7",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
+ "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew=="
},
"regex-not": {
"version": "1.0.2",
@@ -8838,7 +8974,8 @@
"require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
- "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I="
+ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
+ "dev": true
},
"require-main-filename": {
"version": "2.0.0",
@@ -9029,7 +9166,8 @@
"set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
- "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
+ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
+ "dev": true
},
"set-immediate-shim": {
"version": "1.0.1",
@@ -9068,6 +9206,7 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
"integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
+ "dev": true,
"requires": {
"shebang-regex": "^1.0.0"
}
@@ -9075,7 +9214,8 @@
"shebang-regex": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
- "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM="
+ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
+ "dev": true
},
"shellwords": {
"version": "0.1.1",
@@ -9086,15 +9226,8 @@
"signal-exit": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
- "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
- },
- "signed-varint": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/signed-varint/-/signed-varint-2.0.1.tgz",
- "integrity": "sha1-UKmYnafJjCxh2tEZvJdHDvhSgSk=",
- "requires": {
- "varint": "~5.0.0"
- }
+ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
+ "dev": true
},
"simple-swizzle": {
"version": "0.2.2",
@@ -9318,15 +9451,41 @@
}
},
"solid-auth-client": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/solid-auth-client/-/solid-auth-client-2.3.0.tgz",
- "integrity": "sha512-+9RfqC64oWpH4afoWYhCtieuAziFyWiiW/isB9XEV6N+yb2jZ69UCJxpX7iBCpxK0j36bDeisdbp0zHRp/F46A==",
+ "version": "2.5.5",
+ "resolved": "https://registry.npmjs.org/solid-auth-client/-/solid-auth-client-2.5.5.tgz",
+ "integrity": "sha512-5+ODG2O+Ls7tIADkHqzHD3A7k1hWyfHyXJSvU6rzb54kBF+SeMYXCfuHNTIEisuVv30QsxQAO2l8a28z3pUu6w==",
"requires": {
- "@babel/runtime": "^7.0.0",
- "@solid/oidc-rp": "^0.8.0",
+ "@babel/runtime": "^7.12.1",
+ "@solid/oidc-rp": "^0.11.5",
"auth-header": "^1.0.0",
- "commander": "^2.11.0",
- "isomorphic-fetch": "^2.2.1"
+ "commander": "^6.2.0",
+ "isomorphic-fetch": "^3.0.0"
+ },
+ "dependencies": {
+ "commander": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz",
+ "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA=="
+ },
+ "isomorphic-fetch": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz",
+ "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==",
+ "requires": {
+ "node-fetch": "^2.6.1",
+ "whatwg-fetch": "^3.4.1"
+ }
+ },
+ "node-fetch": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
+ "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw=="
+ },
+ "whatwg-fetch": {
+ "version": "3.6.2",
+ "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz",
+ "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA=="
+ }
}
},
"solid-rest": {
@@ -9585,6 +9744,11 @@
"resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz",
"integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks="
},
+ "str2buf": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/str2buf/-/str2buf-1.3.0.tgz",
+ "integrity": "sha512-xIBmHIUHYZDP4HyoXGHYNVmxlXLXDrtFHYT0eV6IOdEj3VO9ccaF1Ejl9Oq8iFjITllpT8FhaXb4KsNmw+3EuA=="
+ },
"string-length": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/string-length/-/string-length-2.0.0.tgz",
@@ -9599,11 +9763,30 @@
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
"integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
+ "dev": true,
"requires": {
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^4.0.0"
}
},
+ "string.prototype.trimend": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz",
+ "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==",
+ "requires": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.1.3"
+ }
+ },
+ "string.prototype.trimstart": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz",
+ "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==",
+ "requires": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.1.3"
+ }
+ },
"string_decoder": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz",
@@ -9616,6 +9799,7 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
+ "dev": true,
"requires": {
"ansi-regex": "^3.0.0"
}
@@ -9629,7 +9813,8 @@
"strip-eof": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
- "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8="
+ "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
+ "dev": true
},
"strip-json-comments": {
"version": "2.0.1",
@@ -9835,11 +10020,6 @@
"integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
"dev": true
},
- "tls": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/tls/-/tls-0.0.1.tgz",
- "integrity": "sha1-CrK/WWjXHfL4wOFRXSSiJAuYqsg="
- },
"tmp": {
"version": "0.0.33",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
@@ -9975,6 +10155,24 @@
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
},
+ "unbox-primitive": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz",
+ "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==",
+ "requires": {
+ "function-bind": "^1.1.1",
+ "has-bigints": "^1.0.1",
+ "has-symbols": "^1.0.2",
+ "which-boxed-primitive": "^1.0.2"
+ },
+ "dependencies": {
+ "has-symbols": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
+ "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw=="
+ }
+ }
+ },
"underscore": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz",
@@ -10103,6 +10301,19 @@
"integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==",
"dev": true
},
+ "util": {
+ "version": "0.12.3",
+ "resolved": "https://registry.npmjs.org/util/-/util-0.12.3.tgz",
+ "integrity": "sha512-I8XkoQwE+fPQEhy9v012V+TSdH2kp9ts29i20TaaDUXsg7x/onePbhFJUExBfv/2ay1ZOp/Vsm3nDlmnFGSAog==",
+ "requires": {
+ "inherits": "^2.0.3",
+ "is-arguments": "^1.0.4",
+ "is-generator-function": "^1.0.7",
+ "is-typed-array": "^1.1.3",
+ "safe-buffer": "^5.1.2",
+ "which-typed-array": "^1.1.2"
+ }
+ },
"util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
@@ -10138,11 +10349,6 @@
"spdx-expression-parse": "^3.0.0"
}
},
- "varint": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.0.tgz",
- "integrity": "sha1-2Ca4n3SQcy+rwMDtaT7Uddyynr8="
- },
"verror": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
@@ -10179,6 +10385,30 @@
"defaults": "^1.0.3"
}
},
+ "webcrypto-core": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.2.0.tgz",
+ "integrity": "sha512-p76Z/YLuE4CHCRdc49FB/ETaM4bzM3roqWNJeGs+QNY1fOTzKTOVnhmudW1fuO+5EZg6/4LG9NJ6gaAyxTk9XQ==",
+ "requires": {
+ "@peculiar/asn1-schema": "^2.0.27",
+ "@peculiar/json-schema": "^1.1.12",
+ "asn1js": "^2.0.26",
+ "pvtsutils": "^1.1.2",
+ "tslib": "^2.1.0"
+ },
+ "dependencies": {
+ "tslib": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz",
+ "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w=="
+ }
+ }
+ },
+ "webcrypto-shim": {
+ "version": "0.1.7",
+ "resolved": "https://registry.npmjs.org/webcrypto-shim/-/webcrypto-shim-0.1.7.tgz",
+ "integrity": "sha512-JAvAQR5mRNRxZW2jKigWMjCMkjSdmP5cColRP1U/pTg69VgHXEi1orv5vVpJ55Zc5MIaPc1aaurzd9pjv2bveg=="
+ },
"webidl-conversions": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz",
@@ -10218,14 +10448,122 @@
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
+ "dev": true,
"requires": {
"isexe": "^2.0.0"
}
},
+ "which-boxed-primitive": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz",
+ "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==",
+ "requires": {
+ "is-bigint": "^1.0.1",
+ "is-boolean-object": "^1.1.0",
+ "is-number-object": "^1.0.4",
+ "is-string": "^1.0.5",
+ "is-symbol": "^1.0.3"
+ },
+ "dependencies": {
+ "has-symbols": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
+ "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw=="
+ },
+ "is-symbol": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
+ "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==",
+ "requires": {
+ "has-symbols": "^1.0.1"
+ }
+ }
+ }
+ },
"which-module": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
- "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho="
+ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
+ "dev": true
+ },
+ "which-typed-array": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.4.tgz",
+ "integrity": "sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA==",
+ "requires": {
+ "available-typed-arrays": "^1.0.2",
+ "call-bind": "^1.0.0",
+ "es-abstract": "^1.18.0-next.1",
+ "foreach": "^2.0.5",
+ "function-bind": "^1.1.1",
+ "has-symbols": "^1.0.1",
+ "is-typed-array": "^1.1.3"
+ },
+ "dependencies": {
+ "es-abstract": {
+ "version": "1.18.0",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0.tgz",
+ "integrity": "sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw==",
+ "requires": {
+ "call-bind": "^1.0.2",
+ "es-to-primitive": "^1.2.1",
+ "function-bind": "^1.1.1",
+ "get-intrinsic": "^1.1.1",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.2",
+ "is-callable": "^1.2.3",
+ "is-negative-zero": "^2.0.1",
+ "is-regex": "^1.1.2",
+ "is-string": "^1.0.5",
+ "object-inspect": "^1.9.0",
+ "object-keys": "^1.1.1",
+ "object.assign": "^4.1.2",
+ "string.prototype.trimend": "^1.0.4",
+ "string.prototype.trimstart": "^1.0.4",
+ "unbox-primitive": "^1.0.0"
+ }
+ },
+ "es-to-primitive": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
+ "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
+ "requires": {
+ "is-callable": "^1.1.4",
+ "is-date-object": "^1.0.1",
+ "is-symbol": "^1.0.2"
+ }
+ },
+ "has-symbols": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
+ "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw=="
+ },
+ "is-callable": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz",
+ "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ=="
+ },
+ "is-regex": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz",
+ "integrity": "sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==",
+ "requires": {
+ "call-bind": "^1.0.2",
+ "has-symbols": "^1.0.1"
+ }
+ },
+ "object.assign": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz",
+ "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==",
+ "requires": {
+ "call-bind": "^1.0.0",
+ "define-properties": "^1.1.3",
+ "has-symbols": "^1.0.1",
+ "object-keys": "^1.1.1"
+ }
+ }
+ }
},
"winston": {
"version": "3.2.1",
@@ -10253,48 +10591,6 @@
}
}
},
- "winston-compat": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/winston-compat/-/winston-compat-0.1.4.tgz",
- "integrity": "sha512-mMEfFsSm6GmkFF+f4/0UJtG4N1vSaczGmXLVJYmS/+u2zUaIPcw2ZRuwUg2TvVBjswgiraN+vNnAG8z4fRUZ4w==",
- "requires": {
- "cycle": "~1.0.3",
- "logform": "^1.6.0",
- "triple-beam": "^1.2.0"
- },
- "dependencies": {
- "colors": {
- "version": "1.3.3",
- "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.3.tgz",
- "integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg=="
- },
- "logform": {
- "version": "1.10.0",
- "resolved": "https://registry.npmjs.org/logform/-/logform-1.10.0.tgz",
- "integrity": "sha512-em5ojIhU18fIMOw/333mD+ZLE2fis0EzXl1ZwHx4iQzmpQi6odNiY/t+ITNr33JZhT9/KEaH+UPIipr6a9EjWg==",
- "requires": {
- "colors": "^1.2.1",
- "fast-safe-stringify": "^2.0.4",
- "fecha": "^2.3.3",
- "ms": "^2.1.1",
- "triple-beam": "^1.2.0"
- }
- }
- }
- },
- "winston-daily-rotate-file": {
- "version": "3.9.0",
- "resolved": "https://registry.npmjs.org/winston-daily-rotate-file/-/winston-daily-rotate-file-3.9.0.tgz",
- "integrity": "sha512-KicvoaLQapqjSDSCIUKik0dDb90vFkqx1/udUiAt6iOqAtBl2qBCrpSDNy3xp7WnT6xHCKAWEEp2XILtiN+zpQ==",
- "requires": {
- "file-stream-rotator": "^0.4.1",
- "object-hash": "^1.3.0",
- "semver": "^5.6.0",
- "triple-beam": "^1.3.0",
- "winston-compat": "^0.1.4",
- "winston-transport": "^4.2.0"
- }
- },
"winston-transport": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.3.0.tgz",
@@ -10482,15 +10778,16 @@
"integrity": "sha512-fg03WRxtkCV6ohClePNAECYsmpKKTv5L8y/X3Dn1hQrec3POx2jHZ/0P2qQ6HvsrU1BmeqXcof3NGGueG6LxwQ=="
},
"y18n": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
- "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==",
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz",
+ "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==",
"dev": true
},
"yallist": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
- "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI="
+ "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=",
+ "dev": true
},
"yaml": {
"version": "1.10.0",
@@ -10597,6 +10894,11 @@
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
}
+ },
+ "yocto-queue": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
+ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="
}
}
}
diff --git a/package.json b/package.json
index e17acd56..4c7fda72 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "@bcgsc-pori/graphkb-loader",
"main": "src/index.js",
- "version": "5.0.0",
+ "version": "5.1.0",
"repository": {
"type": "git",
"url": "https://github.com/bcgsc/pori_graphkb_loader.git"
@@ -19,22 +19,20 @@
"csv-parse": "^4.6.5",
"fast-csv": "^3.4.0",
"html-to-text": "^5.1.1",
- "htmlparser2": "^4.0.0",
"http-status-codes": "^1.3.2",
"json-cycle": "^1.3.0",
"json-stable-stringify": "^1.0.1",
"jsonpath": "^1.0.1",
"jsonwebtoken": "^8.5.1",
"lodash": "^4.17.19",
- "moment": "^2.24.0",
- "orientjs": "^3.0.11",
+ "node-expat": "^2.3.18",
+ "p-limit": "^3.1.0",
"parse5": "^5.1.1",
"rdflib": "^0.20.1",
"read-excel-file": "^4.0.1",
"request-promise": "^4.2.4",
"sleep-promise": "^8.0.1",
"winston": "^3.2.1",
- "winston-daily-rotate-file": "^3.9.0",
"xml-stream": "^0.4.5",
"xml2js": "^0.4.19"
},
diff --git a/run_all.sh b/run_all.sh
deleted file mode 100755
index 3bcfa287..00000000
--- a/run_all.sh
+++ /dev/null
@@ -1,264 +0,0 @@
-#!/bin/bash
-set -e
-CWD=$PWD
-BASE_DIR=$PWD/tmp
-mkdir -p $BASE_DIR/data
-DATA_DIR=$BASE_DIR/data
-# download data where possible
-
-download_latest_ncit(){
-
- mkdir -p $DATA_DIR/NCIT
- cd $DATA_DIR/NCIT
-
- if ls Thesaurus_v*.txt 1> /dev/null 2>&1;
- then
- echo "EXISTS: Thesaurus_v*.txt"
- else
- wget https://evs.nci.nih.gov/ftp1/NCI_Thesaurus/archive/
- LATEST=$(cat index.html | grep '"[0-9][0-9]*\.[0-9][0-9][a-z]*_Release' -o | grep -o '[0-9][0-9]*\.[0-9][0-9][a-z]*' | tail -n 1)
- rm index.html
- echo "Latest Release: $LATEST"
-
- NAME=Thesaurus_$LATEST
- wget https://evs.nci.nih.gov/ftp1/NCI_Thesaurus/archive/${LATEST}_Release/Thesaurus_${LATEST}.FLAT.zip
-
- unzip ${NAME}.FLAT.zip
- rm ${NAME}.FLAT.zip
- mv Thesaurus.txt Thesaurus_v${LATEST}.txt
- rm -rf __MACOSX
- fi
-
- if ls FDA-UNII_NCIt_Subsets_*.txt 1> /dev/null 2>&1;
- then
- echo "EXISTS: $LATEST"
- else
- wget https://evs.nci.nih.gov/ftp1/FDA/UNII/Archive/
- LATEST=$(cat index.html | grep -P 'href="[^"]+txt"' -o | cut -f 2 -d\" | sort | tail -n 1)
- rm index.html
- echo "Latest Release: $LATEST"
- wget https://evs.nci.nih.gov/ftp1/FDA/UNII/Archive/$LATEST
- fi
-}
-
-download_ensembl_genes() {
- mkdir -p $DATA_DIR/ensembl
- cd $DATA_DIR/ensembl
-
- if [ ! -f biomart_export.tsv ]; then
- query_string=''
- wget -O biomart_export.tsv "http://www.ensembl.org/biomart/martservice?query=$query_string"
- else
- echo "EXISTS: biomart_export.tsv"
- fi
-}
-
-download_fda_srs() {
- mkdir -p $DATA_DIR/fda
- cd $DATA_DIR/fda
-
- if ls UNII*txt 1> /dev/null 2>&1;
- then
- echo "EXISTS: UNII*.txt"
- else
- wget https://fdasis.nlm.nih.gov/srs/download/srs/UNII_Data.zip
- unzip UNII_Data.zip
- rm UNII_Data.zip
-
- for filename in UNII*txt
- do
- echo $filename
- mv "$filename" "${filename// /_}";
- done
- fi
-}
-
-download_refseq_genes() {
- mkdir -p $DATA_DIR/refseq
- cd $DATA_DIR/refseq
- if [ ! -f LRG_RefSeqGene.tab ]; then
- wget -O LRG_RefSeqGene.tab ftp://ftp.ncbi.nih.gov/refseq/H_sapiens/RefSeqGene/LRG_RefSeqGene
- else
- echo "EXISTS: LRG_RefSeqGene.tab"
- fi
-}
-
-download_uberon() {
- mkdir -p $DATA_DIR/uberon
- cd $DATA_DIR/uberon
- if ls uberon_v*.owl 1> /dev/null 2>&1;
- then
- echo "EXISTS: uberon_v*.owl"
- else
- # get the list of releases as index.html
- wget http://purl.obolibrary.org/obo/uberon/releases/
-
- # figure out which is the latest release
- RELEASE=$(grep li index.html | tail -n 1 | grep -P '\d+-\d\d-\d\d' -o | head -n 1)
-
- # clean up the index.html file
- rm index.html
-
- # Fetch the latest release
- wget http://purl.obolibrary.org/obo/uberon/releases/$RELEASE/uberon.owl
- mv uberon.owl uberon_v${RELEASE}.owl
- fi
-}
-
-download_disease_ontology() {
- mkdir -p $DATA_DIR/disease_ontology
- cd $DATA_DIR/disease_ontology
-
- if ls doid_*.json 1> /dev/null 2>&1;
- then
- echo "EXISTS: doid_*.json"
- else
- REPO=https://github.com/DiseaseOntology/HumanDiseaseOntology.git
- LATEST=$(git ls-remote $REPO --tags v\* | cut -f 2 | sed 's/refs\/tags\///' | grep '\bv[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]\b' | sort -d | tail -n 1)
- echo "latest version: $LATEST"
-
- wget https://github.com/DiseaseOntology/HumanDiseaseOntology/raw/$LATEST/src/ontology/doid.json
-
- mv doid.json doid_${LATEST}.json
- fi
-}
-
-download_drugbank() {
- mkdir -p $DATA_DIR/drugbank
- cd $DATA_DIR/drugbank
-
- if ls drugbank_all_full_database_v*.xml 1> /dev/null 2>&1;
- then
- echo "EXISTS: drugbank_all_full_database_v*.xml"
- else
- wget https://www.drugbank.ca/releases
- latest=$(grep 'href="/releases/[^"]*"' -o releases | cut -f 3 -d/ | sed 's/"//' | sort -V | tail -n 2 | head -n 1)
- echo "newest version: $latest"
- rm releases
- filename="drugbank_all_full_database_v$latest".xml
- echo $filename
-
- curl -Lfv -o ${filename}.zip -u $DRUGBANK_EMAIL:$DRUGBANK_PASSWORD https://go.drugbank.com/releases/5-1-8/downloads/all-full-database
- unzip ${filename}.zip
- mv full\ database.xml $filename
- fi
-}
-
-download_tcga_fusions() {
- mkdir -p $DATA_DIR/tcgaFusions
- cd $DATA_DIR/tcgaFusions
-
- if [ -f NIHMS632238-supplement-2.xlsx ]; then
- echo "EXISTS: NIHMS632238-supplement-2.xlsx"
- else
- wget https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4468049/bin/NIHMS632238-supplement-2.xlsx
- fi
-}
-
-download_cosmic() {
- mkdir -p $DATA_DIR/cosmic
- cd $DATA_DIR/cosmic
-
- if [ -f CosmicResistanceMutations.tsv ]; then
- echo "EXISTS: CosmicResistanceMutations.tsv"
- else
- AUTH=$( echo "$COSMIC_EMAIL:$COSMIC_PASSWORD" | base64 )
- resp=$( curl -H "Authorization: Basic $AUTH" https://cancer.sanger.ac.uk/cosmic/file_download/GRCh38/cosmic/v92/CosmicResistanceMutations.tsv.gz );
- echo $resp
- url=$( node -e "var resp = $resp; console.log(resp.url);" );
- curl "$url" -o CosmicResistanceMutations.tsv.gz
- gunzip CosmicResistanceMutations.tsv.gz
- fi
-
- if [ -f classification.csv ]; then
- echo "EXISTS: classification.csv"
- else
- AUTH=$( echo "$COSMIC_EMAIL:$COSMIC_PASSWORD" | base64 )
- resp=$( curl -H "Authorization: Basic $AUTH" https://cancer.sanger.ac.uk/cosmic/file_download/GRCh38/cosmic/v92/classification.csv );
- echo $resp
- url=$( node -e "var resp = $resp; console.log(resp.url);" );
- curl "$url" -o classification.csv
- fi
-
- if [ -f CosmicFusionExport.tsv ]; then
- echo "EXISTS: CosmicFusionExport.tsv"
- else
- AUTH=$( echo "$COSMIC_EMAIL:$COSMIC_PASSWORD" | base64 )
- resp=$( curl -H "Authorization: Basic $AUTH" https://cancer.sanger.ac.uk/cosmic/file_download/GRCh38/cosmic/v92/CosmicFusionExport.tsv.gz );
- echo $resp
- url=$( node -e "var resp = $resp; console.log(resp.url);" );
- curl "$url" -o CosmicFusionExport.tsv.gz
- gunzip CosmicFusionExport.tsv.gz
- fi
-}
-
-download_cgi() {
- mkdir -p $DATA_DIR/cgi
- cd $DATA_DIR/cgi
-
- if [ -f cgi_biomarkers_per_variant.tsv ];
- then
- echo "EXISTS: cgi_biomarkers_per_variant.tsv"
- else
- wget https://www.cancergenomeinterpreter.org/data/cgi_biomarkers_latest.zip
- unzip cgi_biomarkers_latest.zip
- fi
-}
-
-download_latest_ncit;
-download_fda_srs;
-download_ensembl_genes;
-download_refseq_genes;
-download_disease_ontology;
-download_uberon;
-## download_drugbank;
-download_tcga_fusions;
-## download_cosmic;
-download_cgi;
-
-cd $CWD
-
-export GKB_URL=https://pori-demo.bcgsc.ca/graphkb-api/api
-export GKB_USER=graphkb_importer
-export GKB_PASS=graphkb_importer
-
-echo "load base vocabulary"
-node bin/loadFile.js ontology data/vocab.json
-echo "load signatures"
-node bin/loadFile.js ontology data/signatures.json
-echo "load non-specific human chromosome names"
-node bin/loadFile.js ontology data/chromosomes.json
-echo "load cross-kb evidence levels"
-node bin/loadFile.js ontology data/evidenceLevels.json
-
-echo "Loading NCIT terms"
-node bin/loadFile.js ncit $DATA_DIR/NCIT/Thesaurus_v*.txt
-echo "loading FDA SRS terms"
-node bin/loadFile.js fdaSrs $DATA_DIR/fda/UNII_Records_*.txt
-echo "loading the cross mapping from NCIT to FDA"
-node bin/loadFile.js ncitFdaXref $DATA_DIR/NCIT/FDA-UNII_NCIt_*.txt
-echo "loading refseq data"
-node bin/loadFile.js refseq $DATA_DIR/refseq/LRG_RefSeqGene.tab
-echo "loading disease ontology data"
-node bin/loadFile.js diseaseOntology $DATA_DIR/disease_ontology/doid_v*json
-echo "loading uberon data"
-node bin/loadFile.js uberon $DATA_DIR/uberon/uberon_v*.owl
-## echo "loading drugbank data"
-## node bin/loadFile.js drugbank $DATA_DIR/drugbank/drugbank*.xml
-echo "loading oncotree data"
-node bin/load.js oncotree
-## echo "loading dgidb data"
-## node bin/load.js dgidb
-
-echo "loading TCGA fusions from supplement"
-node bin/loadFile.js tcgaFusions $DATA_DIR/tcgaFusions/NIHMS632238-supplement-2.xlsx
-echo "loading CIViC"
-node bin/load.js civic
-## echo "loading COSMIC Resistance Mutations"
-## node bin/cosmic.js resistance $DATA_DIR/cosmic/CosmicResistanceMutations.tsv $DATA_DIR/cosmic/classification.csv
-## echo "loading COSMIC Fusions Data"
-## node bin/cosmic.js fusions $DATA_DIR/cosmic/CosmicFusionExport.tsv $DATA_DIR/cosmic/classification.csv
-echo "loading Cancer Genome Intepreter"
-node bin/loadFile.js cgi $DATA_DIR/cgi/cgi_biomarkers_per_variant.tsv
-echo "loading Database of Curated Mutations Data"
-node bin/load.js docm
diff --git a/src/PMC4232638/README.md b/src/PMC4232638/README.md
new file mode 100644
index 00000000..6feac45e
--- /dev/null
+++ b/src/PMC4232638/README.md
@@ -0,0 +1,19 @@
+# Functional Impact Statements
+
+This loader loads and processes fusion data from the supplementary files of the following
+[publication](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4232638).
+
+> :warning: Since this creates statements, ontology and vocabulary loaders should be run first so that it
+has content to match.
+
+First download the data
+
+```bash
+wget https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4232638/bin/13059_2014_484_MOESM2_ESM.xlsx
+```
+
+Next use the file loader to load it
+
+```bash
+node bin/load.js file PMC4232638 13059_2014_484_MOESM2_ESM.xlsx
+```
diff --git a/src/PMC4232638/index.js b/src/PMC4232638/index.js
new file mode 100644
index 00000000..1f69050b
--- /dev/null
+++ b/src/PMC4232638/index.js
@@ -0,0 +1,178 @@
+const readXlsxFile = require('read-excel-file/node');
+const kbParser = require('@bcgsc-pori/graphkb-parser');
+
+const { logger } = require('../logging');
+const { rid } = require('../graphkb');
+const _pubmed = require('../entrez/pubmed');
+const _entrezGene = require('../entrez/gene');
+const { PMC4232638: SOURCE_DEFN } = require('../sources');
+
+
+const TP53_COLS = {
+ DOM: 'Functional categories for TP53 - Dominant negative activity',
+ GOF: 'Functional categories for TP53 - Gain of function',
+ LOF: 'Functional categories for TP53 - Loss of function',
+ WT: 'Functional categories for TP53 - Conserved wild-type function',
+};
+
+const THIS_PUBMED_ID = '25348012';
+
+const KINASE_COL = 'Functional categories for oncogenes/ new cancer genes - Change in kinase, GTPase, or other enzymatic activity (i.e. RNase)';
+
+/**
+ * Parse the excel supplmentary file to assign relevance to rows
+ */
+const readSupplementaryFile = async (filename) => {
+ logger.info(`reading: ${filename}`);
+ const rawData = await readXlsxFile(filename, { sheet: 'Additional file 2' });
+
+ const header = [];
+ let lastSuperHeader;
+
+ for (let i = 0; i < rawData[0].length; i++) {
+ const superCol = rawData[1][i];
+ const col = rawData[2][i];
+
+ if (superCol !== null) {
+ lastSuperHeader = superCol;
+ }
+ if (!col) {
+ header.push(superCol);
+ } else {
+ header.push(`${lastSuperHeader} - ${col}`);
+ }
+ }
+
+ const rows = [];
+
+ for (const rawRow of rawData.slice(3)) {
+ const row = {};
+ rawRow.forEach((v, i) => {
+ if (v !== '----' && v !== null) {
+ row[header[i]] = v;
+ } else {
+ row[header[i]] = '';
+ }
+ });
+
+ if (row['Functional classification'] === 'non-neutral') {
+ rows.push(row);
+ }
+ }
+ rows.filter(row => row[KINASE_COL] === 'yes' && ['Oncogene', 'New cancer gene'].includes(row.Type))
+ .forEach((row) => {
+ row.relevance = 'likely gain of function';
+ });
+
+ // now loop over TP53 mutations
+ for (const row of rows) {
+ const isNo = s => !s || s.toLowerCase().startsWith('no ');
+ const gof = !isNo(row[TP53_COLS.GOF]);
+ const lof = !isNo(row[TP53_COLS.LOF]);
+ const domNeg = !isNo(row[TP53_COLS.DOM]);
+
+ if (gof && (lof || domNeg)) {
+ continue; // skip entries in multiple categories
+ } else if (gof) {
+ row.relevance = 'gain of function';
+ } else if (domNeg && lof) {
+ row.relevance = 'dominant negative';
+ } else if (lof) {
+ row.relevance = 'loss of function';
+ }
+ }
+
+ // clean up the PMIDs
+ for (const row of rows) {
+ if (row.relevance) {
+ row.evidence = [THIS_PUBMED_ID];
+ row.comment = '';
+
+ if (!row['PubMed ID (PMID)']) {
+ continue;
+ }
+ const pmids = `${row['PubMed ID (PMID)']}`.split(',');
+ const comment = [];
+ const evidence = [];
+
+ for (const pmid of pmids) {
+ const m = /^\s*(\d+)\s*(\([^)]+\))?$/.exec(pmid);
+
+ if (!m) {
+ logger.warn(`unable to parse pubmed ID ${pmid.trim()}`);
+ } else {
+ evidence.push(m[1]);
+ comment.push(`PMID:${pmid.trim()}`);
+ }
+ }
+ row.evidence.push(...evidence);
+ row.comment = comment.join('; ');
+ }
+ }
+ return rows.filter(row => row.relevance);
+};
+
+const uploadFile = async ({ conn, filename }) => {
+ logger.info('retrieve the publication');
+ const rows = await readSupplementaryFile(filename);
+ const source = rid(await conn.addRecord({
+ content: {
+ ...SOURCE_DEFN,
+ },
+ existsOk: true,
+ fetchConditions: { name: SOURCE_DEFN.name },
+ target: 'Source',
+ }));
+ logger.info(`found ${rows.length} functional impact statements`);
+ logger.info('pre-loading pubmed entries');
+ await _pubmed.preLoadCache(conn);
+
+ // now upload the statements
+ const counts = { error: 0, success: 0 };
+
+ for (const row of rows) {
+ logger.info(`loading: ${row.Gene}:${row['Amino acid change']}`);
+
+ try {
+ const parsed = kbParser.variant.parse(`p.${row['Amino acid change']}`, false).toJSON();
+ const [gene] = await _entrezGene.fetchAndLoadBySymbol(conn, row.Gene);
+ const relevance = await conn.getVocabularyTerm(row.relevance);
+ const evidence = await _pubmed.fetchAndLoadByIds(conn, row.evidence);
+ const variantType = await conn.getVocabularyTerm(parsed.type);
+ // create the variant record
+ const variant = await conn.addVariant({
+ content: {
+ ...parsed,
+ reference1: rid(gene),
+ type: rid(variantType),
+ },
+ existsOk: true,
+ target: 'PositionalVariant',
+ });
+
+ // now create the statement
+ await conn.addRecord({
+ content: {
+ conditions: [rid(variant), rid(gene)],
+ evidence: evidence.map(rid),
+ relevance: rid(relevance),
+ source: rid(source),
+ subject: rid(gene),
+ },
+ existsOk: true,
+ fetchExisting: false,
+ target: 'Statement',
+ });
+ counts.success++;
+ } catch (err) {
+ logger.error(err);
+ counts.error++;
+ throw err;
+ }
+ }
+ logger.info(JSON.stringify(counts));
+};
+
+module.exports = {
+ SOURCE_DEFN: {}, uploadFile,
+};
diff --git a/src/tcgaFusions/README.md b/src/PMC4468049/README.md
similarity index 88%
rename from src/tcgaFusions/README.md
rename to src/PMC4468049/README.md
index 1a474c96..7af77021 100644
--- a/src/tcgaFusions/README.md
+++ b/src/PMC4468049/README.md
@@ -15,5 +15,5 @@ wget https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4468049/bin/NIHMS632238-supple
Next use the file loader to load it
```bash
-node bin/load.js file tcgaFusions NIHMS632238-supplement-2.xlsx
+node bin/load.js file PMC4468049 NIHMS632238-supplement-2.xlsx
```
diff --git a/src/tcgaFusions/index.js b/src/PMC4468049/index.js
similarity index 89%
rename from src/tcgaFusions/index.js
rename to src/PMC4468049/index.js
index 16dad738..ad7183d5 100644
--- a/src/tcgaFusions/index.js
+++ b/src/PMC4468049/index.js
@@ -6,6 +6,7 @@ const { convertRowFields } = require('../util');
const { rid, orderPreferredOntologyTerms } = require('../graphkb');
const _entrezGene = require('../entrez/gene');
const _pubmed = require('../entrez/pubmed');
+const { PMC4468049: SOURCE_DEFN } = require('../sources');
// https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4468049/ Table 1
// https://gdc.cancer.gov/resources-tcga-users/tcga-code-tables/tcga-study-abbreviations
@@ -26,9 +27,11 @@ const DISEASE_CODES = {
};
-const parseRecurrentFusions = async ({ conn, filename, publication }) => {
+const parseRecurrentFusions = async ({
+ conn, filename, fileStream, publication, source,
+}) => {
logger.info(`loading: ${filename} (Table S7)`);
- const rawData = await readXlsxFile(filename, { sheet: 'Table S7' });
+ const rawData = await readXlsxFile(fileStream || filename, { sheet: 'Table S7' });
const [, header] = rawData;
const rows = rawData.slice(2).map((values) => {
const row = {};
@@ -123,6 +126,7 @@ const parseRecurrentFusions = async ({ conn, filename, publication }) => {
conditions: [variant, disease],
evidence: [publication],
relevance,
+ source,
subject: disease,
},
existsOk: true,
@@ -141,11 +145,13 @@ const parseRecurrentFusions = async ({ conn, filename, publication }) => {
};
-const parseKinaseFusions = async ({ conn, filename, publication }) => {
+const parseKinaseFusions = async ({
+ conn, filename, fileStream, publication, source,
+}) => {
logger.info(`loading: ${filename} (Table S11)`);
const counts = { error: 0, skip: 0, success: 0 };
const errorList = [];
- const rawData = await readXlsxFile(filename, { sheet: 'Table S11' });
+ const rawData = await readXlsxFile(fileStream || filename, { sheet: 'Table S11' });
const [, header] = rawData;
const headerMap = {
break1: 'Junction_A',
@@ -212,6 +218,7 @@ const parseKinaseFusions = async ({ conn, filename, publication }) => {
conditions: [variant, disease],
evidence: [publication],
relevance,
+ source,
subject: row.kinaseA === 'yes'
? rid(geneA)
: rid(geneB),
@@ -235,13 +242,22 @@ const parseKinaseFusions = async ({ conn, filename, publication }) => {
const uploadFile = async ({ conn, filename, errorLogPrefix }) => {
logger.info('retrieve the publication');
const publication = rid((await _pubmed.fetchAndLoadByIds(conn, ['25500544']))[0]);
+ const source = rid(await conn.addRecord({
+ content: { ...SOURCE_DEFN }, existsOk: true, fetchConditions: { name: SOURCE_DEFN.name }, target: 'Source',
+ }));
const errorList = [];
- errorList.push(...await parseKinaseFusions({ conn, filename, publication }));
- errorList.push(...await parseRecurrentFusions({ conn, filename, publication }));
+ errorList.push(...await parseKinaseFusions({
+ conn, filename, publication, source,
+ }));
+ errorList.push(...await parseRecurrentFusions({
+ conn, filename, publication, source,
+ }));
- const errorJson = `${errorLogPrefix}-tcgaFusions.json`;
+ const errorJson = `${errorLogPrefix}-PMC4468049.json`;
logger.info(`writing: ${errorJson}`);
fs.writeFileSync(errorJson, JSON.stringify({ records: errorList }, null, 2));
};
-module.exports = { SOURCE_DEFN: {}, kb: true, uploadFile };
+module.exports = {
+ SOURCE_DEFN: {}, uploadFile,
+};
diff --git a/src/cancergenomeinterpreter/README.md b/src/cancergenomeinterpreter/README.md
index 7efed612..f33c3810 100644
--- a/src/cancergenomeinterpreter/README.md
+++ b/src/cancergenomeinterpreter/README.md
@@ -15,5 +15,5 @@ unzip cgi_biomarkers_latest.zip
Then load into graphkb
```bash
-node bin/load.js file cancergenomeinterpreter cgi_biomarkers_per_variant.tsv
+node bin/load.js file cgi cgi_biomarkers_per_variant.tsv
```
diff --git a/src/cancergenomeinterpreter/index.js b/src/cancergenomeinterpreter/index.js
index bfdc5923..8290e050 100644
--- a/src/cancergenomeinterpreter/index.js
+++ b/src/cancergenomeinterpreter/index.js
@@ -54,6 +54,7 @@ const evidenceLevels = {
sources: { default: SOURCE_DEFN },
};
+// mappings are given primarily to fix known typos
const relevanceMapping = {
'increased toxicity (myelosupression)': 'increased toxicity (myelosuppression)',
'no responsive': 'no response',
@@ -62,7 +63,28 @@ const relevanceMapping = {
};
const diseaseMapping = {
- 'Any cancer type': 'cancer',
+ 'any cancer type': 'cancer',
+ 'billiary tract': 'Biliary tract cancer',
+ 'cervix squamous cell': 'cervix squamous cell carcinoma',
+ endometrium: 'endometrial cancer',
+ 'gastrointestinal stromal': 'gastrointestinal stromal tumor',
+ 'head an neck': 'head and neck cancer',
+ 'head an neck squamous': 'head and neck squamous cell carcinoma',
+ 'lung squamous cell': 'lung squamous cell carcinoma',
+ 'malignant peripheral nerve sheat tumor': 'malignant peripheral nerve sheath tumor',
+ ovary: 'ovarian cancer',
+ thymic: 'thymic tumor',
+};
+
+const therapyMapping = {
+ 'MEK inhibitor (alone or in combination)': 'mek inhibitor',
+ 'egfr tk inhibitor': 'egfr tyrosine kinase inhibitor',
+ 'egfr tk inhibitors': 'egfr tyrosine kinase inhibitor',
+ flourouracil: 'fluorouracil',
+ fluvestrant: 'fulvestrant',
+ 'jak inhibitors (alone or in combination)': 'jak inhibitor',
+ 'mek inhibitors (alone or in combination)': 'mek inhibitor',
+ tensirolimus: 'temsirolimus',
};
@@ -93,8 +115,8 @@ const parseEvidence = (row) => {
evidence.push(item);
} else if (/^NCT\d+$/.exec(item)) {
evidence.push(item);
- } else if (!item.startsWith('FDA') && !item.startsWith('NCCN')) {
- throw new Error(`cannot process non-pubmed/nct evidence ${item}`);
+ } else if (!['FDA', 'NCCN', 'ASCO', 'AACR'].some(prefix => item.startsWith(prefix))) {
+ throw new Error(`cannot process non-pubmed/nct/aacr/asco evidence ${item}`);
}
}
return evidence;
@@ -317,7 +339,7 @@ const processVariants = async ({ conn, row, source }) => {
const processDisease = async (conn, originalDiseaseName) => {
- const diseaseName = diseaseMapping[originalDiseaseName] || `${originalDiseaseName}|${originalDiseaseName} cancer`;
+ const diseaseName = diseaseMapping[originalDiseaseName.toLowerCase().trim()] || `${originalDiseaseName}|${originalDiseaseName} cancer`;
// find the exact disease name
let disease;
@@ -344,11 +366,31 @@ const processDisease = async (conn, originalDiseaseName) => {
}
if (!disease) {
- throw new Error(`missing disease for input: ${originalDiseaseName}`);
+ throw new Error(`missing disease for input: ${originalDiseaseName} (${diseaseName})`);
}
return disease;
};
+
+const fetchAbstract = async (conn, abstractString) => {
+ const m = /^(ASCO|AACR)\s+(20[0-2][0-9])\s+\((abstr(act)?)?\s*(\w+)\)$/.exec(abstractString);
+
+ if (!m) {
+ throw new Error(`unable to parse abstract from ${abstractString}`);
+ }
+ const [, source, year,, abstractNumber] = m;
+ const abstract = await conn.getUniqueRecordBy({
+ filters: [
+ { year },
+ { source: { filters: { name: source }, target: 'Source' } },
+ { abstractNumber },
+ ],
+ target: 'Abstract',
+ });
+ return abstract;
+};
+
+
const processRow = async ({ row, source, conn }) => {
// process the protein notation
// look up the disease by name
@@ -357,7 +399,9 @@ const processRow = async ({ row, source, conn }) => {
? row.therapy.split(';').map(n => n.toLowerCase().trim()).sort().join(' + ')
: row.therapy;
// look up the drug by name
- const drug = rid(await conn.addTherapyCombination(source, therapyName));
+ const drug = rid(await conn.addTherapyCombination(
+ source, therapyMapping[therapyName.toLowerCase().trim()] || therapyName,
+ ));
const variants = await Promise.all(row.variants.map(
async variant => processVariants({ conn, row: variant, source }),
));
@@ -369,13 +413,17 @@ const processRow = async ({ row, source, conn }) => {
const articles = await _pubmed.fetchAndLoadByIds(
conn,
- row.evidence.filter(ev => !ev.startsWith('NCT')),
+ row.evidence.filter(ev => ['NCT', 'ASCO', 'AACR'].every(prefix => !ev.startsWith(prefix))),
);
const trials = await Promise.all(
row.evidence
.filter(ev => ev.startsWith('NCT'))
.map(async evidence => _trials.fetchAndLoadById(conn, evidence)),
);
+ const abstracts = await Promise.all(
+ row.evidence.filter(ev => ev.startsWith('AACR') || ev.startsWith('ASCO'))
+ .map(async ev => fetchAbstract(conn, ev)),
+ );
// determine the relevance of the statement
let relevance;
@@ -390,7 +438,7 @@ const processRow = async ({ row, source, conn }) => {
));
}
- const evidence = [...articles.map(rid), ...trials.map(rid)];
+ const evidence = [...articles.map(rid), ...trials.map(rid), ...abstracts.map(rid)];
if (evidence.length === 0) {
evidence.push(rid(source));
@@ -493,10 +541,6 @@ const uploadFile = async ({ conn, filename, errorLogPrefix }) => {
errors = true;
logger.error(err);
counts.error++;
-
- if (err.toString().includes('of undefined')) {
- throw err;
- }
}
}
}
diff --git a/src/cancerhotspots/index.js b/src/cancerhotspots/index.js
index 4c3c4cbc..2c804566 100644
--- a/src/cancerhotspots/index.js
+++ b/src/cancerhotspots/index.js
@@ -14,7 +14,6 @@ const {
const {
rid,
orderPreferredOntologyTerms,
- convertRecordToQueryFilters,
} = require('../graphkb');
const _entrezGene = require('../entrez/gene');
const { logger } = require('../logging');
@@ -68,7 +67,10 @@ const processVariants = async ({ conn, record, source }) => {
} else {
reference1 = await conn.getUniqueRecordBy({
filters: {
- AND: [{ OR: [{ sourceId: chromosome }, { name: chromosome }] }, { biotype: 'chromosome' }],
+ AND: [
+ { OR: [{ sourceId: chromosome }, { name: chromosome }] },
+ { biotype: 'chromosome' },
+ ],
},
sort: orderPreferredOntologyTerms,
target: 'Feature',
@@ -272,7 +274,8 @@ const uploadFile = async ({ filename, conn, errorLogPrefix }) => {
const previousLoad = new Set();
logger.info('load previous statements');
const statements = await conn.getRecords({
- filters: convertRecordToQueryFilters({ neighbors: 0, returnProperties: 'sourceId', source: rid(source) }),
+ filters: { source: rid(source) },
+ returnProperties: ['sourceId'],
target: 'Statement',
});
diff --git a/src/civic/README.md b/src/civic/README.md
index fe688579..9058896b 100644
--- a/src/civic/README.md
+++ b/src/civic/README.md
@@ -7,3 +7,10 @@ Loads statements into GraphKB using the [CIViC](https://civicdb.org/) REST API.
```bash
node bin/load.js api civic
```
+
+## About
+
+The `variant.js` module handles all parsing/processing of variant records in CIViC for entry into GraphKB. The corresponding tests are under `test/civic.test.js`.
+
+In general this loader attempts to update existing records based on their CIViC evidence ID, however when the mapping from CIViC evidence record to GraphKB statement is not 1 to 1 then the
+statement is sometimes recreated and the old version soft-deleted instead since we cannot resolve tracking between the 2 for these cases.
diff --git a/src/civic/index.js b/src/civic/index.js
index f108b794..01fb22af 100644
--- a/src/civic/index.js
+++ b/src/civic/index.js
@@ -737,7 +737,6 @@ const upload = async (opt) => {
module.exports = {
SOURCE_DEFN,
- kb: true,
specs: { validateEvidenceSpec },
upload,
};
diff --git a/src/civic/variant.js b/src/civic/variant.js
index c07904e3..f55ec0b7 100644
--- a/src/civic/variant.js
+++ b/src/civic/variant.js
@@ -1,6 +1,3 @@
-/**
- * @module importer/civic
- */
const request = require('request-promise');
const Ajv = require('ajv');
@@ -24,7 +21,9 @@ const {
const BASE_URL = 'https://civicdb.org/api';
-
+/**
+ * This is the expected format of the JSON body of a response to a variant request to the CIVIC API
+ */
const validateVariantSpec = ajv.compile({
properties: {
civic_actionability_score: { type: 'number' },
diff --git a/src/cosmic/README.md b/src/cosmic/README.md
index 3889f8f7..44cc66c2 100644
--- a/src/cosmic/README.md
+++ b/src/cosmic/README.md
@@ -33,11 +33,11 @@ gunzip CosmicFusionExport.tsv.gz
Since this loader requires 2 files, it is separate from the other more general loaders
```bash
-node bin/cosmic.js resistance CosmicResistanceMutations.tsv classification.csv
+node bin/load.js cosmic resistance CosmicResistanceMutations.tsv classification.csv
```
And then to load the fusions (Will create recurrency statements)
```bash
-node bin/cosmic.js fusions CosmicFusionExport.tsv classification.csv
+node bin/load.js cosmic fusions CosmicFusionExport.tsv classification.csv
```
diff --git a/src/docm/index.js b/src/docm/index.js
index bd9062a7..1669cdf4 100644
--- a/src/docm/index.js
+++ b/src/docm/index.js
@@ -251,7 +251,6 @@ const processRecord = async (opt) => {
filters: {
AND: [
{ sourceId: `doid:${diseaseRec.doid}` },
- { name: diseaseRec.disease },
{ source: { filters: { name: 'disease ontology' }, target: 'Source' } },
],
},
diff --git a/src/ensembl/index.js b/src/ensembl/index.js
index 5a6b1207..a4b2bf40 100644
--- a/src/ensembl/index.js
+++ b/src/ensembl/index.js
@@ -4,7 +4,7 @@
* @module importer/ensembl
*/
-const { loadDelimToJson, requestWithRetry } = require('../util');
+const { loadDelimToJson, requestWithRetry, convertRowFields } = require('../util');
const {
rid, orderPreferredOntologyTerms, generateCacheKey,
} = require('../graphkb');
@@ -183,15 +183,20 @@ const fetchAndLoadById = async (conn, { sourceId, sourceIdVersion, biotype }) =>
*/
const uploadFile = async (opt) => {
const HEADER = {
- geneId: 'Gene stable ID',
- geneIdVersion: 'Version (gene)',
+ geneIdVersion: 'Gene stable ID version',
hgncId: 'HGNC ID',
refseqId: 'RefSeq mRNA ID',
- transcriptId: 'Transcript stable ID',
- transcriptIdVersion: 'Version (transcript)',
+ transcriptIdVersion: 'Transcript stable ID version',
};
const { filename, conn } = opt;
const contentList = await loadDelimToJson(filename);
+ const rows = contentList.map(row => convertRowFields(HEADER, row));
+
+ // process versions
+ for (const row of rows) {
+ [row.geneId, row.geneIdVersion] = row.geneIdVersion.split('.');
+ [row.transcriptId, row.transcriptIdVersion] = row.transcriptIdVersion.split('.');
+ }
const source = await conn.addRecord({
content: SOURCE_DEFN,
@@ -237,23 +242,30 @@ const uploadFile = async (opt) => {
logger.info('pre-fetching refseq entries');
await _refseq.preLoadCache(conn);
- logger.info('fetching missing refseq entries');
- await _refseq.fetchAndLoadByIds(conn, contentList.map(r => r[HEADER.refseqId]).filter(r => r));
+ const missingRefSeqIds = new Set();
+ rows.map(r => r.refseqId || '').forEach((id) => {
+ if (!_refseq.cacheHas(id) && id) {
+ missingRefSeqIds.add(id);
+ }
+ });
+
+ logger.info(`fetching ${missingRefSeqIds.size} missing refseq entries`);
+ await _refseq.fetchAndLoadByIds(conn, Array.from(missingRefSeqIds));
+
+ logger.info(`processing ${rows.length} records`);
- logger.info(`processing ${contentList.length} records`);
+ for (let index = 0; index < rows.length; index++) {
+ const record = rows[index];
- for (let index = 0; index < contentList.length; index++) {
- const record = contentList[index];
+ const { geneId, geneIdVersion } = record;
- const geneId = record[HEADER.geneId];
- const geneIdVersion = record[HEADER.geneIdVersion];
const key = generateCacheKey({ sourceId: geneId, sourceIdVersion: geneIdVersion });
if (preLoaded.has(key)) {
counts.skip++;
continue;
}
- logger.info(`processing ${geneId}.${geneIdVersion || ''} (${index} / ${contentList.length})`);
+ logger.info(`processing ${geneId}.${geneIdVersion || ''} (${index} / ${rows.length})`);
let newGene = false;
if (visited[key] === undefined) {
@@ -299,8 +311,8 @@ const uploadFile = async (opt) => {
content: {
biotype: 'transcript',
source: rid(source),
- sourceId: record[HEADER.transcriptId],
- sourceIdVersion: record[HEADER.transcriptIdVersion],
+ sourceId: record.transcriptId,
+ sourceIdVersion: record.transcriptIdVersion,
},
existsOk: true,
target: 'Feature',
@@ -309,7 +321,7 @@ const uploadFile = async (opt) => {
content: {
biotype: 'transcript',
source: rid(source),
- sourceId: record[HEADER.transcriptId],
+ sourceId: record.transcriptId,
sourceIdVersion: null,
},
existsOk: true,
@@ -346,13 +358,13 @@ const uploadFile = async (opt) => {
// TODO: protein -> elementof -> transcript
// transcript -> aliasof -> refseq
- if (record[HEADER.refseqId]) {
+ if (record.refseqId) {
try {
const refseq = await conn.getUniqueRecordBy({
filters: {
AND: [
{ source: rid(refseqSource) },
- { sourceId: record[HEADER.refseqId] },
+ { sourceId: record.refseqId },
{ sourceIdVersion: null },
],
},
@@ -368,14 +380,14 @@ const uploadFile = async (opt) => {
target: 'crossreferenceof',
});
} catch (err) {
- logger.log('error', `failed cross-linking from ${record[HEADER.transcriptId]} to ${record[HEADER.refseqId]}`);
- refseqMissingRecords.add(record[HEADER.refseqId]);
+ logger.log('error', `failed cross-linking from ${record.transcriptId} to ${record.refseqId}`);
+ refseqMissingRecords.add(record.refseqId);
}
}
// gene -> aliasof -> hgnc
- if (record[HEADER.hgncId] && newGene) {
+ if (record.hgncId && newGene) {
try {
- const hgnc = await _hgnc.fetchAndLoadBySymbol({ conn, paramType: 'hgnc_id', symbol: record[HEADER.hgncId] });
+ const hgnc = await _hgnc.fetchAndLoadBySymbol({ conn, paramType: 'hgnc_id', symbol: record.hgncId });
await conn.addRecord({
content: {
in: rid(hgnc), out: rid(gene), source: rid(source),
@@ -385,8 +397,8 @@ const uploadFile = async (opt) => {
target: 'crossreferenceof',
});
} catch (err) {
- hgncMissingRecords.add(record[HEADER.hgncId]);
- logger.log('error', `failed cross-linking from ${gene.sourceid} to ${record[HEADER.hgncId]}`);
+ hgncMissingRecords.add(record.hgncId);
+ logger.log('error', `failed cross-linking from ${gene.sourceid} to ${record.hgncId}`);
}
}
counts.success++;
diff --git a/src/entrez/refseq.js b/src/entrez/refseq.js
index 5079d55d..22fbca46 100644
--- a/src/entrez/refseq.js
+++ b/src/entrez/refseq.js
@@ -3,6 +3,8 @@
*/
const Ajv = require('ajv');
const _ = require('lodash');
+const pLimit = require('p-limit');
+
const {
fetchByIdList, uploadRecord, preLoadCache: preLoadAnyCache, fetchAndLoadBySearchTerm: search,
@@ -10,10 +12,12 @@ const {
const { checkSpec } = require('../util');
const { rid } = require('../graphkb');
const { refseq: SOURCE_DEFN } = require('../sources');
+const { logger } = require('../logging');
-const ajv = new Ajv();
+const ajv = new Ajv();
+const CONCURENCY_LIMIT = 100;
const DB_NAME = 'nucleotide';
const CACHE = {};
@@ -102,46 +106,50 @@ const fetchAndLoadByIds = async (api, idListIn) => {
records.push({ ...simplified, sourceIdVersion: null });
});
}
+ logger.verbose(`uploading ${records.length} records`);
+
+ const limit = pLimit(CONCURENCY_LIMIT);
+ const result = await Promise.all(records.map(rec => limit(() => uploadRecord(api, rec, {
+ cache: CACHE,
+ sourceDefn: SOURCE_DEFN,
+ target: 'Feature',
+ }))));
- const result = await Promise.all(records.map(
- async record => uploadRecord(api, record, {
- cache: CACHE,
- sourceDefn: SOURCE_DEFN,
- target: 'Feature',
- }),
- ));
// for versioned records link to the unversioned version
- await Promise.all(result.map(async (record) => {
- if (record.sourceIdVersion !== undefined && record.sourceIdVersion !== null) {
- const unversioned = await api.addRecord({
- content: {
- biotype: record.biotype,
- description: record.description,
- displayName: record.sourceId.toUpperCase(),
- longName: record.longName,
- name: record.name,
- source: rid(record.source),
- sourceId: record.sourceId,
- sourceIdVersion: null,
- },
- existsOk: true,
- fetchConditions: {
- AND: [
- { name: record.name },
- { source: rid(record.source) },
- { sourceId: record.sourceId },
- { sourceIdVersion: null },
- ],
- },
- target: 'Feature',
- });
- await api.addRecord({
- content: { in: rid(record), out: rid(unversioned), source: record.source },
- existsOk: true,
- target: 'GeneralizationOf',
- });
- }
- }));
+ await Promise.all(result
+ .filter(r => (r.sourceIdVersion !== undefined && r.sourceIdVersion !== null))
+ .map((record) => {
+ const linkRecords = async () => {
+ const unversioned = await api.addRecord({
+ content: {
+ biotype: record.biotype,
+ description: record.description,
+ displayName: record.sourceId.toUpperCase(),
+ longName: record.longName,
+ name: record.name,
+ source: rid(record.source),
+ sourceId: record.sourceId,
+ sourceIdVersion: null,
+ },
+ existsOk: true,
+ fetchConditions: {
+ AND: [
+ { name: record.name },
+ { source: rid(record.source) },
+ { sourceId: record.sourceId },
+ { sourceIdVersion: null },
+ ],
+ },
+ target: 'Feature',
+ });
+ await api.addRecord({
+ content: { in: rid(record), out: rid(unversioned), source: record.source },
+ existsOk: true,
+ target: 'GeneralizationOf',
+ });
+ };
+ return limit(() => linkRecords);
+ }));
return result;
};
@@ -164,9 +172,12 @@ const fetchAndLoadBySearchTerm = (api, term, opt = {}) => search(api, term, {
target: 'Feature',
});
+const cacheHas = key => Boolean(CACHE[key]);
+
module.exports = {
SOURCE_DEFN,
+ cacheHas,
fetchAndLoadByIds,
fetchAndLoadBySearchTerm,
parseRecord,
diff --git a/src/graphkb.js b/src/graphkb.js
index 8657c7a2..18b8358d 100644
--- a/src/graphkb.js
+++ b/src/graphkb.js
@@ -57,11 +57,16 @@ const shouldUpdate = (modelIn, originalContentIn, newContentIn, upsertCheckExclu
ignoreMissing: true,
});
+ const nullLike = [undefined, '', null];
+
for (const key of Object.keys(formatted)) {
if (upsertCheckExclude.includes(key)) {
continue;
}
if (!_.isEqual(originalContent[key], formatted[key])) {
+ if (nullLike.includes(originalContent[key]) && nullLike.includes(formatted[key])) {
+ continue;
+ }
logger.info(`should update record (${
originalContent['@rid']
}) on model (${
@@ -459,6 +464,7 @@ class ApiConnection {
/**
* @param {object} opt
* @param {string} opt.target
+ * @param {object} opt.content
* @param {boolean} [opt.existsOk=false] do not error if a record cannot be created because it already exists
* @param {object} [opt.fetchConditions=null] the filters clause to be used in attempting to fetch this record
* @param {boolean} [opt.fetchExisting=true] return the record if it already exists
diff --git a/src/index.js b/src/index.js
index 0581ddd4..da1f6944 100644
--- a/src/index.js
+++ b/src/index.js
@@ -16,7 +16,7 @@ const sources = require('./sources');
const ontology = require('./ontology');
const util = require('./util');
-const { logger, getFilename } = require('./logging');
+const { logger } = require('./logging');
const runLoader = async (options, loaderFunc, loaderOptions = {}) => {
@@ -40,9 +40,6 @@ const runLoader = async (options, loaderFunc, loaderOptions = {}) => {
errorLogPrefix: options.errorLogPrefix,
});
- if (getFilename()) {
- logger.info(`logs written to ${getFilename()}`);
- }
logger.info(`created: ${JSON.stringify(apiConnection.getCreatedCounts())}`);
logger.info('upload complete');
};
diff --git a/src/iprkb.js b/src/iprkb.js
deleted file mode 100644
index b3a370bd..00000000
--- a/src/iprkb.js
+++ /dev/null
@@ -1,810 +0,0 @@
-const parse = require('csv-parse/lib/sync');
-const fs = require('fs');
-const moment = require('moment');
-
-const { variant: { parse: variantParser }, position: { Position } } = require('@bcgsc-pori/graphkb-parser');
-
-const { logger } = require('./logging');
-const _pubmed = require('./entrez/pubmed');
-const _hgnc = require('./hgnc');
-const _ctg = require('./clinicaltrialsgov');
-const { convertRowFields } = require('./util');
-const {
- orderPreferredOntologyTerms,
- rid,
-} = require('./graphkb');
-
-
-const { iprkb: SOURCE_DEFN } = require('./sources');
-
-const DEFAULT_ASSEMBLY = 'GRCh37';
-
-
-const HEADER = {
- createdAt: 'kb_reference_created_date',
- createdBy: 'kb_reference_created_by_user',
- diseaseList: 'kb_reference_disease_list',
- evidenceId: 'kb_reference_ref_id',
- evidenceLevel: 'kb_reference_evidence',
- evidenceTitle: 'kb_reference_id_title',
- evidenceType: 'kb_reference_id_type',
- ident: 'kb_reference_uuid',
- relevance: 'kb_reference_relevance',
- reviewStatus: 'kb_reference_review_status',
- reviewedBy: 'kb_reference_reviewed_by_user',
- statementType: 'kb_reference_type',
- subject: 'kb_reference_context',
- variants: 'kb_reference_events_expression',
-};
-
-
-const THERAPY_MAPPING = {
- ap26113: 'ap-26113',
- asp3026: 'asp-3026',
- 'dacomitinib (pf 00299804)': 'dacomitinib',
- 'gamma secretase inhibitor': 'enzyme inhibitors: gamma secretase inhibitors',
- lapitinib: 'lapatinib',
- oliparib: 'olaparib',
- 'rapamycin (mtor inhibitor)': 'rapamycin',
- selumitinib: 'selumetinib',
- tratuzumab: 'trastuzumab',
-};
-
-
-const RELEVANCE_SKIP = [
- // not considered infomative enough to load to GraphKB
- 'not determined',
- 'test target',
- 'not specified',
- 'equally-as-effective-as',
- 'more-effective-than',
- // new GraphKB will only use oncokb list for these
- 'cancer associated gene',
- 'oncogene',
- 'putative tumour suppressor',
- 'tumour suppressor',
- 'putative oncogene',
-];
-
-
-const stripRefSeqVersion = (name) => {
- const match = /^(n[mpg]_\d+)\.\d+$/.exec(name);
- return match
- ? match[1]
- : name;
-};
-
-
-const getFeature = async (conn, rawName) => {
- let name = rawName;
-
- if (!name) {
- throw new Error('getFeature requires a name for input');
- }
-
- if (/^hla\.[a-z0-9]+$/i.exec(name)) {
- name.replace('.', '-');
- }
- name = name.replace(/\.\d+$/, '');
-
- try {
- return await conn.getUniqueRecordBy({
- filters: {
- OR: [
- { name: stripRefSeqVersion(name) },
- { sourceId: stripRefSeqVersion(name) },
- ],
- },
- sort: orderPreferredOntologyTerms,
- target: 'Feature',
- });
- } catch (err) {
- // see if it is a hugo gene
- try {
- return await _hgnc.fetchAndLoadBySymbol({ conn, symbol: name });
- } catch (otherErr) {}
-
- // or an old symbol for a hugo gene
- try {
- return await _hgnc.fetchAndLoadBySymbol({ conn, paramType: 'prev_symbol', symbol: name });
- } catch (otherErr) {}
- throw err;
- }
-};
-
-
-const stripDrugPlurals = name => name.toLowerCase().trim().replace(/\bmimetics\b/, 'mimetic').replace(/\binhibitors\b/, 'inhibitor');
-
-
-/**
- * Determine what the statement applies to based on its type, relevance, and context
- *
- * @returns {object} the record the statement applies to
- */
-const extractAppliesTo = async (conn, record, source) => {
- const {
- statementType,
- subject: appliesToInput,
- variants,
- features,
- disease,
- evidence,
- relevance,
- } = record;
-
- const subject = appliesToInput && appliesToInput.replace(/-/g, ' ');
-
- if (statementType === 'therapeutic') {
- if (!subject) {
- throw new Error(`therapeutic statement is expected to have a subject 9${record.ident}`);
- }
- if (relevance.includes('resistance') || relevance.includes('sensitivity') || relevance.includes('response')) {
- let drugName = stripDrugPlurals(subject);
-
- if (THERAPY_MAPPING[drugName]) {
- drugName = THERAPY_MAPPING[drugName];
- }
- return conn.addTherapyCombination(source, drugName);
- } if (relevance === 'targetable') {
- if (!disease) {
- throw new Error(`required disease not defined (relevance=${relevance}, statementType=${statementType})`);
- }
- return conn.getUniqueRecordBy({
- filters: { name: disease },
- sort: orderPreferredOntologyTerms,
- target: 'Disease',
- });
- } if (relevance === 'eligibility') {
- if (evidence.length === 1) {
- return evidence[0];
- }
- }
- } if (statementType === 'biological' || statementType === 'occurrence') {
- if (/.*\bfunction(al)?.*/.exec(relevance) || relevance.includes('dominant negative')) {
- if (features.length + variants.length === 1) {
- if (features.length) {
- return features[0];
- }
- const [{
- reference1,
- reference2,
- }] = variants;
-
- if (reference1 && !reference2) {
- return reference1;
- }
- }
- throw new Error(`Unable to determine feature target (variants=Array[${variants.length}], features=Array[${features.length}])`);
- } else if (['recurrent', 'observed', 'pathogenic', 'mutation hotspot'].includes(relevance)) {
- if (!disease) {
- if (subject && (subject.includes('somatic') || subject === 'cancer')) {
- return conn.getUniqueRecordBy({
- filters: { name: 'cancer' },
- sort: orderPreferredOntologyTerms,
- target: 'Disease',
- });
- }
- throw new Error(`required disease not defined (relevance=${relevance}, statementType=${statementType})`);
- }
- return conn.getUniqueRecordBy({
- filters: { name: disease },
- sort: orderPreferredOntologyTerms,
- target: 'Disease',
- });
- } else if (
- [
- 'tumour suppressive',
- 'likely tumour suppressive',
- 'oncogenic',
- 'likely oncogenic',
- 'haploinsufficient',
- 'oncogenic fusion',
- 'disruptive fusion',
- ].includes(relevance)
- ) {
- if (features.length + variants.length === 1) {
- return features[0] || variants[0];
- }
- }
- throw new Error(`unable to determine the target gene (${features.length}) or variant (${variants.length}) being referenced (relevance=${relevance})`);
- } else if (statementType === 'diagnostic') {
- return conn.getUniqueRecordBy({
- filters: { name: disease },
- sort: orderPreferredOntologyTerms,
- target: 'Disease',
- });
- } else if (statementType === 'prognostic') {
- return conn.getVocabularyTerm('patient');
- }
- throw new Error(`not implemented (relevance=${relevance}, statementType=${statementType}, disease=${disease || ''})`);
-};
-
-
-const extractRelevance = (record) => {
- const {
- statementType,
- relevance: rawRelevance,
- subject,
- } = record;
-
- if (!rawRelevance) {
- throw new Error(`relevance not found and cannot be extracted (${record.ident})`);
- }
-
- const relevance = rawRelevance
- .replace(/-/g, ' ')
- .replace(/\binferred\b/, 'likely')
- .replace(/\putative\b/, 'likely')
- .replace(/\boncogene\b/, 'oncogenic')
- .replace(/\btumou?r suppressor\b/, 'tumour suppressive');
-
- if (statementType === 'diagnostic') {
- return 'diagnostic indicator';
- } if (statementType === 'prognostic') {
- if (/^favou?rable$/.exec(relevance)) {
- return 'favourable prognosis';
- } if (/^unfavou?rable prognosis$/.exec(relevance)) {
- return 'unfavourable prognosis';
- }
- return 'prognostic indicator';
- } if (subject === 'oncogenic fusion' && relevance.includes('gain of function')) {
- return 'oncogenic fusion';
- } if (relevance === 'associated with') {
- if (subject.toLowerCase() === 'pathogenic germline mutation') {
- return 'pathogenic';
- }
- return subject;
- }
- return relevance;
-};
-
-
-/**
- * Parse CategoryVariants and convert deprecated PositionalVariant syntax.
- * Convert them to the current syntax and return them
- */
-const convertDeprecatedSyntax = (string) => {
- if (typeof string !== 'string') {
- throw new Error(`bad input (${string}) must be a string`);
- }
- string = string.toString().trim();
- const result = {};
- const zygosity = /.*(_(ns|heterozygous|homozygous|na|any)(\s*\(germline\))?)$/.exec(string);
-
- if (zygosity) {
- if (zygosity[3]) {
- result.germline = true;
- }
- if (zygosity[2] === 'heterozygous' || zygosity[2] === 'homozygous') {
- result.zygosity = zygosity[2];
- }
- string = string.slice(0, string.length - zygosity[1].length).trim();
- }
- let match = null;
-
- if (string.startsWith('FANN_')) {
- Object.assign(result, { isFeature: true, name: string.slice(5) });
- } else if (match = /^SV_e.([^(]+)\(([^,]+)(,\s*([^)]+))?\)\(([^,]+),([^)]+)\)$/.exec(string)) {
- // exon level structural variant
- result.type = 'structural variant';
- const cytobandPattern = /^(1[0-9]|2[0-2]|[1-9]|X|Y)([pq]\d+(\.\d+)?)$/;
- let submatch;
- match = {
- pos1: match[5],
- pos1Prefix: 'e',
- pos2: match[6],
- pos2Prefix: 'e',
- reference1: match[2],
- reference2: match[3]
- ? match[4]
- : match[2],
- type: match[1],
- };
-
- if (match.pos1.includes(':')) {
- match.reference1 = match.pos1.slice(0, match.pos1.indexOf(':'));
- match.pos1 = match.pos1.slice(match.pos1.indexOf(':') + 1);
- }
- if (match.pos2.includes(':')) {
- match.reference2 = match.pos2.slice(0, match.pos2.indexOf(':'));
- match.pos2 = match.pos2.slice(match.pos2.indexOf(':') + 1);
- }
- if (match.pos2 === 'na' && (submatch = cytobandPattern.exec(match.reference2))) {
- match.reference2 = submatch[1];
- match.pos2 = submatch[2];
- match.pos2Prefix = 'y';
- }
- if (match.pos1 === 'na' && (submatch = cytobandPattern.exec(match.reference1))) {
- match.reference1 = submatch[1];
- match.pos1 = submatch[2];
- match.pos1Prefix = 'y';
- }
- if (match.pos1.includes('intron')) {
- match.pos1Prefix = 'i';
- match.pos1 = match.pos1.replace('intron', '').trim();
- }
- if (match.pos2.includes('intron')) {
- match.pos2Prefix = 'i';
- match.pos2 = match.pos2.replace('intron', '').trim();
- }
- result.type = match.type;
-
- if (match.pos1 === '?' && match.pos2 === '?') {
- if (match.reference1 === '?') {
- result.reference1 = match.reference2;
- } else if (match.reference2 === '?') {
- result.reference1 = match.reference1;
- } else {
- result.reference1 = match.reference1;
- result.reference2 = match.reference2;
- }
- } else {
- result.positional = `(${match.reference1},${match.reference2}):${match.type}(${match.pos1Prefix}.${match.pos1},${match.pos2Prefix}.${match.pos2})`;
- }
- } else if (match = /^(SV|CNV|MUT)_([^_:]+)(_([^_]+))?$/.exec(string)) {
- let type;
- const [, category, gene, , vocabulary] = match;
-
- if (category === 'CNV') {
- type = 'copy variant';
- } else if (category === 'SV') {
- type = 'structural variant';
- } else {
- type = 'mutation';
- }
- if (vocabulary && !['not specified', 'any'].includes(vocabulary)) {
- type = vocabulary;
-
- if (vocabulary === 'copy loss' && result.zygosity === 'homozygous') {
- type = 'deep deletion';
- }
- }
- Object.assign(result, { reference1: gene, type });
- } else if (match = /^ELV-(PROT|RNA)_([^_]+)_([^_]+)$/.exec(string)) {
- let type = match[1] === 'PROT'
- ? 'protein'
- : 'rna';
- type = match[3].replace(' ', ` ${type} `);
-
- if (type === 'not rna expressed') {
- type = 'no rna expression';
- }
- Object.assign(result, { reference1: match[2], type });
- } else if (!/[.;,:_]/.exec(string)) {
- Object.assign(result, { isFeature: true, name: string });
- } else if (!/[!&$#]/.exec(string) && string.includes(':')) {
- if (/^(MUT|CNV)_/.exec(string)) {
- string = string.slice(4);
- }
- if (match = /(X\[(\d+|n)\])$/.exec(string)) {
- string = string.slice(0, string.length - match[1].length);
-
- if (match[2] !== 'n') {
- string = `${string}${match[2]}`;
- }
- }
- if (match = /^([^_]+)_(not specified|any)$/.exec(string)) {
- Object.assign(result, { reference1: match[1], type: 'mutation' });
- } else {
- if (match = /^.+:([^:]+:[^:]+)$/.exec(string)) { // if multiple features are defined, use the most specific
- string = match[1];
- }
- const [reference1] = string.split(':');
- string = string.slice(reference1.length + 1);
-
- if (match = /^(p.[X?][n?](_[X?][n?])?(fs|\*|spl|dup))$/.exec(string)) {
- result.reference1 = reference1;
-
- if (match[3] === 'spl') {
- result.type = 'splice-site';
- } else if (match[3] === '*') {
- result.type = 'truncating';
- } else if (match[3] === 'fs') {
- result.type = 'frameshift';
- } else if (match[3] === 'dup') {
- result.type = 'duplication';
- }
- } else if (match = /^(p.[X?]\*)$/.exec(string)) {
- Object.assign(result, { reference1, type: 'truncating' });
- } else if (match = /^(p.[X?][n?]fs)$/.exec(string)) {
- Object.assign(result, { reference1, type: 'frameshift' });
- } else if (match = /^(e\.(\d+)\?)$/.exec(string)) {
- Object.assign(result, { positional: `${reference1}:e.${match[2]}mut` });
- } else {
- Object.assign(result, { positional: `${reference1}:${string}` });
- }
- }
- } else {
- logger.warn(`unable to convert syntax for ${string}`);
- throw new Error(`invalid syntax (${string}`);
- }
- if (result.reference1) {
- result.reference1 = stripRefSeqVersion(result.reference1.toLowerCase().trim());
- }
- if (result.reference2) {
- result.reference2 = stripRefSeqVersion(result.reference2.toLowerCase().trim());
- }
- if (result.positional) {
- try {
- result.positional = variantParser(result.positional).toJSON();
-
- for (const [key, value] of Object.entries(result.positional)) {
- if (result.positional[key] instanceof Position) {
- result.positional[key] = value.toJSON();
- }
- }
- } catch (err) {
- logger.warn(`unable to parse syntax for ${string} from ${result.positional}`);
- }
- }
- return result;
-};
-
-/**
- * Sort through the record history to retrieve the current state of the record
- * the user who created the record and the user who reviewed the record
- *
- * Removes historical records after assigning a review status and created by user
- */
-const cleanHistory = (jsonList) => {
- // won't be able to port over the old uuid's for any rows that will be split into multiple statements
- // can still find the correct users though
- // will only port review history for now as well as creation date
- const records = {};
-
- for (const record of jsonList) {
- record._raw = { ...record };
- record.reviewStatus = record.reviewStatus
- ? record.reviewStatus.toLowerCase().trim()
- : '';
-
- if (records[record.ident] === undefined) {
- records[record.ident] = [];
- }
- record.createdAt = moment(record.createdAt).unix();
-
- records[record.ident].push(record);
- }
-
- for (const ident of Object.keys(records)) {
- if (records[ident].length > 1) {
- records[ident] = records[ident].sort((r1, r2) => r2.createdAt - r1.createdAt);
-
- if (records[ident][0].reviewStatus === 'reviewed') {
- records[ident][0].history = records[ident].slice(1);
- }
- }
- records[ident] = records[ident][0];
- }
- return Object.values(records);
-};
-
-const cleanStringList = (string, delim = ';') => Array.from(
- string.toString().split(delim),
- x => x.trim(),
-).filter(x => x !== '' && x !== 'not specified');
-
-
-/**
- * Given a list of json records. Expand statments so that all semi-colon delimited lists are split
- * into separate records
- */
-const expandRecords = (jsonList) => {
- const records = [];
-
- for (const record of jsonList) {
- const {
- variants: variantsList,
- subject: appliesToList,
- diseaseList,
- ...rest
- } = record;
- // columns to product on: context (;), disease_list (;), events_expression (|), ref_id (;)
- const parsedAppliesTo = cleanStringList(appliesToList || '');
-
- if (parsedAppliesTo.length === 0) {
- parsedAppliesTo.push(null);
- }
-
- for (const subject of parsedAppliesTo) {
- for (const coReqVariants of cleanStringList(variantsList, '|')) {
- const newRecord = { subject, ...rest };
- newRecord.variants = cleanStringList(coReqVariants, '&');
-
- for (const pmid of cleanStringList(record.evidenceId)) {
- newRecord.support = [{
- sourceId: pmid,
- summary: record.summary,
- }];
- }
- const diseases = cleanStringList(diseaseList || '');
-
- if (diseases.length === 0) {
- records.push(newRecord);
- } else {
- for (const disease of diseases) {
- records.push({ ...newRecord, disease });
- }
- }
- }
- }
- }
- return records;
-};
-
-
-const processVariant = async (conn, variant) => {
- const reference1 = rid(await getFeature(conn, variant.reference1 || variant.positional.reference1));
- let reference2 = null;
-
- if (variant.reference2 || (variant.positional && variant.positional.reference2)) {
- reference2 = rid(await getFeature(conn, variant.reference2 || variant.positional.reference2));
- }
- const type = rid(await conn.getVocabularyTerm(variant.type || variant.positional.type));
-
- if (variant.positional) {
- const {
- positional, noFeatures, multiFeature, prefix, ...content
- } = {
- ...variant, ...variant.positional, reference1, reference2, type,
- };
-
- // default genomic variants to hg19 when not given
- if (content.break1Repr.startsWith('g.') && !content.assembly) {
- content.assembly = DEFAULT_ASSEMBLY;
- }
-
- return conn.addVariant({
- content,
- existsOk: true,
- target: 'PositionalVariant',
- });
- }
- return conn.addVariant({
- content: {
- ...variant,
- reference1,
- reference2,
- type,
- },
- existsOk: true,
- target: 'CategoryVariant',
- });
-};
-
-
-const processRecord = async ({ conn, record: inputRecord, source }) => {
- const record = { ...inputRecord, variants: [] };
- const conditions = [];
- const evidence = [];
-
- for (const variant of inputRecord.variants) {
- record.variants.push(convertDeprecatedSyntax(variant));
- }
- const variants = await Promise.all(
- record.variants
- .filter(v => !v.isFeature)
- .map(async variant => processVariant(conn, variant)),
- );
-
- const features = await Promise.all(
- record.variants.filter(v => v.isFeature).map(async v => getFeature(conn, v.name)),
- );
-
- for (const variant of variants) {
- conditions.push(rid(variant));
- }
- // try to find the disease name in GraphKB
- let disease;
-
- if (record.disease) {
- try {
- disease = await conn.getUniqueRecordBy({
- filters: { name: record.disease },
- sort: orderPreferredOntologyTerms,
- target: 'Disease',
- });
- } catch (err) {
- throw err;
- }
- conditions.push(rid(disease));
- }
-
- // check that the expected pubmedIds exist in the db
- for (let { sourceId } of record.support) {
- let evidenceRec;
-
- if (sourceId.startsWith('NCT')) {
- evidenceRec = await _ctg.fetchAndLoadById(conn, sourceId);
- } else {
- if (sourceId.toLowerCase().startsWith('pmid:')) {
- sourceId = sourceId.slice('pmid:'.length);
- }
- [evidenceRec] = await _pubmed.fetchAndLoadByIds(conn, [sourceId]);
- }
- if (!evidenceRec) {
- throw new Error(`unable to retrieve evidence record for sourceId (${sourceId})`);
- }
- evidence.push(rid(evidenceRec));
- }
-
- // determine the record relevance
- const relevance = await conn.getVocabularyTerm(extractRelevance(record));
-
- // determine the subject
- const subject = await extractAppliesTo(
- conn,
- {
- ...record, evidence, features, relevance: relevance.name, variants,
- },
- source,
- );
-
- const reviews = [];
- let reviewStatus = 'pending';
-
- if (record.createdBy) {
- reviews.push({
- createdAt: record.createdAt,
- createdBy: record.createdBy,
- status: 'initial',
- });
- }
- if (record.reviewedBy && record.reviewedBy !== record.createdBy) {
- reviewStatus = 'passed';
- reviews.push({
- createdAt: record.reviewedAt || record.createdAt,
- createdBy: record.reviewedBy,
- status: 'passed',
- });
- }
- if (subject && !conditions.includes(rid(subject))) {
- conditions.push(rid(subject));
- }
- // console.log(record);
- // now create the statement
- await conn.addRecord({
- content: {
- conditions,
- evidence,
- relevance: rid(relevance),
- reviewStatus,
- reviews,
- source: rid(source),
- sourceId: record.ident,
- subject: rid(subject),
- },
- existsOk: true,
- fetchExisting: false,
- target: 'Statement',
- });
-};
-
-
-const uploadFile = async ({ filename, conn, errorLogPrefix }) => {
- logger.info('loading content from IPR');
- const counts = {
- error: 0, history: 0, skip: 0, success: 0,
- };
- logger.info(`loading: ${filename}`);
- const content = fs.readFileSync(filename, 'utf8');
- logger.info('parsing into json');
-
- const jsonList = parse(content, {
- auto_parse: true,
- columns: true,
- comment: '##',
- delimiter: '\t',
- escape: null,
- quote: false,
- });
- logger.info(`${jsonList.length} initial records`);
- let records = [];
-
- for (const record of jsonList) {
- const newRecord = convertRowFields(HEADER, record);
-
- if (
- (!['pubmed', 'pmcid'].includes(newRecord.evidenceType) && !newRecord.evidenceType.startsWith('ClinicalT'))
- || newRecord.reviewStatus.toLowerCase() === 'flagged-incorrect'
- || newRecord.relevance === 'observed'
- ) {
- counts.skip++;
- continue;
- }
- records.push(newRecord);
- }
- logger.info(`${records.length} non-skipped records`);
- const source = await conn.addRecord({
- content: SOURCE_DEFN,
- existsOk: true,
- fetchConditions: { name: SOURCE_DEFN.name },
- target: 'Source',
- });
-
- records = cleanHistory(records);
- logger.info(`${records.length} records after cleaning history`);
-
- records = expandRecords(records);
- logger.info(`${records.length} records after list expansion`);
-
- const pubmedIdList = new Set();
- const users = {};
-
- for (const record of records) {
- for (const { sourceId } of record.support) {
- if (!sourceId.startsWith('NCT')) {
- pubmedIdList.add(sourceId);
- }
- }
-
- if (record.createdBy && users[record.createdBy] === undefined) {
- users[record.createdBy] = rid(await conn.addRecord({
- content: { name: record.createdBy },
- existsOk: true,
- target: 'User',
- }));
- }
- if (record.reviewedBy && users[record.reviewedBy] === undefined) {
- users[record.reviewedBy] = rid(await conn.addRecord({
- content: { name: record.reviewedBy },
- existsOk: true,
- target: 'User',
- }));
- }
- if (record.createdBy) {
- record.createdBy = users[record.createdBy];
- }
- if (record.reviewedBy) {
- record.reviewedBy = users[record.reviewedBy];
- }
- if (record.support.length === 1 && record.evidenceId === '25801821') {
- // MSK-IMPACT panel
- if (!record.subject && record.relevance === 'mutation hotspot') {
- record.subject = 'cancer';
- }
- }
- }
- logger.info(`loading ${pubmedIdList.size} articles from pubmed`);
- await _pubmed.preLoadCache(conn);
- await _pubmed.fetchAndLoadByIds(conn, Array.from(pubmedIdList));
-
- const errorList = [];
-
- for (let i = 0; i < records.length; i++) {
- const record = records[i];
- logger.debug(`processing ${record.ident} (${i} / ${records.length})`);
-
- if (record.history) {
- counts.history++;
- }
- if (RELEVANCE_SKIP.includes(record.relevance)) {
- counts.skip++;
- continue;
- }
-
- try {
- await processRecord({ conn, record, source });
- counts.success++;
- } catch (err) {
- const error = err.error || err;
- errorList.push({
- error,
- errorMessage: error.toString(),
- index: i,
- row: record,
- });
- logger.error(error);
- counts.error++;
- }
- }
- const errorLogFile = `${errorLogPrefix}-iprkb.json`;
- logger.info(`writing errors to ${errorLogFile}`);
- fs.writeFileSync(errorLogFile, JSON.stringify({ records: errorList }, null, 2));
- logger.info(JSON.stringify(counts));
- logger.info(JSON.stringify(users));
-};
-
-module.exports = {
- SOURCE_DEFN, convertDeprecatedSyntax, kb: true, uploadFile,
-};
diff --git a/src/logging.js b/src/logging.js
index 248951dd..4baa4e41 100644
--- a/src/logging.js
+++ b/src/logging.js
@@ -3,9 +3,6 @@
* @module importer/logging
*/
const winston = require('winston');
-const DailyRotateFile = require('winston-daily-rotate-file');
-const path = require('path');
-const moment = require('moment');
const GKB_LOG_LEVEL = process.env.GKB_LOG_LEVEL || 'info';
@@ -17,18 +14,6 @@ const transports = [
}),
];
-let logfile = null;
-
-if (process.env.GKB_LOG_DIR) {
- logfile = path.join(process.env.GKB_LOG_DIR, `${process.env.npm_package_name}-%DATE%-${process.pid}.log`);
- const transport = new DailyRotateFile({
- filename: logfile,
- level: GKB_LOG_LEVEL,
- maxFiles: `${process.env.GKB_LOG_MAX_FILES || 14}d`, // remove logs more than 2 weeks old
- timestamp: true,
- });
- transports.push(transport);
-}
const logFormat = winston.format.printf(info => `${info.timestamp} ${info.level}: ${info.message}`);
@@ -42,15 +27,4 @@ const logger = winston.createLogger({
});
-const getFilename = () => {
- if (logfile) {
- return logfile.replace('%DATE%', moment().format('YYYY-MM-DD'));
- }
- return null;
-};
-
-if (logfile) {
- logger.log('info', `writing logs to ${getFilename()}`);
-}
-
-module.exports = { getFilename, logger };
+module.exports = { logger };
diff --git a/src/ncit/README.md b/src/ncit/README.md
index 017a15a3..9db49158 100644
--- a/src/ncit/README.md
+++ b/src/ncit/README.md
@@ -1,42 +1,50 @@
# NCI Thesuarus
First download the latest version of the plain text tab delimited files. This should include both
-the main thesaurus file
+the main thesaurus file and the cross mapping file
+
+- [Load the Main Flat File](#load-the-main-flat-file)
+- [FDA Cross Mapping File](#fda-cross-mapping-file)
+
+## Load the Main Flat File
+
+Download the file
```bash
-wget https://evs.nci.nih.gov/ftp1/NCI_Thesaurus/archive/
-LATEST=$(cat index.html | grep '"[0-9][0-9]*\.[0-9][0-9][a-z]*_Release' -o | grep -o '[0-9][0-9]*\.[0-9][0-9][a-z]*' | tail -n 1)
-rm index.html
-echo "Latest Release: $LATEST"
-
-NAME=Thesaurus_$LATEST
-wget https://evs.nci.nih.gov/ftp1/NCI_Thesaurus/archive/${LATEST}_Release/Thesaurus_${LATEST}.FLAT.zip
-
-unzip ${NAME}.FLAT.zip
-rm ${NAME}.FLAT.zip
-mv Thesaurus.txt Thesaurus_v${LATEST}.txt
-rm -rf __MACOSX
+wget https://evs.nci.nih.gov/ftp1/NCI_Thesaurus/Thesaurus.FLAT.zip
+unzip Thesaurus.FLAT.zip
+rm Thesaurus.FLAT.zip
```
-As well as the FDA cross-mapping reference file
+This is a headerless tab delimited file with the following
+[format](https://evs.nci.nih.gov/ftp1/NCI_Thesaurus/ReadMe.txt)
+
+- code
+- concept name
+- parents
+- synonyms
+- definition
+- display name
+- concept status
+- semantic type
+
+Next use the general file loader to load the NCIt terms
```bash
-wget https://evs.nci.nih.gov/ftp1/FDA/UNII/Archive/
-LATEST=$(cat index.html | grep -P 'href="[^"]+txt"' -o | cut -f 2 -d\" | sort | tail -n 1)
-rm index.html
-echo "Latest Release: $LATEST"
-wget https://evs.nci.nih.gov/ftp1/FDA/UNII/Archive/$LATEST
+node bin/loadFile ncit Thesaurus.txt
```
-Next use the general file loader to load the NCIt terms
+## FDA Cross Mapping File
+
+Now download the FDA cross-mapping reference file
```bash
-node bin/loadFile ncit Thesaurus_v*.txt
+wget https://evs.nci.nih.gov/ftp1/FDA/UNII/FDA-UNII_NCIt_Subsets.txt
```
Then, after you have loaded the [FDA-SRS](../fdaSrs) data (if you are planning to load it)
load the cross-reference mapping data
```bash
-node bin/loadFile ncitFdaXref FDA-UNII_NCIt_Subsets_*.txt
+node bin/loadFile ncitFdaXref FDA-UNII_NCIt_Subsets.txt
```
diff --git a/src/ncit/index.js b/src/ncit/index.js
index 0b8b5009..ed24e9a9 100644
--- a/src/ncit/index.js
+++ b/src/ncit/index.js
@@ -1,10 +1,3 @@
-/**
- * Module responsible for parsing the NCIT owl file and uploading the converted records to the Graph KB
- *
- * NCIT owl file is very large. When uploading additional arguments were specified for node (--stack-size=8192 --max-old-space-size=20000)
- * Additionally node v10 is required since the string size is too small in previous versions
- * @module importer/ncit
- */
const { loadDelimToJson } = require('../util');
const {
rid, generateCacheKey, convertRecordToQueryFilters,
@@ -64,7 +57,9 @@ const DEPRECATED = [
'C85834', // retired concept
];
-
+/**
+ * Determine if the term is a body part, disease, or drug
+ */
const pickEndpoint = (conceptName, parentConcepts = '') => {
let endpoint = null;
@@ -119,44 +114,60 @@ const cleanRawRow = (rawRow) => {
|| conceptStatus === 'Retired_Concept'
),
description: definition,
+ name: rawName.trim(),
parents: (
rawParents.split('|')
.map(parent => parent.trim())
.filter(parent => parent && !DEPRECATED.includes(parent))
.map(parent => parent.toLowerCase())
),
+ species: '',
+ synonyms: (rawSynonyms.split('|')
+ .map(s => s.trim())
+ .filter(s => s)),
};
const sourceId = id.toLowerCase().trim();
const endpoint = pickEndpoint(semanticType, parentConcepts);
- // use the synonym name if no name given
- const synonyms = rawSynonyms.split('|')
- .map(s => s.trim())
- .filter(s => s);
- let name = rawName.trim();
-
// split up the name if it is a list
- if (name && name.includes('|')) {
- const names = name.split('|')
+ if (row.name && row.name.includes('|')) {
+ const names = row.name.split('|')
.map(s => s.trim())
.filter(s => s);
- [name] = names;
- synonyms.push(...names.slice(1));
+ [row.name] = names;
+ row.synonyms.push(...names.slice(1));
}
+ const speciesMatch = (termName) => {
+ const m = /\b(murine|mouse|rat)\b/ig.exec(termName);
+
+ if (m) {
+ return m[1];
+ }
+ return '';
+ };
+
// non-human concepts should use fuller name
- if (!/\b(murine|mouse|rat)\b/.exec(name)) {
- for (const synonym of synonyms) {
- if (/\b(murine|mouse|rat)\b/.exec(synonym)) {
- name = synonym;
+ if (!speciesMatch(row.name)) {
+ for (const synonym of row.synonyms) {
+ if (speciesMatch(synonym)) {
+ row.name = synonym;
+ [, row.species] = speciesMatch(synonym);
break;
}
}
+ const species = row.parents.map(speciesMatch).filter(s => s);
+
+ if (species.length) {
+ [row.species] = species;
+ }
+ } else {
+ row.species = speciesMatch(row.name);
}
// use the synonym name if no name given
- if (!name) {
- name = sourceId;
+ if (!row.name) {
+ row.name = sourceId;
}
const url = xmlTag.replace(/^, '').replace(/>$/, '');
@@ -164,15 +175,15 @@ const cleanRawRow = (rawRow) => {
// add the parents
return {
...row,
- displayName: name.toLowerCase() === sourceId.toLowerCase()
+ displayName: row.name.toLowerCase() === sourceId.toLowerCase()
? sourceId
- : `${name} [${sourceId}]`,
+ : `${row.name} [${sourceId}]`,
endpoint,
- name: name.toLowerCase(),
+ name: row.name.toLowerCase(),
sourceId,
- synonyms: Array.from(new Set(synonyms))
+ synonyms: Array.from(new Set(row.synonyms))
.map(s => s.toLowerCase())
- .filter(s => s !== name.toLowerCase()),
+ .filter(s => s !== row.name.toLowerCase()),
url,
};
};
@@ -219,13 +230,14 @@ const uploadFile = async ({ filename, conn }) => {
.map(parent => (rowsById[parent.trim()] || {}).semanticType || '')
.join('|');
}
+ const deprecatedRows = [];
for (const raw of rawRows) {
try {
const row = cleanRawRow(raw);
if (row.deprecated) {
- logger.verbose(`skipping retired or obsolete concept ${row.sourceId}`);
+ deprecatedRows.push(row);
counts.skip++;
continue;
}
@@ -244,16 +256,32 @@ const uploadFile = async ({ filename, conn }) => {
counts.skip++;
}
}
+ logger.verbose(`skipping (${deprecatedRows.length}) retired or obsolete concepts: ${deprecatedRows.map(d => d.sourceId).join(',')}`);
const rejected = new Set();
// if possible, assign the row another name from its list of synonyms (instead of the display name)
for (const [name, dups] of Object.entries(nameDuplicates)) {
- if (name && dups && dups.length > 1) {
- logger.debug(`ncit terms (${dups.map(r => r.sourceId).join(', ')}) have non-unique name (${name})`);
- dups.forEach(d => rejected.add(d.sourceId));
+ if (dups.length < 2) {
+ continue;
+ }
+ // filter non-human name duplicates
+ const humanDups = [];
+
+ for (const dup of dups) {
+ if (dup.species) {
+ rejected.add(dup.sourceId);
+ logger.warn(`dropping non-human ncit term (${dup.sourceId}) has non-unique name (${name})`);
+ } else {
+ humanDups.push(dup);
+ }
+ }
+
+ if (name && humanDups.length > 1) {
+ logger.warn(`ncit terms (${humanDups.map(r => r.sourceId).join(', ')}) have non-unique name (${name})`);
+ humanDups.forEach(d => rejected.add(d.sourceId));
}
}
- logger.info(`rejected ${rejected.size} rows for unresolveable primary/display name conflicts`);
+ logger.warn(`rejected ${rejected.size} rows for unresolveable primary/display name conflicts`);
const source = rid(await conn.addRecord({
content: SOURCE_DEFN,
@@ -288,12 +316,12 @@ const uploadFile = async ({ filename, conn }) => {
for (let i = 0; i < rows.length; i++) {
const row = rows[i];
- logger.verbose(`processing (${i} / ${rows.length}) ${row.sourceId}`);
if (rejected.has(row.sourceId)) {
counts.error++;
continue;
}
+ logger.verbose(`processing (${i} / ${rows.length}) ${row.sourceId}`);
let record;
try {
@@ -361,12 +389,15 @@ const uploadFile = async ({ filename, conn }) => {
'displayName',
],
});
- await conn.addRecord({
- content: { in: rid(record), out: rid(alias), source },
- existsOk: true,
- fetchExisting: false,
- target: 'aliasof',
- });
+
+ if (rid(alias) !== rid(record)) {
+ await conn.addRecord({
+ content: { in: rid(record), out: rid(alias), source },
+ existsOk: true,
+ fetchExisting: false,
+ target: 'aliasof',
+ });
+ }
} catch (err) {
logger.error(`failed to link (${record.sourceId}) to alias (${synonym})`);
logger.error(err);
diff --git a/src/sources.js b/src/sources.js
index a438d92b..e80aa17a 100644
--- a/src/sources.js
+++ b/src/sources.js
@@ -1,4 +1,16 @@
const sources = {
+ PMC4232638: {
+ description: 'Statements derived from the supplementary files accompanying this publication',
+ displayName: 'PMC4232638-supp',
+ name: 'PMC4232638-supp',
+ url: 'https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4232638/bin/13059_2014_484_MOESM2_ESM.xlsx',
+ },
+ PMC4468049: {
+ description: 'Statements derived from the supplementary files accompanying this publication',
+ displayName: 'PMC4468049-supp',
+ name: 'PMC4468049-supp',
+ url: 'https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4468049/bin/NIHMS632238-supplement-2.xlsx',
+ },
cancerhotspots: {
description: 'a resource for statistically significant mutations in cancer',
displayName: 'cancerhotspots.org',
diff --git a/src/uberon/index.js b/src/uberon/index.js
index 6bb21d2e..5d689b93 100644
--- a/src/uberon/index.js
+++ b/src/uberon/index.js
@@ -73,6 +73,7 @@ const uploadFile = async ({ filename, conn }) => {
const ncitLinks = [];
logger.info(`parsing: ${filename}`);
rdf.parse(content, graph, OWL_NAMESPACE, 'application/rdf+xml');
+ logger.info('finished parsing');
const nodesByCode = convertOwlGraphToJson(graph, parseUberonId);
diff --git a/src/variants/README.md b/src/variants/README.md
new file mode 100644
index 00000000..6c099bd3
--- /dev/null
+++ b/src/variants/README.md
@@ -0,0 +1,26 @@
+# Variant Loader
+
+This loads a list of variants into GraphKB based on an input string representation of the variant
+which should use the standard syntax implemented by GraphKB (extended HGVS).
+
+This is a convenience loader and is therefore a simplified version. All features are assumed to
+be Entrez gene names and all variants are assumed to follow standard GraphKB syntax. All variants
+must be positional variants. The input is a headerless plain text file where each line is a variant
+representation.
+
+For example
+
+```text
+KRAS:p.G12D
+KRAS:p.G12C
+KRAS:p.G12_G13insK
+KRAS:p.G13delG
+```
+
+Would be the input to load the 4 KRAS variants above into GraphKB as positional variant records.
+
+The above file would be loaded by the following command
+
+```bash
+node bin/load.js file variant input.txt
+```
diff --git a/src/variants/index.js b/src/variants/index.js
new file mode 100644
index 00000000..b7966754
--- /dev/null
+++ b/src/variants/index.js
@@ -0,0 +1,82 @@
+const fs = require('fs');
+
+const { variant: { parse: parseVariant } } = require('@bcgsc-pori/graphkb-parser');
+
+const { logger } = require('../logging');
+const { orderPreferredOntologyTerms, rid } = require('../graphkb');
+const { fetchAndLoadBySymbol } = require('../entrez/gene');
+
+
+const getEntrezGene = async (conn, name) => {
+ try {
+ const gene = await conn.getUniqueRecordBy({
+ filters: {
+ AND: [
+ { source: { filters: { name: 'entrez gene' }, target: 'Source' } },
+ { biotype: 'gene' },
+ { name },
+ ],
+ },
+ sort: orderPreferredOntologyTerms,
+ target: 'Feature', // prefer non-deprecated non-alias terms
+ });
+ return gene;
+ } catch (err) {
+ // fetch directly from entrez
+ const gene = await fetchAndLoadBySymbol(conn, name);
+ return gene;
+ }
+};
+
+/**
+ * Upload the HGNC genes from a list of symbols
+ * @param {object} opt options
+ * @param {string} opt.filename the path to the input JSON file
+ * @param {ApiConnection} opt.conn the API connection object
+ */
+const uploadFile = async (opt) => {
+ const { filename, conn } = opt;
+ logger.info(`loading: ${filename}`);
+ const variants = fs.readFileSync(filename, 'utf8').split('\n')
+ .map(row => row.trim())
+ .filter(row => row);
+
+ logger.info(`adding ${variants.length} variant records`);
+ const counts = { error: 0, success: 0 };
+
+ for (const variant of variants) {
+ logger.info(`loading ${variant}`);
+
+ try {
+ const parsed = parseVariant(variant, true).toJSON();
+ const variantType = await conn.getVocabularyTerm(parsed.type);
+ const reference1 = await getEntrezGene(conn, parsed.reference1);
+
+ let reference2 = null;
+
+ if (parsed.reference2) {
+ reference2 = await getEntrezGene(conn, parsed.reference2);
+ }
+
+ await conn.addVariant({
+ content: {
+ ...parsed,
+ reference1: rid(reference1),
+ reference2: reference2 && rid(reference2),
+ type: rid(variantType),
+ },
+ existsOk: true,
+ fetchExisting: false,
+ target: 'PositionalVariant',
+ });
+
+ counts.success++;
+ } catch (err) {
+ logger.error(`${err}`);
+ counts.error++;
+ }
+ }
+ logger.info(`counts: ${JSON.stringify(counts)}`);
+};
+
+module.exports = { uploadFile };
diff --git a/test/ipr.test.js b/test/ipr.test.js
deleted file mode 100644
index 211d7653..00000000
--- a/test/ipr.test.js
+++ /dev/null
@@ -1,119 +0,0 @@
-
-
-const {
- convertDeprecatedSyntax,
-} = require('../src/iprkb');
-
-describe('convertDeprecatedSyntax', () => {
- test('SV_e.fusion(FGFR2,?)(?,?)', () => {
- const result = convertDeprecatedSyntax('SV_e.fusion(FGFR2,?)(?,?)');
- expect(result).toEqual({ reference1: 'fgfr2', type: 'fusion' });
- });
-
- test('SV_e.fusion(?,RET)(?,?)', () => {
- const result = convertDeprecatedSyntax('SV_e.fusion(?,RET)(?,?)');
- expect(result).toEqual({ reference1: 'ret', type: 'fusion' });
- });
-
- test('KIT:e.9?', () => {
- const result = convertDeprecatedSyntax('KIT:e.9?');
- const parsed = {
- break1Repr: 'e.9',
- break1Start: {
- '@class': 'ExonicPosition',
- pos: 9,
- },
- reference1: 'KIT',
- type: 'mutation',
- };
- expect(result).toEqual({ positional: parsed });
- });
-
- test('CNV_12:y.q13_q14copygain_na', () => {
- const result = convertDeprecatedSyntax('CNV_12:y.q13_q14copygain_na');
- const parsed = {
- break1Repr: 'y.q13',
- break1Start: {
- '@class': 'CytobandPosition',
- arm: 'q',
- majorBand: 13,
- },
- break2Repr: 'y.q14',
- break2Start: {
- '@class': 'CytobandPosition',
- arm: 'q',
- majorBand: 14,
- },
- reference1: '12',
- type: 'copy gain',
- };
- expect(result).toEqual({
- positional: parsed,
- });
- });
-
- test('fusion with specific exons', () => {
- const result = convertDeprecatedSyntax('(CLTC,ALK):fusion(e.31,e.20)');
- const parsed = {
- break1Repr: 'e.31',
- break1Start: {
- '@class': 'ExonicPosition',
- pos: 31,
- },
- break2Repr: 'e.20',
- break2Start: {
- '@class': 'ExonicPosition',
- pos: 20,
- },
- reference1: 'CLTC',
- reference2: 'ALK',
- type: 'fusion',
- };
- expect(result).toEqual({
- positional: parsed,
- });
- });
-
- test('CNV_ERBB2_amplification_na', () => {
- const result = convertDeprecatedSyntax('CNV_ERBB2_amplification_na');
- expect(result).toEqual({ reference1: 'erbb2', type: 'amplification' });
- });
-
- test('MUT_ARAF:p.S214A', () => {
- const result = convertDeprecatedSyntax('MUT_ARAF:p.S214A');
- const parsed = {
- break1Repr: 'p.S214',
- break1Start: {
- '@class': 'ProteinPosition',
- pos: 214,
- refAA: 'S',
- },
- refSeq: 'S',
- reference1: 'ARAF',
- type: 'missense mutation',
- untemplatedSeq: 'A',
- untemplatedSeqSize: 1,
- };
- expect(result).toEqual({ positional: parsed });
- });
-
- test('MUT_ERBB2_any', () => {
- const result = convertDeprecatedSyntax('MUT_ERBB2_any');
- expect(result).toEqual({ reference1: 'erbb2', type: 'mutation' });
- });
-
- test('MUT_MET:p.Xnspl', () => {
- const result = convertDeprecatedSyntax('MUT_MET:p.Xnspl');
- expect(result).toEqual({ reference1: 'met', type: 'splice-site' });
- });
-
- test('NTRK', () => {
- const result = convertDeprecatedSyntax('NTRK');
- expect(result).toEqual({ isFeature: true, name: 'NTRK' });
- });
-
- test('CNV_RAD54L_copy loss_homozygous', () => {
- const result = convertDeprecatedSyntax('CNV_RAD54L_copy loss_homozygous');
- expect(result).toEqual({ reference1: 'rad54l', type: 'deep deletion', zygosity: 'homozygous' });
- });
-});