diff --git a/bin/miner3-bcmembers b/bin/miner3-bcmembers deleted file mode 100755 index 9453001..0000000 --- a/bin/miner3-bcmembers +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env python3 - -import argparse -import pandas as pd -import numpy as np -import json -import sys -import os - -import matplotlib -matplotlib.use('Agg') -from miner import miner, util -from miner import GIT_SHA, __version__ as pkg_version -from miner import bcmembers - - -DESCRIPTION = """miner3-bcmembers - MINER compute bicluster membership inference. -MINER Version %s (Git SHA %s)""" % (pkg_version, GIT_SHA.replace('$Id: ', '').replace(' $', '')) - -if __name__ == '__main__': - parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter, - description=DESCRIPTION) - parser.add_argument('expfile', help="input matrix") - parser.add_argument('mapfile', help="identifier mapping file") - parser.add_argument('regulons', help="regulons.json file from miner-mechinf") - parser.add_argument('outdir', help="output directory") - parser.add_argument('--skip_tpm', action="store_true", - help="overexpression threshold") - - args = parser.parse_args() - - if not os.path.exists(args.expfile): - sys.exit("expression file not found") - if not os.path.exists(args.mapfile): - sys.exit("identifier mapping file not found") - if not os.path.exists(args.regulons): - sys.exit("regulon file not found") - - if not os.path.exists(args.outdir): - os.makedirs(args.outdir) - - with open(os.path.join(args.outdir, 'run_info.txt'), 'w') as outfile: - util.write_dependency_infos(outfile) - - exp_data, conv_table = miner.preprocess(args.expfile, args.mapfile, do_preprocess_tpm=(not args.skip_tpm)) - - with open(args.regulons) as infile: - regulon_modules = json.load(infile) - bcmembers.bcmembers(exp_data, regulon_modules, args.outdir) - diff --git a/bin/miner3-subtypes b/bin/miner3-subtypes index fda42e7..d948bfe 100755 --- a/bin/miner3-subtypes +++ b/bin/miner3-subtypes @@ -56,4 +56,5 @@ if __name__ == '__main__': with open(args.regulons) as infile: regulon_modules = json.load(infile) + bcmembers.bcmembers(exp_data, regulon_modules, args.outdir) subtypes.subtypes(exp_data, regulon_modules, args.outdir) diff --git a/docs/conf.py b/docs/conf.py index 2d27980..55a493f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,7 +26,7 @@ # The short X.Y version version = '3.0' # The full version, including alpha/beta/rc tags -release = '1.1.9' +release = '1.2.1' # -- General configuration --------------------------------------------------- diff --git a/docs/index.rst b/docs/index.rst index c91bf10..7160849 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -15,11 +15,7 @@ from experimental data. miner3-coexpr miner3-mechinf - miner3-bcmembers miner3-subtypes miner3-survival - miner3-causalinf-pre - miner3-neo - miner3-causalinf-post miner3-causalinference miner3-riskpredict diff --git a/docs/miner_bcmembers.rst b/docs/miner_bcmembers.rst deleted file mode 100644 index 7b87ed1..0000000 --- a/docs/miner_bcmembers.rst +++ /dev/null @@ -1,48 +0,0 @@ -The miner3-bcmembers tool -========================== - -This utility generates revised coexpression clusters from a gene expression -file. - -You can see the tool's available options when you enter ``miner3-bcmembers -h`` -at the command prompt: - -.. highlight:: none - -:: - - usage: miner3-bcmembers [-h] expfile mapfile regulons outdir - - miner3-bcmembers - MINER compute bicluster membership inference - - positional arguments: - expfile input matrix - mapfile identifier mapping file - regulons regulons.json file from miner-mechinf - outdir output directory - - optional arguments: - -h, --help show this help message and exit - - -Parameters in detail --------------------- - -``miner3-bcmembers`` expects at least these 4 arguments: - - * **expfile:** The gene expression file a matrix in csv format. - * **mapfile:** The gene identifier map file. - * **regulons:** The regulons.json file generated by the miner-mechinf tool. - * **outdir:** The directory where the result files will be placed in. - -Output in detail ----------------- - -After successful completion there will be the following files in the output directory - - * ``coherentMembers.csv`` - * ``overExpressedMembers.csv`` - * ``underExpressedMembers.csv`` - * ``dysregulatedMembers.csv`` - * ``overExpressedMembers.json`` - * ``underExpressedMembers.json`` diff --git a/docs/miner_causalinf_post.rst b/docs/miner_causalinf_post.rst deleted file mode 100644 index a202a28..0000000 --- a/docs/miner_causalinf_post.rst +++ /dev/null @@ -1,49 +0,0 @@ -The miner3-causalinf-post tool -============================== - -This utility generates results from the output of the miner2-neo utility - -You can see the tool's available options when you enter ``miner3-causalinf-post -h`` -at the command prompt: - -.. highlight:: none - -:: - - usage: miner3-causalinf-post [-h] - expfile mapfile eigengenes neoresults datadir - outdir - - miner3-causalinf-post - MINER post-compute causal inference - - positional arguments: - expfile input matrix - mapfile identifier mapping file - eigengenes eigengenes.csv file generated by miner-causalinf-pre - mutations path to mutations CSV file - neoresults NEO results directory - datadir data directory - outdir output directory - - optional arguments: - -h, --help show this help message and exit - -Parameters in detail --------------------- - -``miner3-causalinf-post`` expects at least these 6 arguments: - - * **expfile:** The gene expression file a matrix in csv format. - * **mapfile:** The gene identifier map file. - * **eigengenes:** The eigengenes.csv file created by the miner-causalinf-pre tool - * **mutations:** A mutations file in CSV format - * **datadir:** the result directory used for miner-neo - * **outdir:** The directory where the results of this tool will be stored in - -Output in detail ----------------- - -After successful completion there will be the following files in the output directory - - * ``regulonCausalMechanisticNetwork.csv`` - * ``regulonNetworkPValues.json`` diff --git a/docs/miner_causalinf_pre.rst b/docs/miner_causalinf_pre.rst deleted file mode 100644 index 6062783..0000000 --- a/docs/miner_causalinf_pre.rst +++ /dev/null @@ -1,57 +0,0 @@ -The miner3-causalinf-pre tool -============================= - -This utility generates the input parameters for the miner3-neo utility - -You can see the tool's available options when you enter ``miner3-causalinf-pre -h`` -at the command prompt: - -.. highlight:: none - -:: - - usage: miner3-causalinf-pre [-h] - expfile mapfile mechout coexp coreg mutation - datadir outdir - - miner3-causalinf-pre - MINER pre-compute causal inference - - positional arguments: - expfile input matrix - mapfile identifier mapping file - mechout mechanisticOutput.json file from miner-mechinf - coexp coexpressionModules.json file from miner-mechinf - coreg coregulationModules.json file from miner-mechinf - mutation mutations csv file - datadir data directory - outdir output directory - - optional arguments: - -h, --help show this help message and exit - -Parameters in detail --------------------- - -``miner3-causalinf-pre`` expects at least these 8 arguments: - - * **expfile:** The gene expression file a matrix in csv format. - * **mapfile:** The gene identifier map file. - * **mechout:** The mechanisticOutput.json file generated by the miner-mechinf tool - * **coexp:** The coexpressionModules.json file generated by the miner-mechinf tool - * **coreg:** The coregulationsModules.json file generated by the miner-mechinf tool - * **mutations:** The mutations CSV file - * **datadir:** a directory containing "all_tfs_to_motifs.pkl" - * **outdir:** The directory where the result files will be placed in. - -Output in detail ----------------- - -After successful completion there will be the following files in the output directory - - * ``bcTfIncidence.csv`` - * ``filteredMutations.csv`` - * ``tfExpression.csv`` - * ``eigengenes.csv`` - * ``regStratAll.csv`` - -These files are used as the input to the tool miner-neo diff --git a/docs/miner_neo.rst b/docs/miner_neo.rst deleted file mode 100644 index 5ef252f..0000000 --- a/docs/miner_neo.rst +++ /dev/null @@ -1,22 +0,0 @@ -The miner3-neo tool -=================== - -This utility uses NEO to compute causal inference. - -You can see the tool's available options when you enter ``miner2-neo`` -at the command prompt: - -.. highlight:: none - -:: - - Usage: bin/miner3-neo [-[-indir|in] ] [-[-outdir|out] ] - - -Parameters in detail --------------------- - -``miner3-neo`` expects at least these 2 arguments: - - * **indir:** the directory that was used as output directory for miner-causalinf-pre - * **outdir:** the directory where the results will be stored diff --git a/docs/miner_subtypes.rst b/docs/miner_subtypes.rst index 8ad64ab..0a70ee0 100644 --- a/docs/miner_subtypes.rst +++ b/docs/miner_subtypes.rst @@ -39,6 +39,12 @@ Output in detail After successful completion there will be the following files in the output directory + * ``coherentMembers.csv`` + * ``overExpressedMembers.csv`` + * ``underExpressedMembers.csv`` + * ``dysregulatedMembers.csv`` + * ``overExpressedMembers.json`` + * ``underExpressedMembers.json`` * ``binaryActivityMap.pdf`` * ``regulon_activity_heatmap.pdf`` * ``centroid_clusters_heatmap.pdf`` diff --git a/setup.py b/setup.py index 8e4f17b..f3cd4be 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ 'tqdm>=4.64.0'] setuptools.setup( name="isb_miner3", - version="1.2.0", + version="1.2.1", author="Matt Wall", author_email="mwall@systemsbiology.org", description="MINER analysis tools", @@ -47,7 +47,8 @@ "Topic :: Software Development :: Libraries :: Python Modules" ], scripts=['bin/miner3-coexpr', 'bin/miner3-mechinf', - 'bin/miner3-bcmembers', 'bin/miner3-subtypes', - 'bin/miner3-survival', 'bin/miner3-causalinference', 'bin/miner3-causalinf-pre', - 'bin/miner3-causalinf-post', 'bin/miner3-neo', 'bin/miner3-riskpredict', + 'bin/miner3-subtypes', + 'bin/miner3-survival', + 'bin/miner3-causalinference', + 'bin/miner3-riskpredict', 'bin/gene2opentargets', 'bin/drug2opentargets'])