Metadata-Version: 2.1
Name: gemsembler
Version: 0.2.0
Summary: A tool for assembling and comparing several types of Genome-Scale Metabolic Models.
Author-email: Elena Matveishina <elena.matveishina@embl.de>, Bartosz Bartmanski <bartosz.bartmanski@embl.de>
License: MIT License
        
        Copyright (c) 2022 Zimmermann-Kogadeeva Group
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://git.embl.de/grp-zimmermann-kogadeeva/GEMsembler
Project-URL: Bug tracker, https://git.embl.de/grp-zimmermann-kogadeeva/GEMsembler/issues
Keywords: genome scale metabolic models,metabolism,biology
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cobra
Requires-Dist: pandas>=2.0
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: dill
Requires-Dist: ncbi-genome-download

# GEMsembler

GEMsembler tool for assembling and comparing several types of Genome-Scale Metabolic
Models. 

**THIS IS A BETA VERSION! BUGS CAN BE EXPECTED**

### Instalation

Instalation from git via pip
```
pip install git+ssh://git@git.embl.de/grp-zimmermann-kogadeeva/GEMsembler.git
```

You also have to install BLAST in advance

### Usage

Input models have to be COBRApy readable files. And models need to be particular type. Curently models made by CarveMe (carveme), ModelSEED (modelseed), gapseq (gapseq) and models downloaded from AGORA VMH database (agora) are supported. Custom type is comming soon. Genomes, from which the models are built will allow to convert and assemble genes as well.

```
input_data = {
    "curated_LP": {"path_to_model": "./iLP728_revision_data_met_C_c.xml", "model_type": "carveme", "path_to_genome": "./protein_fasta.faa"},
    "cauniv_LP": {"path_to_model": "./CA1.xml", "model_type": "carveme", "path_to_genome": "./protein_fasta.faa"},
    "cagram_LP": {"path_to_model": "./CA2.xml", "model_type": "carveme", "path_to_genome": "./protein_fasta.faa"},
    "msgram_LP": {"path_to_model": "./MS2.sbml", "model_type": "modelseed", "path_to_genome": "./protein_fasta.faa"},
    "agora_LP": {"path_to_model": "./Lactobacillus_plantarum_WCFS1_agora.xml", "model_type": "agora", "path_to_genome": "./Lactobacillus_plantarum_WCFS1.fasta"}
}
```

Fisrt stage is the creation of gathered models, a class, that performs conversion and contains results of all stages.

```
gathered = GatheredModels()
for i, v in input_data.items():
    gathered.add_model(i, **v)
gathered.run()

```

Second stage is actual assembly of supermodel from the in formation in gathered models. User has to provide output folder. And for gene conversion user hast provide either final genes in fasta. Then all gene will be converted to ids in these files. Or if user provides NCBI assembly ID for his organism of interest, corresponding genome will be downloaded autpmaticly and all genes will be converted to the locus tags of the organis.
```
supermodel_lp = gathered.assemble_supermodel("./gemsembler_output/", assembly_id = "GCF_000203855.3")
```

After supermodel is assembled different comparison methods can be run
```
supermodel_lp.at_least_in(2)
```

And results of comparison can be extracted as typical COBRApy models
```
core2 = get_model_of_interest(supermodel_lp, "core2", "./gemsembler_output/LP_core2_output_model.xml")
```
