dme-app 1.0.4__py3-none-any.whl
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/Analyser.py +36 -0
- dme/BWT.py +1920 -0
- dme/Baits.py +125 -0
- dme/Blast.py +75 -0
- dme/ConvertJsonToTSV.py +544 -0
- dme/DMEBase.py +575 -0
- dme/DMECore.py +392 -0
- dme/Database.py +249 -0
- dme/Diamond.py +62 -0
- dme/Filter.py +191 -0
- dme/Galaxy.py +69 -0
- dme/Heatmap.py +924 -0
- dme/HomologModel.py +373 -0
- dme/MainBase.py +468 -0
- dme/ORF.py +235 -0
- dme/Output.py +267 -0
- dme/OverexpressionModel.py +487 -0
- dme/Parser.py +315 -0
- dme/RrnaModel.py +271 -0
- dme/VariantModel.py +329 -0
- dme/__init__.py +0 -0
- dme/_data/.gitignore +4 -0
- dme/_db/.gitignore +7 -0
- dme/auto_load.py +157 -0
- dme/baits_annotation.py +37 -0
- dme/build_kmer_sets.py +358 -0
- dme/clean.py +95 -0
- dme/convert_card_json_to_gff3.py +69 -0
- dme/dme.py +10 -0
- dme/filepaths.py +16 -0
- dme/hgvs_to_blast.py +263 -0
- dme/hmdm_annotation.py +99 -0
- dme/kmer_query.py +1389 -0
- dme/load.py +303 -0
- dme/make_kmer_json.py +293 -0
- dme/remove_duplicates.py +131 -0
- dme/runBlast.py +34 -0
- dme/settings.py +73 -0
- dme/wildhmdm_annotation.py +106 -0
- dme_app-1.0.4.dist-info/METADATA +22 -0
- dme_app-1.0.4.dist-info/RECORD +45 -0
- dme_app-1.0.4.dist-info/WHEEL +5 -0
- dme_app-1.0.4.dist-info/entry_points.txt +2 -0
- dme_app-1.0.4.dist-info/licenses/LICENSE.txt +18 -0
- dme_app-1.0.4.dist-info/top_level.txt +1 -0
dme/Analyser.py
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)
|