Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove genes only expressed in peroxisome from beta-oxidation reactions in mitochondria #770

Merged
merged 9 commits into from
Dec 18, 2023
26 changes: 26 additions & 0 deletions code/modelCuration/reportPeroxGenesFromBetaoxidationGPRsInMito.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 1. read gene compartment from genes.tsv and load model
# 2. get the reactions in fatty acid oxidation subsystem and mitochondria compartment
# 3. go through the reactions and check the compartment of each genes in the GPR
# 4. report the genes that are only expressed in peroxisome
import csv
import cobra
import pandas as pd

# load genes.tsv and read info into a dict for genes and their compartments
with open("../../model/genes.tsv", 'r') as file:
reader = csv.reader(file, delimiter='\t')
geneCompDict = {row[0]: row[8] for row in reader}

# load model
model = cobra.io.load_yaml_model('../../model/Human-GEM.yml')

# collect reactions from "Fatty acid oxidation" subsystem and in [m] compartment
subsys = 'Fatty acid oxidation'
targetComp = {'m'}
for r in model.reactions:
if subsys in r.subsystem and targetComp == r.compartments:
# go through collected reactions find genes that exist only in peroxisome
for g in r.genes:
if geneCompDict[g.id] == 'Peroxisome':
print(f'{r.id} | {g.id} | {r.build_reaction_string(True)} | {r.gene_reaction_rule} | {r.gene_name_reaction_rule}')

22 changes: 11 additions & 11 deletions model/Human-GEM.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226738,7 +226738,7 @@
- MAM02678m: -1
- lower_bound: -1000
- upper_bound: 1000
- gene_reaction_rule: "ENSG00000115425 or ENSG00000116353"
- gene_reaction_rule: "ENSG00000116353"
- rxnNotes: ""
- rxnFrom: "Recon3D"
- eccodes: "1.3.1.38"
Expand Down Expand Up @@ -226969,7 +226969,7 @@
- MAM02644m: -1
- lower_bound: -1000
- upper_bound: 1000
- gene_reaction_rule: "ENSG00000115425 or ENSG00000116353"
- gene_reaction_rule: "ENSG00000116353"
- rxnNotes: ""
- rxnFrom: "Recon3D"
- eccodes: "1.3.1.38"
Expand All @@ -226988,7 +226988,7 @@
- MAM02555m: 1
- lower_bound: -1000
- upper_bound: 1000
- gene_reaction_rule: "ENSG00000115425 or ENSG00000116353"
- gene_reaction_rule: "ENSG00000116353"
- rxnNotes: ""
- rxnFrom: "Recon3D"
- eccodes: "1.3.1.38"
Expand All @@ -227007,7 +227007,7 @@
- MAM02555m: 1
- lower_bound: -1000
- upper_bound: 1000
- gene_reaction_rule: "ENSG00000115425 or ENSG00000116353"
- gene_reaction_rule: "ENSG00000116353"
- rxnNotes: ""
- rxnFrom: "Recon3D"
- eccodes: "1.3.1.38"
Expand Down Expand Up @@ -227064,7 +227064,7 @@
- MAM02555m: 1
- lower_bound: -1000
- upper_bound: 1000
- gene_reaction_rule: "ENSG00000115425 or ENSG00000116353"
- gene_reaction_rule: "ENSG00000116353"
- rxnNotes: ""
- rxnFrom: "Recon3D"
- eccodes: "1.3.1.38"
Expand Down Expand Up @@ -227262,7 +227262,7 @@
- MAM02555m: -1
- lower_bound: -1000
- upper_bound: 1000
- gene_reaction_rule: "ENSG00000115425 or ENSG00000116353"
- gene_reaction_rule: "ENSG00000116353"
- rxnNotes: ""
- rxnFrom: "Recon3D"
- eccodes: "1.3.1.38"
Expand Down Expand Up @@ -228310,7 +228310,7 @@
- MAM02677m: 1
- lower_bound: 0
- upper_bound: 1000
- gene_reaction_rule: "(ENSG00000138029 and ENSG00000167315) or (ENSG00000060971 and ENSG00000138029)"
- gene_reaction_rule: "ENSG00000138029 or ENSG00000167315"
- rxnNotes: ""
- rxnFrom: "Recon3D"
- eccodes: "2.3.1.86"
Expand Down Expand Up @@ -232162,7 +232162,7 @@
- MAM03334m: 1
- lower_bound: -1000
- upper_bound: 1000
- gene_reaction_rule: "ENSG00000084754 or ENSG00000113790 or ENSG00000127884 or ENSG00000138029"
- gene_reaction_rule: "ENSG00000084754 or ENSG00000127884 or ENSG00000138029"
- rxnNotes: ""
- rxnFrom: "Recon3D"
- eccodes: "4.2.1.17"
Expand Down Expand Up @@ -232383,7 +232383,7 @@
- MAM03358m: 1
- lower_bound: -1000
- upper_bound: 1000
- gene_reaction_rule: "ENSG00000113790 or ENSG00000167969 or ENSG00000198721"
- gene_reaction_rule: "ENSG00000167969 or ENSG00000198721"
- rxnNotes: ""
- rxnFrom: "Recon3D"
- eccodes: "5.3.3.8"
Expand Down Expand Up @@ -232434,7 +232434,7 @@
- MAM03361m: -1
- lower_bound: -1000
- upper_bound: 1000
- gene_reaction_rule: "ENSG00000113790 or ENSG00000167969 or ENSG00000198721"
- gene_reaction_rule: "ENSG00000167969 or ENSG00000198721"
- rxnNotes: ""
- rxnFrom: "Recon3D"
- eccodes: "5.3.3.8"
Expand All @@ -232451,7 +232451,7 @@
- MAM03361m: -1
- lower_bound: -1000
- upper_bound: 1000
- gene_reaction_rule: "ENSG00000084754 or ENSG00000113790 or ENSG00000127884 or ENSG00000138029"
- gene_reaction_rule: "ENSG00000084754 or ENSG00000127884 or ENSG00000138029"
- rxnNotes: ""
- rxnFrom: "Recon3D"
- eccodes: "4.2.1.17"
Expand Down