mgnify-pipelines-toolkit 0.1.5__py3-none-any.whl → 0.1.7__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.
Potentially problematic release.
This version of mgnify-pipelines-toolkit might be problematic. Click here for more details.
- mgnify_pipelines_toolkit/analysis/amplicon/primer_val_classification.py +6 -4
- mgnify_pipelines_toolkit/analysis/shared/fastq_suffix_header_check.py +0 -2
- mgnify_pipelines_toolkit/analysis/shared/get_subunits.py +1 -1
- mgnify_pipelines_toolkit/utils/get_mpt_version.py +26 -0
- {mgnify_pipelines_toolkit-0.1.5.dist-info → mgnify_pipelines_toolkit-0.1.7.dist-info}/METADATA +1 -1
- {mgnify_pipelines_toolkit-0.1.5.dist-info → mgnify_pipelines_toolkit-0.1.7.dist-info}/RECORD +10 -9
- {mgnify_pipelines_toolkit-0.1.5.dist-info → mgnify_pipelines_toolkit-0.1.7.dist-info}/WHEEL +1 -1
- {mgnify_pipelines_toolkit-0.1.5.dist-info → mgnify_pipelines_toolkit-0.1.7.dist-info}/entry_points.txt +1 -0
- {mgnify_pipelines_toolkit-0.1.5.dist-info → mgnify_pipelines_toolkit-0.1.7.dist-info}/LICENSE +0 -0
- {mgnify_pipelines_toolkit-0.1.5.dist-info → mgnify_pipelines_toolkit-0.1.7.dist-info}/top_level.txt +0 -0
|
@@ -58,19 +58,20 @@ def parse_args():
|
|
|
58
58
|
return input, fasta, sample
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
def get_amp_region(beg, strand, model):
|
|
61
|
+
def get_amp_region(beg, end, strand, model):
|
|
62
62
|
prev_region = ""
|
|
63
63
|
|
|
64
64
|
for region, region_coords in model.items():
|
|
65
65
|
|
|
66
66
|
region_beg = region_coords[0]
|
|
67
67
|
beg_diff = region_beg - beg
|
|
68
|
+
end_diff = region_beg - end
|
|
68
69
|
|
|
69
70
|
if strand == STRAND_FWD:
|
|
70
|
-
if beg_diff > 0:
|
|
71
|
+
if beg_diff > 0 and end_diff > 0:
|
|
71
72
|
return region
|
|
72
73
|
else:
|
|
73
|
-
if beg_diff > 0:
|
|
74
|
+
if beg_diff > 0 and end_diff > 0:
|
|
74
75
|
return prev_region
|
|
75
76
|
|
|
76
77
|
prev_region = region
|
|
@@ -92,6 +93,7 @@ def main():
|
|
|
92
93
|
primer_name = line_lst[0]
|
|
93
94
|
rfam = line_lst[3]
|
|
94
95
|
beg = float(line_lst[5])
|
|
96
|
+
end = float(line_lst[6])
|
|
95
97
|
|
|
96
98
|
if rfam == "RF00177":
|
|
97
99
|
gene = "16S"
|
|
@@ -116,7 +118,7 @@ def main():
|
|
|
116
118
|
elif "R" in primer_name:
|
|
117
119
|
strand = STRAND_REV
|
|
118
120
|
|
|
119
|
-
amp_region = get_amp_region(beg, strand, model)
|
|
121
|
+
amp_region = get_amp_region(beg, end, strand, model)
|
|
120
122
|
primer_seq = str(fasta_dict[primer_name].seq)
|
|
121
123
|
|
|
122
124
|
res_dict["Gene"].append(gene)
|
|
@@ -77,12 +77,10 @@ def main():
|
|
|
77
77
|
'No reverse file given, yet given forward file has the "_1" suffix implying it\'s paired-end. '
|
|
78
78
|
+ "Either supply the reverse file, or supply a single-end file."
|
|
79
79
|
)
|
|
80
|
-
exit(1)
|
|
81
80
|
elif "_2" not in rev:
|
|
82
81
|
logging.error(
|
|
83
82
|
'The expected suffix "_2" for a supplied reverse file is missing. Please verify your inputs.'
|
|
84
83
|
)
|
|
85
|
-
exit(1)
|
|
86
84
|
else:
|
|
87
85
|
files_to_parse = [fwd, rev]
|
|
88
86
|
|
|
@@ -102,7 +102,7 @@ def main():
|
|
|
102
102
|
]
|
|
103
103
|
open_files = {}
|
|
104
104
|
for record in SeqIO.parse(args.input, "fasta"):
|
|
105
|
-
model = "-".join(record.id.split("/")[0].split("-")[1:])
|
|
105
|
+
model = "-".join(record.id.split("/")[0].split("-")[-1:])
|
|
106
106
|
if model in coding_rna:
|
|
107
107
|
filename = pattern_dict[model]
|
|
108
108
|
else:
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
|
|
4
|
+
# Copyright 2024 EMBL - European Bioinformatics Institute
|
|
5
|
+
#
|
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
# you may not use this file except in compliance with the License.
|
|
8
|
+
# You may obtain a copy of the License at
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
import importlib.metadata
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def main():
|
|
21
|
+
|
|
22
|
+
print(importlib.metadata.version("mgnify-pipelines-toolkit"))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
if __name__ == "__main__":
|
|
26
|
+
main()
|
{mgnify_pipelines_toolkit-0.1.5.dist-info → mgnify_pipelines_toolkit-0.1.7.dist-info}/RECORD
RENAMED
|
@@ -8,13 +8,13 @@ mgnify_pipelines_toolkit/analysis/amplicon/classify_var_regions.py,sha256=kIuE2w
|
|
|
8
8
|
mgnify_pipelines_toolkit/analysis/amplicon/find_mcp_inflection_points.py,sha256=EnsIrPGigsy8jVnjYgSECihhuquSJTgCi-k6fhusKYM,3547
|
|
9
9
|
mgnify_pipelines_toolkit/analysis/amplicon/make_asv_count_table.py,sha256=pvMDfq-KA9LrD359fvM1uXbXa2Mow5Fja-1iUoVdSEg,8676
|
|
10
10
|
mgnify_pipelines_toolkit/analysis/amplicon/mapseq_to_asv_table.py,sha256=9QI6o85T4JPFq4EdKmnYzI6sxPLJG6t9W0xKiu24aqw,5035
|
|
11
|
-
mgnify_pipelines_toolkit/analysis/amplicon/primer_val_classification.py,sha256=
|
|
11
|
+
mgnify_pipelines_toolkit/analysis/amplicon/primer_val_classification.py,sha256=d_Mco92RRUXSq5-5oFlXC0ZO83kbxwOREoCCyA2glDc,3751
|
|
12
12
|
mgnify_pipelines_toolkit/analysis/amplicon/remove_ambiguous_reads.py,sha256=8vwH6PY-XwMZhaUo08tOwdFsoREfNumvvDawTb9Y98U,3168
|
|
13
13
|
mgnify_pipelines_toolkit/analysis/amplicon/rev_comp_se_primers.py,sha256=19NgCYE12bEvRBVibhZtZywwRiMdiBUBJjzL4by3_qo,1717
|
|
14
14
|
mgnify_pipelines_toolkit/analysis/amplicon/standard_primer_matching.py,sha256=RDPsaWKf0wIDwvCHXyRCh2zSJf3y9E7uOhHjaAeX8bY,11099
|
|
15
15
|
mgnify_pipelines_toolkit/analysis/shared/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
-
mgnify_pipelines_toolkit/analysis/shared/fastq_suffix_header_check.py,sha256=
|
|
17
|
-
mgnify_pipelines_toolkit/analysis/shared/get_subunits.py,sha256=
|
|
16
|
+
mgnify_pipelines_toolkit/analysis/shared/fastq_suffix_header_check.py,sha256=H5ccd1e_e5dk8vhVOvHLK1lknYbRPbnqPjULCYnU0FQ,4021
|
|
17
|
+
mgnify_pipelines_toolkit/analysis/shared/get_subunits.py,sha256=xl5HduWtGPWiI9yqsjQ3itIzwHSxF2ig5KgjLXmj9EE,4772
|
|
18
18
|
mgnify_pipelines_toolkit/analysis/shared/get_subunits_coords.py,sha256=DTX7S1P_BkGPEeDkbmUn1YoB247hpdNIe5rdFdRYDdA,1929
|
|
19
19
|
mgnify_pipelines_toolkit/analysis/shared/library_strategy_check.py,sha256=XV1vjkjIHhzouM1k5hu_51XK_mgC_EOOGDN3mx4LOvc,1991
|
|
20
20
|
mgnify_pipelines_toolkit/analysis/shared/mapseq2biom.py,sha256=exzWyuK0YxDiVSu4WX2H7g-uT5Y00w_EmrFqSHjRObU,5554
|
|
@@ -25,9 +25,10 @@ mgnify_pipelines_toolkit/constants/thresholds.py,sha256=zz8paGQfZAU8tT-RbSGpzZ1A
|
|
|
25
25
|
mgnify_pipelines_toolkit/constants/var_region_coordinates.py,sha256=jbOB_bTnW2TRjmdF7IS1A7nNOLt-lGnGyVXUHu0TmvQ,1307
|
|
26
26
|
mgnify_pipelines_toolkit/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
27
|
mgnify_pipelines_toolkit/utils/fasta_to_delimited.py,sha256=GbNT7clHso21w_1PbPpWKVRd5bNs_MDbGXt8XVIGl2o,3991
|
|
28
|
-
mgnify_pipelines_toolkit
|
|
29
|
-
mgnify_pipelines_toolkit-0.1.
|
|
30
|
-
mgnify_pipelines_toolkit-0.1.
|
|
31
|
-
mgnify_pipelines_toolkit-0.1.
|
|
32
|
-
mgnify_pipelines_toolkit-0.1.
|
|
33
|
-
mgnify_pipelines_toolkit-0.1.
|
|
28
|
+
mgnify_pipelines_toolkit/utils/get_mpt_version.py,sha256=zsQ4TuR4vpqYa67MgIdopdscsS0DVJdy4enRe1nCjSs,793
|
|
29
|
+
mgnify_pipelines_toolkit-0.1.7.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
30
|
+
mgnify_pipelines_toolkit-0.1.7.dist-info/METADATA,sha256=qCpuJs-FFtVbcNgmbj1pV1f2oHLeyiaGUkC1eRS1dLE,5859
|
|
31
|
+
mgnify_pipelines_toolkit-0.1.7.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
32
|
+
mgnify_pipelines_toolkit-0.1.7.dist-info/entry_points.txt,sha256=tCZ7ijAgfIn47xXGxNtoZbHTDyUfHjUzjXg-NBRlj6g,1646
|
|
33
|
+
mgnify_pipelines_toolkit-0.1.7.dist-info/top_level.txt,sha256=xA_wC7C01V3VwuDnqwRM2QYeJJ45WtvF6LVav4tYxuE,25
|
|
34
|
+
mgnify_pipelines_toolkit-0.1.7.dist-info/RECORD,,
|
|
@@ -6,6 +6,7 @@ classify_var_regions = mgnify_pipelines_toolkit.analysis.amplicon.classify_var_r
|
|
|
6
6
|
fasta_to_delimited = mgnify_pipelines_toolkit.utils.fasta_to_delimited:main
|
|
7
7
|
fastq_suffix_header_check = mgnify_pipelines_toolkit.analysis.shared.fastq_suffix_header_check:main
|
|
8
8
|
find_mcp_inflection_points = mgnify_pipelines_toolkit.analysis.amplicon.find_mcp_inflection_points:main
|
|
9
|
+
get_mpt_version = mgnify_pipelines_toolkit.utils.get_mpt_version:main
|
|
9
10
|
get_subunits = mgnify_pipelines_toolkit.analysis.shared.get_subunits:main
|
|
10
11
|
get_subunits_coords = mgnify_pipelines_toolkit.analysis.shared.get_subunits_coords:main
|
|
11
12
|
library_strategy_check = mgnify_pipelines_toolkit.analysis.shared.library_strategy_check:main
|
{mgnify_pipelines_toolkit-0.1.5.dist-info → mgnify_pipelines_toolkit-0.1.7.dist-info}/LICENSE
RENAMED
|
File without changes
|
{mgnify_pipelines_toolkit-0.1.5.dist-info → mgnify_pipelines_toolkit-0.1.7.dist-info}/top_level.txt
RENAMED
|
File without changes
|