MetaPont 0.1.2__tar.gz → 0.1.3__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.
Files changed (29) hide show
  1. {metapont-0.1.2/src/MetaPont.egg-info → metapont-0.1.3}/PKG-INFO +4 -4
  2. {metapont-0.1.2 → metapont-0.1.3}/README.md +3 -3
  3. {metapont-0.1.2 → metapont-0.1.3}/pyproject.toml +1 -1
  4. {metapont-0.1.2 → metapont-0.1.3}/src/MetaPont/__init__.py +1 -1
  5. {metapont-0.1.2 → metapont-0.1.3}/src/MetaPont/cli.py +28 -3
  6. {metapont-0.1.2 → metapont-0.1.3/src/MetaPont.egg-info}/PKG-INFO +4 -4
  7. {metapont-0.1.2 → metapont-0.1.3}/LICENSE +0 -0
  8. {metapont-0.1.2 → metapont-0.1.3}/setup.cfg +0 -0
  9. {metapont-0.1.2 → metapont-0.1.3}/src/MetaPont/analysis.py +0 -0
  10. {metapont-0.1.2 → metapont-0.1.3}/src/MetaPont/compat.py +0 -0
  11. {metapont-0.1.2 → metapont-0.1.3}/src/MetaPont/constants.py +0 -0
  12. {metapont-0.1.2 → metapont-0.1.3}/src/MetaPont/layout.py +0 -0
  13. {metapont-0.1.2 → metapont-0.1.3}/src/MetaPont/old/Contig_Coverage_Summary.py +0 -0
  14. {metapont-0.1.2 → metapont-0.1.3}/src/MetaPont/old/Extract_By_Function.py +0 -0
  15. {metapont-0.1.2 → metapont-0.1.3}/src/MetaPont/old/Extract_By_Taxa.py +0 -0
  16. {metapont-0.1.2 → metapont-0.1.3}/src/MetaPont/old/Extract_Function_By_Taxa.py +0 -0
  17. {metapont-0.1.2 → metapont-0.1.3}/src/MetaPont/old/Extract_Reads_By_Function.py +0 -0
  18. {metapont-0.1.2 → metapont-0.1.3}/src/MetaPont/old/Function_By_Taxa.py +0 -0
  19. {metapont-0.1.2 → metapont-0.1.3}/src/MetaPont/old/MetaPont_Combine.py +0 -0
  20. {metapont-0.1.2 → metapont-0.1.3}/src/MetaPont/old/Report_Contig_Lineage.py +0 -0
  21. {metapont-0.1.2 → metapont-0.1.3}/src/MetaPont/old/__init__.py +0 -0
  22. {metapont-0.1.2 → metapont-0.1.3}/src/MetaPont/old/constants.py +0 -0
  23. {metapont-0.1.2 → metapont-0.1.3}/src/MetaPont/parsers.py +0 -0
  24. {metapont-0.1.2 → metapont-0.1.3}/src/MetaPont/pipeline.py +0 -0
  25. {metapont-0.1.2 → metapont-0.1.3}/src/MetaPont.egg-info/SOURCES.txt +0 -0
  26. {metapont-0.1.2 → metapont-0.1.3}/src/MetaPont.egg-info/dependency_links.txt +0 -0
  27. {metapont-0.1.2 → metapont-0.1.3}/src/MetaPont.egg-info/entry_points.txt +0 -0
  28. {metapont-0.1.2 → metapont-0.1.3}/src/MetaPont.egg-info/requires.txt +0 -0
  29. {metapont-0.1.2 → metapont-0.1.3}/src/MetaPont.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: MetaPont
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: Integrated analysis of metagenomic assembly, readmapping, Kraken2 and eggNOG-mapper outputs.
5
5
  Author-email: Nicholas Dimonaco <nicholas@dimonaco.co.uk>
6
6
  License-Expression: GPL-3.0-or-later
@@ -20,7 +20,7 @@ Provides-Extra: test
20
20
  Requires-Dist: pytest>=7.0; extra == "test"
21
21
  Dynamic: license-file
22
22
 
23
- # MetaPont v0.1.2
23
+ # MetaPont v0.1.3
24
24
 
25
25
  MetaPont integrates existing metagenomic workflow outputs into per-sample and
