From 8678f352a888db86840acaa0950f470af90758c7 Mon Sep 17 00:00:00 2001 From: bramvandesande Date: Thu, 20 Dec 2018 11:25:41 +0100 Subject: [PATCH] CLI: More comprehensive set of tests. --- scripts/cli_test_script.sh | 10 ++++++++++ src/pyscenic/cli/pyscenic.py | 3 +++ 2 files changed, 13 insertions(+) diff --git a/scripts/cli_test_script.sh b/scripts/cli_test_script.sh index 906ddd6..24e3e53 100644 --- a/scripts/cli_test_script.sh +++ b/scripts/cli_test_script.sh @@ -30,6 +30,16 @@ pyscenic ctx "${DATA_FOLDER}/GSE103322.modules.sample.dat" \ --output "${DATA_FOLDER}/motifs.csv" \ --num_workers ${CORES} +pyscenic ctx "${DATA_FOLDER}/GSE103322.sample.net.csv" \ + "${DB_FOLDER}/hg19-500bp-upstream-10species.mc9nr.feather" \ + "${DB_FOLDER}/hg19-500bp-upstream-7species.mc9nr.feather" \ + --annotations_fname "${RESOURCES_FOLDER}/motifs-v9-nr.hgnc-m0.001-o0.0.tbl" \ + --expression_mtx_fname "${DATA_FOLDER}/GSE103322.em.hgnc.sample.loom" \ + --mode "dask_multiprocessing" \ + --chunk_size 1 \ + --output "${DATA_FOLDER}/motifs.csv" \ + --num_workers ${CORES} + pyscenic ctx "${DATA_FOLDER}/GSE103322.modules.sample.dat" \ "${DB_FOLDER}/hg19-500bp-upstream-10species.mc9nr.feather" \ "${DB_FOLDER}/hg19-500bp-upstream-7species.mc9nr.feather" \ diff --git a/src/pyscenic/cli/pyscenic.py b/src/pyscenic/cli/pyscenic.py index f6e2efe..acbc70f 100644 --- a/src/pyscenic/cli/pyscenic.py +++ b/src/pyscenic/cli/pyscenic.py @@ -120,6 +120,9 @@ def prune_targets_command(args): # The alternative for which was opted in the end is binary pickling. extension = os.path.splitext(args.module_fname.name)[1].lower() if extension in {'.csv', '.tsv'}: + if args.expression_mtx_fname is None: + LOGGER.error("No expression matrix is supplied.") + sys.exit(0) LOGGER.info("Creating modules.") modules = adjacencies2modules(args) else: