Skip to content

Commit

Permalink
fixing setup
Browse files Browse the repository at this point in the history
  • Loading branch information
kristyhoran committed Oct 3, 2024
1 parent 7b7e1ed commit 36ab5ca
Showing 5 changed files with 11 additions and 73 deletions.
5 changes: 2 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
include tbtamr/test/*
include tbtamr/tests/*
include tbtamr/db/*
include tbtamr/*.json

include tbtamr/configs/*

9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -14,16 +14,9 @@
In order to install `tbtAMR` conda is strongly recommended - installation instructions can be found [here](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html).

```
conda create -n tbtamr tbtamr xlsxwriter requests tqdm
conda create -n tbtamr tbtamr
```

Once you have installed `tbtAMR` you will need to setup the environment. This will install the validated version of `TB-profiler`, if you wish to use another version of `TB-profiler` you may get unexpected behaviour or errors.

```
conda activate tbtamr
tbtamr setup
tbtamr check
```

## Usage

13 changes: 2 additions & 11 deletions setup.py
Original file line number Diff line number Diff line change
@@ -7,13 +7,6 @@
import logging
import tbtamr

# logging.basicConfig(level=environ.get("LOGLEVEL", "INFO"))

# if version_info <= (3, 0):
# logging.fatal("Sorry, requires Python 3.x, not Python 2.x\n")
# exit(1)


with open("README.md", "r") as f:
long_description = f.read()

@@ -40,8 +33,7 @@
'requests',
"joblib",
"pydantic",
"tqdm",
"pathogen-profiler @ git+https://github.com/jodyphelan/pathogen-profiler.git#egg=pathogen-profiler-4.3.0"
"tqdm"
],
test_suite="nose.collector",
tests_require=["nose", "pytest","psutil"],
@@ -57,8 +49,7 @@
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Natural Language :: English",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.10",
"Topic :: Scientific/Engineering :: Bio-Informatics",
],
package_data={"tbtamr": ["db/*","configs/*"]}
49 changes: 0 additions & 49 deletions tasks.py

This file was deleted.

8 changes: 6 additions & 2 deletions tbtamr/Predict.py
Original file line number Diff line number Diff line change
@@ -525,15 +525,19 @@ def extract_lineage(self,vcf, brcd, ref, result) -> dict:

if self.call_lineage:
logger.info(f"Will try to determine lineage.")
from pathogenprofiler import barcode, Vcf

try:
from pathogenprofiler import barcode, Vcf
logger.info("Determining lineage.")
v = Vcf(vcf)
muts = v.get_bed_gt(brcd,ref)
bca = barcode(muts, brcd)
result = self.wrangle_lineages(bca=bca, result = result)
except ValueError as e:
logger.warning(f"pathogen-profiler error: {e}. Lineage will not be run")
logger.warning(f"pathogen-profiler error: {e}.")
logger.warning(f"If you would like to use tbtAMR to detect lineage please install pathogen-profiler and ,ake sure your environment also has bcftools installed")
logger.warning(f"pip3 install git+https://github.com/MDU-PHL/pathogen-profiler@4.3.0")
logger.warning(f"Lineage calling cannot be performed.")

return result

0 comments on commit 36ab5ca

Please sign in to comment.