From 72cc59f87357fb1d8a0ab0dd001756160ecaea8a Mon Sep 17 00:00:00 2001 From: Hao Wang Date: Wed, 15 Feb 2023 22:36:00 +0100 Subject: [PATCH 1/6] feat: deprecate code for loading Json input file - Replace JSON ortholog file with TSV format --- code/GPRs/extractAllianceGenomeOrthologs.m | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/code/GPRs/extractAllianceGenomeOrthologs.m b/code/GPRs/extractAllianceGenomeOrthologs.m index 9df96e37..44d067dc 100644 --- a/code/GPRs/extractAllianceGenomeOrthologs.m +++ b/code/GPRs/extractAllianceGenomeOrthologs.m @@ -42,8 +42,6 @@ error('Input file %s cannot be found',string(homologFilename)); end -% load input file -inputPairs = jsondecode(fileread(homologFilename)); % define output structure fieldList = {'fromGeneId', @@ -56,22 +54,8 @@ 'totalMethodCount'}; -% initialize output structure -for i = 1:length(fieldList) - orthologStructure.(fieldList{i}) = {}; -end - - -% loop through the content to extract corresponding values -for i=1:length(inputPairs.results) - orthologStructure.fromGeneId = [orthologStructure.fromGeneId; inputPairs.results(i).gene.id]; - orthologStructure.fromSymbol = [orthologStructure.fromSymbol; inputPairs.results(i).gene.symbol]; - orthologStructure.toGeneId = [orthologStructure.toGeneId; inputPairs.results(i).homologGene.id]; - orthologStructure.toSymbol = [orthologStructure.toSymbol; inputPairs.results(i).homologGene.symbol]; - for j = 5:length(fieldList) - orthologStructure.(fieldList{j}) = [orthologStructure.(fieldList{j}); inputPairs.results(i).(fieldList{j})]; - end -end +% load orthologStructure directly from tsv file +orthologStructure = importTsvFile(homologFilename); % check countBest From e2a5f78c4ef1028dd467746dce6f593db606ba8a Mon Sep 17 00:00:00 2001 From: Hao Wang Date: Wed, 15 Feb 2023 22:39:24 +0100 Subject: [PATCH 2/6] refactor: read fieldList directly from the cell structure --- code/GPRs/extractAllianceGenomeOrthologs.m | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/code/GPRs/extractAllianceGenomeOrthologs.m b/code/GPRs/extractAllianceGenomeOrthologs.m index 44d067dc..028db21c 100644 --- a/code/GPRs/extractAllianceGenomeOrthologs.m +++ b/code/GPRs/extractAllianceGenomeOrthologs.m @@ -43,20 +43,9 @@ end -% define output structure -fieldList = {'fromGeneId', - 'fromSymbol' - 'toGeneId', - 'toSymbol', - 'best', - 'bestReverse', - 'methodCount', - 'totalMethodCount'}; - - % load orthologStructure directly from tsv file orthologStructure = importTsvFile(homologFilename); - +fieldList = fieldnames(orthologStructure); % check countBest if countBest From 2af83ca1e8d2e17e6e9516be182664deea0adfe2 Mon Sep 17 00:00:00 2001 From: Hao Wang Date: Wed, 15 Feb 2023 22:43:25 +0100 Subject: [PATCH 3/6] fix: replace cell2mat with str2double for robustness --- code/GPRs/extractAllianceGenomeOrthologs.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/GPRs/extractAllianceGenomeOrthologs.m b/code/GPRs/extractAllianceGenomeOrthologs.m index 028db21c..f51072b3 100644 --- a/code/GPRs/extractAllianceGenomeOrthologs.m +++ b/code/GPRs/extractAllianceGenomeOrthologs.m @@ -92,7 +92,7 @@ % if the pairs are neither bestForward nor bestReverse, then only % reserve the one with highest number of methodCount if noBestForwardReverse - [~, topMethodCount]=maxk(cell2mat(orthologStructure.methodCount(indMore)), 1); + [~, topMethodCount]=maxk(str2double(orthologStructure.methodCount(indMore)), 1); output.from = [output.from; orthologStructure.fromSymbol{indMore(topMethodCount)}]; output.to = [output.to; orthologStructure.toSymbol{indMore(topMethodCount)}]; end From 78c4f7dfce7091a69187bf7719f258661f90dfbe Mon Sep 17 00:00:00 2001 From: Hao Wang Date: Sat, 18 Feb 2023 09:36:09 +0100 Subject: [PATCH 4/6] doc: replace JSON with TSV in documentation --- code/GPRs/extractAllianceGenomeOrthologs.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/GPRs/extractAllianceGenomeOrthologs.m b/code/GPRs/extractAllianceGenomeOrthologs.m index f51072b3..c222642f 100644 --- a/code/GPRs/extractAllianceGenomeOrthologs.m +++ b/code/GPRs/extractAllianceGenomeOrthologs.m @@ -1,6 +1,6 @@ function [orthologPairs, orthologStructure] = extractAllianceGenomeOrthologs(homologFilename, countBest) % extractAllianceGenomeOrthologs -% Read the JSON format ortholog pairs downloaded from Alliance Genome +% Read the TSV format ortholog pairs downloaded from Alliance Genome % database (alliancegenome.org) into a structure that is futher filtered % according to following criteria: % From b35c3afacb0bd966077d2b272d7be08cc1d01d5c Mon Sep 17 00:00:00 2001 From: Hao Wang Date: Mon, 20 Feb 2023 09:16:28 +0100 Subject: [PATCH 5/6] update README.md [skip ci] --- README.md | 70 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 38 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index ec697b22..2433c86f 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Join the chat at https://gitter.im/SysBioChalmers/Human-GEM](https://badges.gitter.im/SysBioChalmers/Human-GEM.svg)](https://gitter.im/SysBioChalmers/Human-GEM?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![GitHub version](https://badge.fury.io/gh/sysbiochalmers%2FHuman-GEM.svg)](https://badge.fury.io/gh/sysbiochalmers%2FHuman-GEM) [![DOI](https://zenodo.org/badge/105752644.svg)](https://zenodo.org/badge/latestdoi/105752644) -[![All Contributors](https://img.shields.io/badge/all_contributors-23-success.svg)](#contributors) +[![All Contributors](https://img.shields.io/badge/all_contributors-25-success.svg)](#contributors) ### Brief Model Description @@ -13,13 +13,13 @@ This repository contains the latest version of Human-GEM, a human genome-scale m If you use Human1 in your research, please cite: - > J. L. Robinson, P. Kocabaş, H. Wang, P.-E. Cholley, et al. An atlas of human metabolism. _Sci. Signal._ 13, eaaz1482 (2020). [doi:10.1126/scisignal.aaz1482](https://doi.org/10.1126/scisignal.aaz1482) + > J. L. Robinson, P. Kocabasÿ, H. Wang, P.-E. Cholley, et al. An atlas of human metabolism. _Sci. Signal._ 13, eaaz1482 (2020). [doi:10.1126/scisignal.aaz1482](https://doi.org/10.1126/scisignal.aaz1482) Starting from Human-GEM v1.5.0, all the releases are also archived in [Zenodo](https://doi.org/10.5281/zenodo.4099692) from which specific version can be cited if used. If you use Mouse1, Rat1, Zebrafish1, Fruitfly1, or Worm1 in your research, please cite: - > H. Wang, J. L. Robinson, P. Kocabaş, J. Gustafsson, M. Anton, P.-E. Cholley, et al. Genome-scale metabolic network reconstruction of model animals as a platform for translational research. _PNAS_ 118, e2102344118 (2021). [doi.org/10.1073/pnas.2102344118](https://doi.org/10.1073/pnas.2102344118) + > H. Wang, J. L. Robinson, P. Kocabasÿ, J. Gustafsson, M. Anton, P.-E. Cholley, et al. Genome-scale metabolic network reconstruction of model animals as a platform for translational research. _PNAS_ 118, e2102344118 (2021). [doi.org/10.1073/pnas.2102344118](https://doi.org/10.1073/pnas.2102344118) @@ -122,35 +122,41 @@ A collection of manually curated 2D metabolic maps associated with Human-GEM are - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Anne Niknejad

