Skip to content

Commit

Permalink
0.1555.1
Browse files Browse the repository at this point in the history
installation, documentation, conda recipe,  and GroupedAnalysis updates
  • Loading branch information
jluebeck committed Jun 17, 2023
1 parent 52a8f0e commit 5db5d7f
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 20 deletions.
8 changes: 4 additions & 4 deletions AmpliconSuite-pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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")
Expand All @@ -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:
Expand Down
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions conda-recipe/README.md
Original file line number Diff line number Diff line change
@@ -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
```
6 changes: 2 additions & 4 deletions conda-recipe/build.sh
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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
5 changes: 2 additions & 3 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 10 additions & 4 deletions documentation/CUSTOM_INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
)

0 comments on commit 5db5d7f

Please sign in to comment.