26
26
  cross-sample tables for contigs, taxonomy, readmapping support, and eggNOG-mapper
@@ -140,7 +140,7 @@ Find taxa supporting a functional ID:
140
140
 
141
141
  ```bash
142
142
  metapont query-function \
143
- --root-dir /path/to/workflow-output \
143
+ --root-dir /path/to/MetaPont_Results \
144
144
  --function-id GO:0016597 \
145
145
  --category GO \
146
146
  --rank Genus \
@@ -157,7 +157,7 @@ Find the most supported features associated with a taxon:
157
157
 
158
158
  ```bash
159
159
  metapont query-taxon \
160
- --root-dir /path/to/workflow-output \
160
+ --root-dir /path/to/MetaPont_Results \
161
161
  --taxon Bacillus \
162
162
  --category GO \
163
163
  --rank Genus \
@@ -1,4 +1,4 @@
1
- # MetaPont v0.1.2
1
+ # MetaPont v0.1.3
2
2
 
3
3
  MetaPont integrates existing metagenomic workflow outputs into per-sample and
4
4
  cross-sample tables for contigs, taxonomy, readmapping support, and eggNOG-mapper
@@ -118,7 +118,7 @@ Find taxa supporting a functional ID:
118
118
 
119
119
  ```bash
120
120
  metapont query-function \
121
- --root-dir /path/to/workflow-output \
121
+ --root-dir /path/to/MetaPont_Results \
122
122
  --function-id GO:0016597 \
123
123
  --category GO \
124
124
  --rank Genus \
@@ -135,7 +135,7 @@ Find the most supported features associated with a taxon:
135
135
 
136
136
  ```bash
137
137
  metapont query-taxon \
138
- --root-dir /path/to/workflow-output \
138
+ --root-dir /path/to/MetaPont_Results \
139
139
  --taxon Bacillus \
140
140
  --category GO \
141
141
  --rank Genus \
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "MetaPont"
7
- version = "0.1.2"
7
+ version = "0.1.3"
8
8
  authors = [
9
9
  { name = "Nicholas Dimonaco", email = "nicholas@dimonaco.co.uk" }
10
10
  ]
@@ -1,6 +1,6 @@
1
1
  """MetaPont: integrated analysis of metagenomic workflow outputs."""
2
2
 
3
- __version__ = "0.1.2"
3
+ __version__ = "0.1.3"
4
4
  MetaPont_Version = f"v{__version__}"
5
5
 
6
6
  __all__ = ["__version__", "MetaPont_Version"]
@@ -114,8 +114,9 @@ def main(argv: list[str] | None = None) -> int:
114
114
  qf_p = sub.add_parser("query-function", help="Find taxa supporting a particular eggNOG functional ID.")
115
115
  qf_p.add_argument("--root-dir", "-d", default=None,
116
116
  help="Workflow root used to find the default gene table; not needed with --gene-table or --output-dir.")
117
+ qf_p.add_argument("--gene-table", default=None,
118
+ help="Gene annotation TSV/TSV.GZ; defaults to the integrated output table.")
117
119
  qf_p.add_argument("--output-dir", default=None)
118
- qf_p.add_argument("--gene-table", default=None, help="Gene annotation TSV/TSV.GZ; defaults to the integrated output table.")
119
120
  qf_p.add_argument("--function-id", "-f", required=True, help="Exact function ID, e.g. GO:0016597 or EC:2.7.11.1.")
120
121
  qf_p.add_argument("--category", "-c", default=None, help="Optional annotation category, e.g. GO, EC, KEGG_KO, PFAM.")
121
122
  qf_p.add_argument("--rank", default="Genus", help="Taxonomic rank for attribution (default: Genus).")
@@ -123,9 +124,10 @@ def main(argv: list[str] | None = None) -> int:
123
124
  qf_p.add_argument("--output", "-o", required=True)
124
125
 
125
126
  qt_p = sub.add_parser("query-taxon", help="Report the most supported functions for a taxon.")
126
- qt_p.add_argument("--root-dir", "-d", required=True)
127
+ qt_p.add_argument("--root-dir", "-d", default=None)
128
+ qt_p.add_argument("--gene-table", default=None,
129
+ help="Gene annotation TSV/TSV.GZ; defaults to the integrated output table.")
127
130
  qt_p.add_argument("--output-dir", default=None)
