Skip to content

Commit

Permalink
Merge pull request #770 from SysBioChalmers/removePeroGenesFromBetaox…
Browse files Browse the repository at this point in the history
…idationGPRsInMito

fix: remove genes only expressed in peroxisome from beta-oxidation reactions in mitochondria
  • Loading branch information
haowang-bioinfo authored Dec 18, 2023
2 parents 04a85be + 091f80c commit 64f32f6
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 11 deletions.
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 @@ -226667,7 +226667,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 @@ -226898,7 +226898,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 @@ -226917,7 +226917,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 @@ -226936,7 +226936,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 @@ -226993,7 +226993,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 @@ -227191,7 +227191,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 @@ -228239,7 +228239,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 @@ -232053,7 +232053,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 @@ -232274,7 +232274,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 @@ -232325,7 +232325,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 @@ -232342,7 +232342,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

0 comments on commit 64f32f6

Please sign in to comment.