Skip to content

Commit

Permalink
CLI: More comprehensive set of tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
bramvds committed Dec 20, 2018
1 parent 2629f6b commit 8678f35
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/cli_test_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down
3 changes: 3 additions & 0 deletions src/pyscenic/cli/pyscenic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8678f35

Please sign in to comment.