128
- qt_p.add_argument("--gene-table", default=None)
129
131
  qt_p.add_argument("--taxon", "-t", required=True, help="Taxon name or lineage token, e.g. Bacillus or g__Bacillus.")
130
132
  qt_p.add_argument("--category", "-c", required=True, help="Annotation category, e.g. GO, EC, KEGG_KO.")
131
133
  qt_p.add_argument("--rank", default="Genus")
@@ -160,17 +162,40 @@ def main(argv: list[str] | None = None) -> int:
160
162
  print(f"Healed {len(events)} flags.")
161
163
  return 0
162
164
  if args.command == "coverage":
165
+ # Prevent duplicating "MetaPont_Results" if already in root_dir
166
+ root_path = Path(args.root_dir).expanduser().resolve()
167
+ if "MetaPont_Results" in root_path.parts and not args.output_dir:
168
+ args.output_dir = root_path
169
+
163
170
  out, count = coverage_summary(args.root_dir, args.prefix, args.output, args.read_length)
164
171
  print(f"Coverage summary written for {count} samples: {out}")
165
172
  return 0
166
173
  if args.command == "query-function":
174
+ if args.root_dir is None and args.gene_table is None:
175
+ raise ValueError("Either --root-dir or --gene-table must be specified.")
176
+
177
+ # Prevent duplicating "MetaPont_Results" if already in root_dir
178
+ root_path = Path(args.root_dir).expanduser().resolve()
179
+ if "MetaPont_Results" in root_path.parts and not args.output_dir:
180
+ args.output_dir = root_path
181
+
167
182
  table = _gene_table(args.root_dir, args.output_dir, args.gene_table)
168
183
  count = query_function(table, args.function_id, args.output, args.category, args.rank, args.top)
169
184
  print(f"Wrote {count} contributing taxon rows to {args.output}")
170
185
  return 0
186
+
171
187
  if args.command == "query-taxon":
188
+ if args.root_dir is None and args.gene_table is None:
189
+ raise ValueError("Either --root-dir or --gene-table must be specified.")
190
+
191
+ # Prevent duplicating "MetaPont_Results" if already in root_dir
192
+ root_path = Path(args.root_dir).expanduser().resolve()
193
+ if "MetaPont_Results" in root_path.parts and not args.output_dir:
194
+ args.output_dir = root_path
195
+
172
196
  table = _gene_table(args.root_dir, args.output_dir, args.gene_table)
173
197
  count = query_taxon(table, args.taxon, args.output, args.category, args.top, args.rank)
198
+
174
199
  print(f"Wrote {count} taxon-associated function rows to {args.output}")
175
200
  return 0
176
201
  except (FileNotFoundError, RuntimeError, ValueError, OSError) as error:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: MetaPont
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: Integrated analysis of metagenomic assembly, readmapping, Kraken2 and eggNOG-mapper outputs.
5
5
  Author-email: Nicholas Dimonaco <nicholas@dimonaco.co.uk>
6
6
  License-Expression: GPL-3.0-or-later
@@ -20,7 +20,7 @@ Provides-Extra: test
20
20
  Requires-Dist: pytest>=7.0; extra == "test"
21
21
  Dynamic: license-file
22
22
 
23
- # MetaPont v0.1.2
23
+ # MetaPont v0.1.3
24
24
 
25
25
  MetaPont integrates existing metagenomic workflow outputs into per-sample and
26
26
  cross-sample tables for contigs, taxonomy, readmapping support, and eggNOG-mapper
@@ -140,7 +140,7 @@ Find taxa supporting a functional ID:
140
140
 
141
141
  ```bash
142
142
  metapont query-function \
143
- --root-dir /path/to/workflow-output \
143
+ --root-dir /path/to/MetaPont_Results \
144
144
  --function-id GO:0016597 \
145
145
  --category GO \
146
146
  --rank Genus \
@@ -157,7 +157,7 @@ Find the most supported features associated with a taxon:
157
157
 
158
158
  ```bash
159
159
  metapont query-taxon \
160
- --root-dir /path/to/workflow-output \
160
+ --root-dir /path/to/MetaPont_Results \
161
161
  --taxon Bacillus \
162
162
  --category GO \
163
163
  --rank Genus \
File without changes
File without changes