πŸ› πŸ–‹

Avlant

πŸ› πŸ–‹

BenjamΓ­n SΓ‘nchez

πŸ’¬

Daniel Weindl

πŸ›

Eduard Kerkhoven

πŸ’¬

Hao Wang

πŸ› πŸ’» πŸ”£ πŸ“– πŸ€” πŸš‡ πŸ“¦ πŸ“† πŸ’¬ πŸ”¬ πŸ‘€ ⚠️ πŸ“’

Jonathan Robinson

πŸ› πŸ’» πŸ”£ πŸ“– πŸ€” πŸš‡ πŸ“¦ πŸ“† πŸ’¬ πŸ”¬ πŸ‘€ βœ… πŸ“’

Jorge Ferreira
πŸ›

Jose L. Cadavid

πŸ›

Marco Pagni

πŸ›

Mihail Anton

πŸ› πŸ’» πŸ€” πŸš‡ πŸ‘€ ⚠️ πŸ“’

Pierre-Etienne Cholley
πŸ› πŸ’» πŸ–‹ πŸ‘€

Pierre-Etienne Cholley
πŸ›

PkiwiBird
πŸ›

Pranas Grigaitis
πŸ› πŸ–‹ πŸ’»

Pınar Kocabaş
πŸ›

Rasool Saghaleyni

