diff --git a/AmpliconSuite-pipeline.py b/AmpliconSuite-pipeline.py index 3828a0a..81a2c35 100755 --- a/AmpliconSuite-pipeline.py +++ b/AmpliconSuite-pipeline.py @@ -14,7 +14,7 @@ from paalib import check_reference, cnv_prefilter -__version__ = "0.1546.1" +__version__ = "0.1555.1" PY3_PATH = "python3" # updated by command-line arg if specified metadata_dict = {} # stores the run metadata (bioinformatic metadata) @@ -146,7 +146,7 @@ def run_cnvkit(ckpy_path, nthreads, outdir, bamfile, seg_meth='cbs', normal=None sys.exit(1) metadata_dict["cnvkit_cmd"] = metadata_dict["cnvkit_cmd"] + cmd - logging.info("\nCleaning up temporary files") + logging.info("\nCleaning up temporary CNVkit files") cmd = "rm -f {}/*tmp.bed {}/*.cnn {}/*target.bed {}/*.bintest.cns".format(outdir, outdir, outdir, outdir) logging.info(cmd) call(cmd, shell=True) @@ -741,7 +741,7 @@ def detect_run_failure(align_stderr_file, AA_outdir, sname, AC_outdir): try: with open(AA_REPO + args.ref + "/last_updated.txt", 'r') as file: datestring = file.read() - logging.info("Data repo constructed on " + datestring) + logging.info(args.ref + " data repo constructed on " + datestring) except FileNotFoundError: logging.warning("Data repo appears to be out of date. Please update your data repo!\n") @@ -768,7 +768,7 @@ def detect_run_failure(align_stderr_file, AA_outdir, sname, AC_outdir): determined_ref = check_reference.check_ref(args.sorted_bam, faidict, args.samtools_path) if not determined_ref and not args.ref: - logging.error("Please make sure AA data repo is populated.") + logging.error("Could not determine ref build. Please make sure AA data repo is populated.") sys.exit(1) elif not args.ref: diff --git a/README.md b/README.md index 5a083a7..7b99940 100644 --- a/README.md +++ b/README.md @@ -64,11 +64,7 @@ Can be used on most modern Unix systems (e.g. Ubuntu 18.04+, CentOS 7+, macOS). rm [reference_build.tar.gz] ``` -3. Lastly, obtain the Mosek optimization tool license (free for academic use) and place it in `$HOME/mosek/`. AA will not work without it. - - -4. (Optional) Add the Arial font. These usually already present on macOS but not Linux. - * See the custom installation document in the documentation folder. +3. Lastly, obtain the Mosek optimization tool license (free for academic use) and place it in `$HOME/mosek/`. AA will not work without it. ### Option D: Singularity & Docker images diff --git a/conda-recipe/README.md b/conda-recipe/README.md new file mode 100644 index 0000000..3bbfb33 --- /dev/null +++ b/conda-recipe/README.md @@ -0,0 +1,11 @@ +### Standalone AmpliconSuite-pipeline Conda recipe + +This version of the conda recipe is for a standalone build and install process. If you want to build this without using +bioconda to fetch the actual bioconda recipe, you can do the following + +```bash +conda build AmpliconSuite-pipeline/conda-recipe/ +conda create -n "ampsuite" python>=3.8.0 +conda activate ampsuite +conda install -n ampsuite -c local -c mosek ampliconsuite mosek +``` \ No newline at end of file diff --git a/conda-recipe/build.sh b/conda-recipe/build.sh index 870c6f4..52a4efa 100644 --- a/conda-recipe/build.sh +++ b/conda-recipe/build.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -ex + # pull source code for AA and move scripts into a library TARGET="AmpliconArchitect" TARGET_VERSION="1.3.r5" @@ -25,9 +27,5 @@ rm v${TARGET_VERSION}.zip # make the bin dir if it doesn't exist mkdir -p $PREFIX/bin -# copy driver scripts -cp AmpliconSuite-pipeline.py ${PREFIX}/bin/AmpliconSuite-pipeline.py -cp GroupedAnalysisAmpSuite.py ${PREFIX}/bin/GroupedAnalysisAmpSuite.py - # Python command to install the package. $PYTHON setup.py install --install-data aa_data_repo/ --single-version-externally-managed --record=record.txt diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index bf1e60a..a6234d7 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -8,17 +8,16 @@ source: build: number: 0 - skip: False requirements: build: - - python + - python >=3 - setuptools - unzip - wget run: - - python + - python >=3 - bwa - cnvkit - Flask diff --git a/documentation/CUSTOM_INSTALL.md b/documentation/CUSTOM_INSTALL.md index b0eda8e..4b42c43 100644 --- a/documentation/CUSTOM_INSTALL.md +++ b/documentation/CUSTOM_INSTALL.md @@ -42,7 +42,13 @@ AmpliconSuite-pipeline has been tested with Ubuntu (16.04 and above) and CentOS `python3`. It also requires `R` version >= 3.5, which is non-standard on Ubuntu 16.04/14.04. ## Getting `mscorefonts` onto your system. -AmpliconArchitect figures will attempt to use the Arial font, and will fall back to the default `matplotlib` font. On macOS, Arial will likely already be present. -Install the `mscorefonts` package - - `conda install mscorefonts` or - - (Ubuntu) `sudo apt update && sudo apt install ttf-mscorefonts-installer`. Then do `sudo fc-cache -f -v` to rebuild the font cache. \ No newline at end of file +AmpliconArchitect figures will attempt to use the Arial font, and will fall back to the default `matplotlib` "Deja Vu Sans" font. On macOS, Arial will likely already be present. +Install the `mscorefonts` package one of two ways: + +a) First run `conda install mscorefonts` then launch python and do +```python +import matplotlib.font_manager +matplotlib.font_manager._load_fontmanager(try_read_cache=False) +``` + +b) (Ubuntu) `sudo apt update && sudo apt install ttf-mscorefonts-installer`. Then do `sudo fc-cache -f -v` to rebuild the font cache. \ No newline at end of file diff --git a/setup.py b/setup.py index 3a901a3..f3a5770 100644 --- a/setup.py +++ b/setup.py @@ -7,4 +7,5 @@ packages=find_packages(exclude=['images', 'docker', 'singularity']), include_package_data=True, package_data={'': ['*.json', '*.sh'], 'ampliconclassifierlib': ['resources/*']}, + scripts=['AmpliconSuite-pipeline.py', 'GroupedAnalysisAmpSuite.py'], )