diff --git a/MANIFEST.in b/MANIFEST.in index 454282d..a285676 100755 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,4 @@ global-include *.pyx global-include *.pxd +graft notebooks +include annotate/ldlr_exons.fa \ No newline at end of file diff --git a/bean/cli/profile.py b/bean/cli/profile.py index abb1c87..514b7c1 100755 --- a/bean/cli/profile.py +++ b/bean/cli/profile.py @@ -22,7 +22,7 @@ def main(args): "python -m ipykernel install --user --name bean_python3 --display-name bean_python3" ) pm.execute_notebook( - f"{os.path.dirname(be.__file__)}/../notebooks/profile_editing_preference.ipynb", + f"{os.path.dirname(be.__file__)}/notebooks/profile_editing_preference.ipynb", f"{args.output_prefix}.ipynb", parameters=dict( bdata_path=args.bdata_path, diff --git a/bean/cli/qc.py b/bean/cli/qc.py index b9f8f6c..ed1f94b 100755 --- a/bean/cli/qc.py +++ b/bean/cli/qc.py @@ -26,7 +26,7 @@ def main(args): "python -m ipykernel install --user --name bean_python3 --display-name bean_python3" ) pm.execute_notebook( - f"{os.path.dirname(be.__file__)}/../notebooks/sample_quality_report.ipynb", + f"{os.path.dirname(be.__file__)}/notebooks/sample_quality_report.ipynb", f"{args.out_report_prefix}.ipynb", parameters=dict( bdata_path=args.bdata_path, diff --git a/notebooks/profile_editing_preference.ipynb b/bean/notebooks/profile_editing_preference.ipynb similarity index 100% rename from notebooks/profile_editing_preference.ipynb rename to bean/notebooks/profile_editing_preference.ipynb diff --git a/notebooks/sample_quality_report.ipynb b/bean/notebooks/sample_quality_report.ipynb similarity index 100% rename from notebooks/sample_quality_report.ipynb rename to bean/notebooks/sample_quality_report.ipynb diff --git a/bean/plotting/utils.py b/bean/plotting/utils.py index ef84816..69a74a9 100755 --- a/bean/plotting/utils.py +++ b/bean/plotting/utils.py @@ -1,4 +1,5 @@ import argparse +import os def parse_args(parser=None): @@ -23,7 +24,7 @@ def parse_args(parser=None): "--condition-col", help="Column name in `bdata.samples` that describes experimental condition. (sorting bin, time, etc.)", type=str, - default="bin", + default="condition", ) parser.add_argument( "--pam-col", @@ -49,6 +50,8 @@ def parse_args(parser=None): def check_args(args): + if args.output_prefix is None: + args.output_prefix = os.path.splitext(args.bdata_path)[0] if args.window_length < 1: raise ValueError(f"window_length {args.window_length} is too small.") if args.window_length > 20: diff --git a/setup.py b/setup.py index 64a1366..157f024 100755 --- a/setup.py +++ b/setup.py @@ -1,5 +1,5 @@ import numpy as np -from setuptools import setup, find_packages +from setuptools import setup, find_namespace_packages from Cython.Build import cythonize with open("README.md", "r") as fh: @@ -16,7 +16,7 @@ long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/pinellolab/crispr-bean", - packages=find_packages(), + packages=find_namespace_packages(), ext_modules=cythonize(["bean/mapping/CRISPResso2Align.pyx"]), include_dirs=np.get_include(), setup_requires=[ @@ -45,14 +45,14 @@ "nbconvert", "logomaker", ], - extras_require={"model": ["pyBigWig", "pyro-ppl<=1.8.1", "statsmodels", "torch"]}, + extras_require={"model": ["pyBigWig", "pyro-ppl", "statsmodels", "torch"]}, include_package_data=True, package_data={ - "": [ - "bean/annotate/ldlr_exons.fa", - "notebooks/sample_quality_report.ipynb", - "notebooks/profile_editing_preference.ipynb", - ] + "bean.annotate": ["ldlr_exons.fa"], + "bean.notebooks": [ + "sample_quality_report.ipynb", + "profile_editing_preference.ipynb", + ], }, classifiers=[ "Programming Language :: Python :: 3",