πŸ€”

Sarah Cherkaoui

πŸ› πŸ–‹ πŸ’»

Simonas MarciΕ‘auskas

πŸ’¬

TunahanCakir

πŸ›

Xuhang Li

πŸ›

johan-gson

πŸ› πŸ–‹

smoretti

πŸ›
Anne Niknejad
Anne Niknejad

πŸ› πŸ–‹
Avlant
Avlant

πŸ› πŸ–‹
BenjamΓ­n SΓ‘nchez
BenjamΓ­n SΓ‘nchez

πŸ’¬
Daniel Weindl
Daniel Weindl

πŸ›
Eduard Kerkhoven
Eduard Kerkhoven

πŸ’¬
Hao Wang
Hao Wang

πŸ› πŸ’» πŸ”£ πŸ“– πŸ€” πŸš‡ πŸ“¦ πŸ“† πŸ’¬ πŸ”¬ πŸ‘€ ⚠️ πŸ“’
Jonathan Robinson
Jonathan Robinson

πŸ› πŸ’» πŸ”£ πŸ“– πŸ€” πŸš‡ πŸ“¦ πŸ“† πŸ’¬ πŸ”¬ πŸ‘€ βœ… πŸ“’
Jorge Ferreira
Jorge Ferreira
πŸ›
Jose L. Cadavid
Jose L. Cadavid

πŸ›
Marco Pagni
Marco Pagni

πŸ›
Mihail Anton
Mihail Anton

πŸ› πŸ’» πŸ€” πŸš‡ πŸ‘€ ⚠️ πŸ“’
Pierre-Etienne Cholley
Pierre-Etienne Cholley
πŸ› πŸ’» πŸ–‹ πŸ‘€
Pierre-Etienne Cholley
Pierre-Etienne Cholley
πŸ›
PkiwiBird
PkiwiBird
πŸ›
Pranas Grigaitis
Pranas Grigaitis
πŸ› πŸ–‹ πŸ’»
Pınar Kocabaş
Pınar Kocabaş
πŸ›
Rasool Saghaleyni
Rasool Saghaleyni

πŸ€”
Sarah Cherkaoui
Sarah Cherkaoui

πŸ› πŸ–‹ πŸ’»
Simonas MarciΕ‘auskas
Simonas MarciΕ‘auskas

πŸ’¬
TunahanCakir
TunahanCakir

πŸ›
Xuhang Li
Xuhang Li

πŸ›
feiranl
feiranl

πŸ› πŸ’» πŸ”£ πŸ“† πŸ”¬
johan-gson
johan-gson

πŸ› πŸ–‹
smoretti
smoretti

πŸ›
stairs
stairs

πŸ›
From 2539b2e94deda551352cc14ef2ab45dc432ef61e Mon Sep 17 00:00:00 2001 From: Hao Wang Date: Mon, 20 Feb 2023 09:17:16 +0100 Subject: [PATCH 6/6] update .all-contributorsrc [skip ci] --- .all-contributorsrc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.all-contributorsrc b/.all-contributorsrc index 71e53c55..062d463f 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -254,6 +254,28 @@ "contributions": [ "ideas" ] + }, + { + "login": "stairs", + "name": "stairs", + "avatar_url": "https://avatars.githubusercontent.com/u/6586371?v=4", + "profile": "https://github.com/stairs", + "contributions": [ + "bug" + ] + }, + { + "login": "feiranl", + "name": "feiranl", + "avatar_url": "https://avatars.githubusercontent.com/u/32157802?v=4", + "profile": "https://github.com/feiranl", + "contributions": [ + "bug", + "code", + "data", + "projectManagement", + "research" + ] } ], "repoType": "github",