MetaPont 0.0.1__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.
- MetaPont/Extraction_By_Function.py +95 -0
- MetaPont/Function_By_Taxa.py +304 -0
- MetaPont/__init__.py +0 -0
- MetaPont/constants.py +2 -0
- MetaPont/emapper_readmap_cds_combiner_v1.py +235 -0
- MetaPont/kraken_emapper_readmap_combiner_v1.py +222 -0
- MetaPont/lineage_matrix_collapse_v1.py +80 -0
- MetaPont/lineage_matrix_collapse_v2.py +121 -0
- MetaPont-0.0.1.dist-info/LICENSE +674 -0
- MetaPont-0.0.1.dist-info/METADATA +111 -0
- MetaPont-0.0.1.dist-info/RECORD +14 -0
- MetaPont-0.0.1.dist-info/WHEEL +5 -0
- MetaPont-0.0.1.dist-info/entry_points.txt +2 -0
- MetaPont-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: MetaPont
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: MetaPont - A tool to bridge the gap between the output of metagenomic tools and the analysis of the data
|
|
5
|
+
Home-page: https://github.com/TheHuwsLab/MetaPont
|
|
6
|
+
Author: Nicholas Dimonaco
|
|
7
|
+
Author-email: nicholas@dimonaco.co.uk
|
|
8
|
+
Project-URL: Bug Tracker, https://github.com/TheHuwsLab/MetaPont/issues
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Requires-Python: >=3.6
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
|
|
16
|
+
# MetaPont
|
|
17
|
+
**MetaPont** - A tool to bridge the gap between the output of metagenomic tools and the analysis of the data
|
|
18
|
+
|
|
19
|
+
## Features - These are the current aims of this project - Still under development
|
|
20
|
+
|
|
21
|
+
- **Targeted Functional Analysis:** Search for specific functional IDs (e.g., GO terms) within the `.tsv` files provided by the HuwsLab Metagenome Workflow (https://github.com/TheHuwsLab/Metagenome_Workflow) .
|
|
22
|
+
- **Taxonomic Breakdown:** Extract genus-level taxonomy information and calculate their proportions in the dataset.
|
|
23
|
+
- **Batch Processing:** Analyse all `.tsv` files in a specified directory.
|
|
24
|
+
- **Customisable Output:** Save results in a format suitable for downstream analysis.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Installation
|
|
29
|
+
|
|
30
|
+
### Prerequisites
|
|
31
|
+
|
|
32
|
+
Ensure you have the following installed:
|
|
33
|
+
|
|
34
|
+
- Python ~3.6 or later
|
|
35
|
+
- Required Python libraries: `argparse`, `csv`, and `collections` (standard libs).
|
|
36
|
+
|
|
37
|
+
### Installation via pip
|
|
38
|
+
|
|
39
|
+
MetaPont is provided as a pip distribution.
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pip install MetaPont
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Usage
|
|
48
|
+
|
|
49
|
+
### Command-line Arguments
|
|
50
|
+
|
|
51
|
+
The `Extract-By-Function` tool provides several command-line options:
|
|
52
|
+
|
|
53
|
+
| Option | Description | Required | Default |
|
|
54
|
+
|--------------------------|-----------------------------------------------|----------|-------------------------------|
|
|
55
|
+
| `-d`, `--directory` | Directory containing `.tsv` files to analyse. | Yes | None |
|
|
56
|
+
| `-f`, `--function_id` | Functional ID to search for (e.g., `GO:0002`). | Yes | None |
|
|
57
|
+
| `-m`, `--min_proportion` | Minimum proportion needed for reporting. | Yes | 0.05 (5%) |
|
|
58
|
+
| `-o`, `--output` | Output file name to save results. | No | `output_taxa_proportions.tsv` |
|
|
59
|
+
|
|
60
|
+
### Example
|
|
61
|
+
|
|
62
|
+
To search for the functional ID `GO:0002` in all `.tsv` files within the `data/` directory:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
ExtractByFunction -d .../test_data/Final_contig/ -f GO:0002 -m 0.10 -o .../test_data/Final_Contig/Extract_By_Function_Out/results.tsv
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Output
|
|
71
|
+
|
|
72
|
+
The tool generates a tab-delimited output file with the following columns:
|
|
73
|
+
|
|
74
|
+
1. **Sample:** Name of the processed `.tsv` file.
|
|
75
|
+
2. **Taxa:** Genus-level taxonomic assignment extracted from the `Lineage` column.
|
|
76
|
+
3. **Proportion:** Proportion of matches to the given functional ID within the sample.
|
|
77
|
+
|
|
78
|
+
Example output:
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
Function ID: GO:0002
|
|
82
|
+
Sample Taxa Proportion
|
|
83
|
+
sample1.tsv Escherichia 0.542857
|
|
84
|
+
sample1.tsv Salmonella 0.457143
|
|
85
|
+
sample2.tsv Bacillus 0.650000
|
|
86
|
+
sample2.tsv Clostridium 0.350000
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Implementation Details
|
|
92
|
+
|
|
93
|
+
### Workflow
|
|
94
|
+
|
|
95
|
+
1. The script reads `.tsv` files from the specified directory.
|
|
96
|
+
2. For each file, it searches for occurrences of the given functional ID within specific columns.
|
|
97
|
+
3. Matches are associated with genus-level taxonomic information extracted from the `Lineage` column.
|
|
98
|
+
4. Taxa proportions are calculated and saved to the output file.
|
|
99
|
+
|
|
100
|
+
### Large File Handling (Might be a failure point)
|
|
101
|
+
|
|
102
|
+
The script uses `csv.field_size_limit` to handle exceptionally large `.tsv` files.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Future Plans
|
|
107
|
+
|
|
108
|
+
- Add support for additional file formats (e.g., `.csv`, `.txt`).
|
|
109
|
+
- Expand functionality for more complex taxonomic and functional analyses.
|
|
110
|
+
---
|
|
111
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
MetaPont/Extraction_By_Function.py,sha256=qSXaPcn8MrYAyv-6GXSM1rkrDTSh3EwmauVHHXPV6xk,3562
|
|
2
|
+
MetaPont/Function_By_Taxa.py,sha256=sBA9IrfTaw0QU3h2brG2W8C8Tkx3BJ9pR2jWJJc_H2w,14696
|
|
3
|
+
MetaPont/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
MetaPont/constants.py,sha256=6koyFUw-geqkGUQUJ-vyzI2AKAYwwYu5SgghciCbyyg,29
|
|
5
|
+
MetaPont/emapper_readmap_cds_combiner_v1.py,sha256=HmZqZNjuTWU879X9l4xgInmoQPkUkKBJxUwYLJNdU-w,10929
|
|
6
|
+
MetaPont/kraken_emapper_readmap_combiner_v1.py,sha256=v97oSqLmKmeKKGE4TeZ4CLnvzVt5EOLXdaCk_ic0J98,12630
|
|
7
|
+
MetaPont/lineage_matrix_collapse_v1.py,sha256=Zi86gYVUbY37I6Zj3zi0mCkGcplEonOyqNpuffcl2Ks,1857
|
|
8
|
+
MetaPont/lineage_matrix_collapse_v2.py,sha256=YMPXSK7mu5WWCJDSRvK3eC2uJIvKg_D1yQen9Nuxw98,5638
|
|
9
|
+
MetaPont-0.0.1.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
10
|
+
MetaPont-0.0.1.dist-info/METADATA,sha256=E_Ipfvm38KotAaDnUO_DY2wbTUmTbf70NgX3OqmcH4g,3881
|
|
11
|
+
MetaPont-0.0.1.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
12
|
+
MetaPont-0.0.1.dist-info/entry_points.txt,sha256=oJW7-LClJMYQ9SW6ojFGlrM6OQDIb0L8AiABV2OlVN8,74
|
|
13
|
+
MetaPont-0.0.1.dist-info/top_level.txt,sha256=PtnZWT8JJPOpVvOQp9QdBL368QXyxDcO-URW1zqJ6ss,9
|
|
14
|
+
MetaPont-0.0.1.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
MetaPont
|