dme-app 1.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dme_app-1.0.4/LICENSE.txt +18 -0
- dme_app-1.0.4/MANIFEST.in +11 -0
- dme_app-1.0.4/PKG-INFO +22 -0
- dme_app-1.0.4/README.md +126 -0
- dme_app-1.0.4/docs/images/DME.png +0 -0
- dme_app-1.0.4/pyproject.toml +59 -0
- dme_app-1.0.4/setup.cfg +4 -0
- dme_app-1.0.4/src/dme/Analyser.py +36 -0
- dme_app-1.0.4/src/dme/BWT.py +1920 -0
- dme_app-1.0.4/src/dme/Baits.py +125 -0
- dme_app-1.0.4/src/dme/Blast.py +75 -0
- dme_app-1.0.4/src/dme/ConvertJsonToTSV.py +544 -0
- dme_app-1.0.4/src/dme/DMEBase.py +575 -0
- dme_app-1.0.4/src/dme/DMECore.py +392 -0
- dme_app-1.0.4/src/dme/Database.py +249 -0
- dme_app-1.0.4/src/dme/Diamond.py +62 -0
- dme_app-1.0.4/src/dme/Filter.py +191 -0
- dme_app-1.0.4/src/dme/Galaxy.py +69 -0
- dme_app-1.0.4/src/dme/Heatmap.py +924 -0
- dme_app-1.0.4/src/dme/HomologModel.py +373 -0
- dme_app-1.0.4/src/dme/MainBase.py +468 -0
- dme_app-1.0.4/src/dme/ORF.py +235 -0
- dme_app-1.0.4/src/dme/Output.py +267 -0
- dme_app-1.0.4/src/dme/OverexpressionModel.py +487 -0
- dme_app-1.0.4/src/dme/Parser.py +315 -0
- dme_app-1.0.4/src/dme/RrnaModel.py +271 -0
- dme_app-1.0.4/src/dme/VariantModel.py +329 -0
- dme_app-1.0.4/src/dme/__init__.py +0 -0
- dme_app-1.0.4/src/dme/_data/.gitignore +4 -0
- dme_app-1.0.4/src/dme/_db/.gitignore +7 -0
- dme_app-1.0.4/src/dme/auto_load.py +157 -0
- dme_app-1.0.4/src/dme/baits_annotation.py +37 -0
- dme_app-1.0.4/src/dme/build_kmer_sets.py +358 -0
- dme_app-1.0.4/src/dme/clean.py +95 -0
- dme_app-1.0.4/src/dme/convert_card_json_to_gff3.py +69 -0
- dme_app-1.0.4/src/dme/dme.py +10 -0
- dme_app-1.0.4/src/dme/filepaths.py +16 -0
- dme_app-1.0.4/src/dme/hgvs_to_blast.py +263 -0
- dme_app-1.0.4/src/dme/hmdm_annotation.py +99 -0
- dme_app-1.0.4/src/dme/kmer_query.py +1389 -0
- dme_app-1.0.4/src/dme/load.py +303 -0
- dme_app-1.0.4/src/dme/make_kmer_json.py +293 -0
- dme_app-1.0.4/src/dme/remove_duplicates.py +131 -0
- dme_app-1.0.4/src/dme/runBlast.py +34 -0
- dme_app-1.0.4/src/dme/settings.py +73 -0
- dme_app-1.0.4/src/dme/wildhmdm_annotation.py +106 -0
- dme_app-1.0.4/src/dme_app.egg-info/PKG-INFO +22 -0
- dme_app-1.0.4/src/dme_app.egg-info/SOURCES.txt +57 -0
- dme_app-1.0.4/src/dme_app.egg-info/dependency_links.txt +1 -0
- dme_app-1.0.4/src/dme_app.egg-info/entry_points.txt +2 -0
- dme_app-1.0.4/src/dme_app.egg-info/requires.txt +14 -0
- dme_app-1.0.4/src/dme_app.egg-info/top_level.txt +1 -0
- dme_app-1.0.4/tests/__init__.py +0 -0
- dme_app-1.0.4/tests/test_0.py +36 -0
- dme_app-1.0.4/tests/test_1.py +81 -0
- dme_app-1.0.4/tests/test_2.py +72 -0
- dme_app-1.0.4/tests/test_3.py +81 -0
- dme_app-1.0.4/tests/test_4.py +104 -0
- dme_app-1.0.4/tox.ini +45 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Copyright (c) 2024 Amogelang R. Raphenya (raphenar@mcmaster.ca)
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
4
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
5
|
+
the Software without restriction, including without limitation the rights to
|
|
6
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
7
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
8
|
+
subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
15
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
16
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
17
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
18
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
recursive-include src dme _data *
|
|
2
|
+
recursive-include src dme _db *
|
|
3
|
+
recursive-include src *.py
|
|
4
|
+
recursive-include docs *.png
|
|
5
|
+
recursive-include tests *.py
|
|
6
|
+
include LICENSE.txt
|
|
7
|
+
include MANIFEST.in
|
|
8
|
+
include pyproject.toml
|
|
9
|
+
include README.md
|
|
10
|
+
include tox.ini
|
|
11
|
+
|
dme_app-1.0.4/PKG-INFO
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dme-app
|
|
3
|
+
Version: 1.0.4
|
|
4
|
+
Summary: DME predicts bacterial drug-metabolizing genes in the draft and complete genomes.
|
|
5
|
+
Project-URL: Homepage, https://github.com/raphenya/dme
|
|
6
|
+
Project-URL: Issues, https://github.com/raphenya/dme/issues
|
|
7
|
+
License-File: LICENSE.txt
|
|
8
|
+
Requires-Dist: joblib
|
|
9
|
+
Requires-Dist: biopython
|
|
10
|
+
Requires-Dist: filetype
|
|
11
|
+
Requires-Dist: pyfaidx
|
|
12
|
+
Requires-Dist: beautifulsoup4
|
|
13
|
+
Requires-Dist: pyahocorasick
|
|
14
|
+
Requires-Dist: requests
|
|
15
|
+
Requires-Dist: lxml
|
|
16
|
+
Requires-Dist: seaborn
|
|
17
|
+
Requires-Dist: pandas
|
|
18
|
+
Requires-Dist: matplotlib
|
|
19
|
+
Requires-Dist: pysam
|
|
20
|
+
Requires-Dist: seguid
|
|
21
|
+
Requires-Dist: pytest
|
|
22
|
+
Dynamic: license-file
|
dme_app-1.0.4/README.md
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
[](https://github.com/raphenya/dme/actions/workflows/python-package.yml)
|
|
2
|
+
|
|
3
|
+
# DME: The Drug Metabolising Enzyme software
|
|
4
|
+
|
|
5
|
+
# Introduction
|
|
6
|
+
|
|
7
|
+
The microbiome can break down or modify xenobiotics (i.e., externally administered drugs), regulate
|
|
8
|
+
host gene expression, and modulate xenobiotic absorption. The drug metabolism is not limited to orally
|
|
9
|
+
administered drugs, the microbiome also converts drug metabolites destined for excretion via the gut,
|
|
10
|
+
including drug conjugates from the liver
|
|
11
|
+
|
|
12
|
+
This application is to predict drug-metabolizing enzymes from protein or nucleotide data based on
|
|
13
|
+
homology models. The application uses reference data from the
|
|
14
|
+
[Human Microbiome Drug Metabolism (HMDM) Database](https://hmdm.mcmaster.ca).
|
|
15
|
+
|
|
16
|
+
# Overview of DME
|
|
17
|
+
|
|
18
|
+
<p align="center" width="100%">
|
|
19
|
+
<img width="33%" src="https://github.com/raphenya/dme/blob/main/docs/images/DME.png?raw=true">
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
If DNA sequences are submitted, DME first predicts complete open reading frames (ORFs) using
|
|
23
|
+
[Prodigal](https://github.com/hyattpd/Prodigal) (ignoring those less than 30 bp) and analyzes
|
|
24
|
+
the predicted protein sequences. This includes a secondary correction by DME if Prodigal undercalls
|
|
25
|
+
the correct start codon to ensure complete genes are predicted. However, if Prodigal fails to predict
|
|
26
|
+
an ORF for a gene, this will produce a false negative result.
|
|
27
|
+
|
|
28
|
+
If protein sequences are submitted, DME skips ORF prediction and uses the protein sequences directly.
|
|
29
|
+
|
|
30
|
+
The DME currently supports HMDM's [protein homolog models](https://hmdm.mcmaster.ca/cvterms/54) (use of BLASTP or [DIAMOND](https://ab.inf.uni-tuebingen.de/software/diamond) bitscore cut-offs to detect functional homologs of enzymes).
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
| Example | Enzyme |
|
|
34
|
+
| ---------------------------------------------------------| --------------------------------------------------|
|
|
35
|
+
| Protein Homolog Model | [TDC](https://hmdm.mcmaster.ca/cvterms/24) |
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
The DME analyzes genome or proteome sequences under three paradigms: **Perfect**, **Strict**, and **Loose** (a.k.a. Discovery).
|
|
39
|
+
|
|
40
|
+
# Installation
|
|
41
|
+
|
|
42
|
+
The tool requires Python >= 3.11 and conda >= 4.12.0. The latest release can be installed directly from pip or this repository.
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
pip install dme-app
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
or
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
python3 -m pip install /path/to/dme-1.0.0.tar.gz
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
# Dependencies
|
|
56
|
+
|
|
57
|
+
- Python 3.6
|
|
58
|
+
- NCBI BLAST 2.9.0
|
|
59
|
+
- zlib
|
|
60
|
+
- Prodigal 2.6.3
|
|
61
|
+
- DIAMOND 2.2.9
|
|
62
|
+
- Biopython 1.78
|
|
63
|
+
- filetype 1.0.0+
|
|
64
|
+
- pytest 3.0.0+
|
|
65
|
+
- pandas 0.15.0+
|
|
66
|
+
- Matplotlib 2.1.2+
|
|
67
|
+
- seaborn 0.8.1+
|
|
68
|
+
- pyfaidx 0.5.4.1+
|
|
69
|
+
- pyahocorasick 1.1.7+
|
|
70
|
+
- OligoArrayAux 3.8
|
|
71
|
+
- samtools 1.9
|
|
72
|
+
- bamtools 2.5.3
|
|
73
|
+
- bedtools 2.27.1
|
|
74
|
+
- Jellyfish 2.2.10
|
|
75
|
+
- Bowtie2 2.3.4.3
|
|
76
|
+
- BWA 0.7.17 (r1188)
|
|
77
|
+
- KMA 1.3.4
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
# DME Usage
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
usage: dme <command> [<args>]
|
|
84
|
+
commands are:
|
|
85
|
+
---------------------------------------------------------------------------------------
|
|
86
|
+
Database
|
|
87
|
+
---------------------------------------------------------------------------------------
|
|
88
|
+
auto_load Automatically loads HMDM database, annotations and k-mer database
|
|
89
|
+
load Loads HMDM database, annotations and k-mer database
|
|
90
|
+
clean Removes BLAST databases and temporary files
|
|
91
|
+
database Information on installed hmdm database
|
|
92
|
+
|
|
93
|
+
---------------------------------------------------------------------------------------
|
|
94
|
+
Genomic
|
|
95
|
+
---------------------------------------------------------------------------------------
|
|
96
|
+
|
|
97
|
+
main Runs dme application
|
|
98
|
+
tab Creates a Tab-delimited from dme results
|
|
99
|
+
|
|
100
|
+
---------------------------------------------------------------------------------------
|
|
101
|
+
Metagenomic
|
|
102
|
+
---------------------------------------------------------------------------------------
|
|
103
|
+
|
|
104
|
+
bwt Runs dme application using short-read sequences
|
|
105
|
+
|
|
106
|
+
---------------------------------------------------------------------------------------
|
|
107
|
+
Annotations
|
|
108
|
+
---------------------------------------------------------------------------------------
|
|
109
|
+
hmdm_annotation Create fasta files with annotations from hmdm.json
|
|
110
|
+
wildhmdm_annotation Create fasta files with annotations from variants
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
Drug Metabolising Enzyme (DME) - 1.0.0
|
|
115
|
+
|
|
116
|
+
positional arguments:
|
|
117
|
+
{main,tab,load,auto_load,clean,database,bwt,hmdm_annotation,wildhmdm_annotation}
|
|
118
|
+
Subcommand to run
|
|
119
|
+
|
|
120
|
+
options:
|
|
121
|
+
-h, --help show this help message and exit
|
|
122
|
+
|
|
123
|
+
Use the Drug Metabolising Enzyme (DME) to predict drug-metabolizing enzymes from protein or nucleotide data based on homology models. Check
|
|
124
|
+
https://hmdm.mcmaster.ca/download for software and data updates. Receive email notification of monthly HMDM updates via the HMDM Mailing List
|
|
125
|
+
(https://mailman.mcmaster.ca/mailman/listinfo/hmdm-l)
|
|
126
|
+
```
|
|
Binary file
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools >= 61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "dme-app"
|
|
7
|
+
description = "DME predicts bacterial drug-metabolizing genes in the draft and complete genomes."
|
|
8
|
+
version = "1.0.4"
|
|
9
|
+
|
|
10
|
+
dependencies = [
|
|
11
|
+
"joblib",
|
|
12
|
+
"biopython",
|
|
13
|
+
"filetype",
|
|
14
|
+
"pyfaidx",
|
|
15
|
+
"beautifulsoup4",
|
|
16
|
+
"pyahocorasick",
|
|
17
|
+
"requests",
|
|
18
|
+
"lxml",
|
|
19
|
+
"seaborn",
|
|
20
|
+
"pandas",
|
|
21
|
+
"matplotlib",
|
|
22
|
+
"pysam",
|
|
23
|
+
"seguid",
|
|
24
|
+
"pytest"
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
[external]
|
|
28
|
+
dependencies = [
|
|
29
|
+
"prodigal @ git+https://github.com/hyattpd/Prodigal/archive/refs/tags/v2.6.3.tar.gz"
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
authors = [
|
|
33
|
+
{ name="Amogelang R. Raphenya", email="raphenar@mcmaster.ca" },
|
|
34
|
+
]
|
|
35
|
+
maintainers = [
|
|
36
|
+
{name = "Amogelang R. Raphenya", email = "raphenar@mcmaster.ca"}
|
|
37
|
+
]
|
|
38
|
+
readme = "README.md"
|
|
39
|
+
license = {file = "LICENSE.txt"}
|
|
40
|
+
requires-python = ">=3.8"
|
|
41
|
+
classifiers = [
|
|
42
|
+
"Programming Language :: Python :: 3",
|
|
43
|
+
"Operating System :: OS Independent",
|
|
44
|
+
]
|
|
45
|
+
keywords = ["bacterial drug metabolism", "gene prediction", "enzyme", "dme-app", "drug transformation"]
|
|
46
|
+
|
|
47
|
+
[tool.setuptools.packages.find]
|
|
48
|
+
where = ["src"]
|
|
49
|
+
|
|
50
|
+
[project.scripts]
|
|
51
|
+
dme = "dme:dme.main"
|
|
52
|
+
|
|
53
|
+
[tool.pytest.ini_options]
|
|
54
|
+
pythonpath = ["src"]
|
|
55
|
+
testpaths = ["tests"]
|
|
56
|
+
|
|
57
|
+
[project.urls]
|
|
58
|
+
Homepage = "https://github.com/raphenya/dme"
|
|
59
|
+
Issues = "https://github.com/raphenya/dme/issues"
|
dme_app-1.0.4/setup.cfg
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
""" Imports. """
|
|
2
|
+
from seguid import seguid
|
|
3
|
+
from dme.settings import SeqIO, logger
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Analyser(object):
|
|
7
|
+
"""Class to find analyse fasta files."""
|
|
8
|
+
|
|
9
|
+
def __init__(self, input_file):
|
|
10
|
+
"""Creates Analyser object for analysing fasta files."""
|
|
11
|
+
self.input_file = input_file
|
|
12
|
+
logger.info(repr(self))
|
|
13
|
+
|
|
14
|
+
def __repr__(self):
|
|
15
|
+
"""Returns Analyser class full object."""
|
|
16
|
+
return f"Analyser({self.__dict__})"
|
|
17
|
+
|
|
18
|
+
def run(self):
|
|
19
|
+
""" run function."""
|
|
20
|
+
checksums = set()
|
|
21
|
+
d = {}
|
|
22
|
+
# Using the Biopython fasta parse we can read our fasta input
|
|
23
|
+
for record in SeqIO.parse(self.input_file, "fasta"):
|
|
24
|
+
checksum = seguid(record.seq)
|
|
25
|
+
if checksum in checksums:
|
|
26
|
+
model_type_id = record.description.split(
|
|
27
|
+
"|")[1].split(":")[-1].strip()
|
|
28
|
+
if model_type_id in ["40292"]:
|
|
29
|
+
logger.warning(
|
|
30
|
+
"Duplicates {%s} -> {%s} ~ {%s} - [{%s}]", record.id,
|
|
31
|
+
record.description.split(
|
|
32
|
+
"|")[-1], d[checksum].split("|")[-1],
|
|
33
|
+
model_type_id)
|
|
34
|
+
continue
|
|
35
|
+
d[checksum] = record.description
|
|
36
|
+
checksums.add(checksum)
|