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

yeast 8.1.2 #128

Merged
merged 22 commits into from
Jun 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
019bdf9
fix: readme
BenjaSanchez Jun 10, 2018
ab3a9ce
feat: automatic update of README
BenjaSanchez Jun 10, 2018
b1a0b37
fix: skip date update when releasing
BenjaSanchez Jun 10, 2018
44ebb2f
fix: update libSBML in readme
BenjaSanchez Jun 11, 2018
8bf683c
Merge pull request #123 from SysBioChalmers/feat/improvedReadme
BenjaSanchez Jun 18, 2018
4a83f40
feat-data:geneRules
feiranl Jun 20, 2018
37f16c9
fix-rxn-prop:addNewGPRrelations
feiranl Jun 20, 2018
5eef1a7
fix-data: non-compliant rule
BenjaSanchez Jun 20, 2018
e09acdf
style: addDBNewGeneAnnotation
BenjaSanchez Jun 20, 2018
6b654a8
fix-gene.annot: comply with standards
BenjaSanchez Jun 20, 2018
6c2fc7b
style:DBNewGeneAnnotation
feiranl Jun 21, 2018
65b6cd4
fix-data: change one column name
hongzhonglu Jun 21, 2018
715a373
feat: check SBML validity
BenjaSanchez Jun 24, 2018
ee8563c
fix-data: delete not functional genes
feiranl Jun 25, 2018
c56593d
fix-rxn-prop:deleteNonFunctionalGenes
feiranl Jun 25, 2018
efbeff8
fix-rxn-prop:deleteUnusedGenes
feiranl Jun 25, 2018
79efde7
Merge pull request #126 from SysBioChalmers/feat/SBMLvalidityCheck
BenjaSanchez Jun 26, 2018
40f4062
fix-gene.annot: update protein index
BenjaSanchez Jun 26, 2018
0a013e3
feat: model parameters
BenjaSanchez Jun 26, 2018
2828ecd
fix: increaseVersion
BenjaSanchez Jun 26, 2018
cf2da24
Merge pull request #124 from SysBioChalmers/fix/DBnewAnnotation
BenjaSanchez Jun 26, 2018
736ea61
Merge pull request #127 from SysBioChalmers/feat/modelParams
BenjaSanchez Jun 27, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
306 changes: 306 additions & 0 deletions ComplementaryData/databases/DBnewGeneAnnotation.tsv

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions ComplementaryData/modelCuration/databasenewGPR.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
rxnID_yeast_model genes_yeast_model final_GPR
r_0308 YGL184C ( YFR055W or YGL184C )
r_0148 YDR226W ( YDL166C or YDR226W )
r_1729 NAN YDL166C
r_1077 YNR012W ( YDR020C or YNR012W )
r_1078 YNR012W ( YDR020C or YNR012W )
r_0226 (( Q0080 and Q0085 and Q0130 and YBL099W and YBR039W and YDL004W and YDR298C and YDR322C-A and YDR377W and YJR121W and YKL016C and YLR295C and YML081C-A and YPL078C and YPL271W ) or ( Q0080 and Q0085 and Q0130 and YBL099W and YBR039W and YDL004W and YDR298C and YDR377W and YJR121W and YKL016C and YLR295C and YML081C-A and YPL078C and YPL271W and YPR020W )) (( Q0080 and Q0085 and Q0130 and YBL099W and YBR039W and YDL004W and YDR298C and YDR322C-A and YDR377W and YJR121W and YKL016C and YLR295C and YML081C-A and YPL078C and YPL271W ) or ( Q0080 and Q0085 and Q0130 and YBL099W and YBR039W and YDL004W and YDR298C and YDR377W and YJR121W and YKL016C and YLR295C and YML081C-A and YPL078C and YPL271W and YPR020W ) or ( Q0080 and Q0085 and Q0130 and YBL099W and YBR039W and YDL004W and YDR298C and YDR322C-A and YDR377W and YJR121W and YKL016C and YLR295C and YML081C-A and YPL078C and YPL271W and YJL180C and YLR393W and YNL315C and YOL077W-A and YCL005W-A))
r_0364 YBR252W ( YJR069C or YBR252W )
r_0815 YAL012W ( YLL058W or YML082W or YAL012W )
r_0448 YJL155C ( YLR345W or YJL155C )
r_0534 ( YCL040W or YFR053C or YGL253W ) ( YLR446W or YCL040W or YFR053C or YGL253W )
r_0533 ( YFR053C or YGL253W ) ( YLR446W or YFR053C or YGL253W )
r_0535 ( YFR053C or YGL253W ) ( YLR446W or YFR053C or YGL253W )
r_0477 YKL104C ( YMR084W or YKL104C )
r_2116 ( YMR170C or YER073W or YOR374W ) ( YMR110C or YMR170C or YER073W or YOR374W )
r_0172 ( YMR169C or YMR170C ) ( YMR110C or YMR169C or YMR170C )
r_0483 ( YBR244W or YCL035C or YDR513W or YIR037W or YKL026C ) ( YNL229C or YBR244W or YCL035C or YDR513W or YIR037W or YKL026C )
r_2025 NAN YNR027W
r_1185 YBR293W ( YOL092W or YBR293W )
r_1200 ( YBR293W or YCL069W or YMR088C ) ( YOL092W or YBR293W or YCL069W or YMR088C )
r_1212 ( YBR293W or YCL069W or YMR088C ) ( YOL092W or YBR293W or YCL069W or YMR088C )
r_0366 ( YGR254W or YHR174W ) ( YPL281C or YGR254W or YHR174W or YMR323W or YOR393W)
r_1805 NAN ( YBR241C or YGL104C )
r_0783 YLR328W ( YCL047C or YLR328W )
r_0530 ( YDR376W and YPL252C ) ( YER141W or (YDR376W and YPL252C) )
r_1084 YKL035W ( YHL012W or YKL035W )
r_0475 NAN YFL060C
r_4049 NAN ( YBL035C or YBR278W or YCR014C or YIR008C or YKL045W or YDL102W or YDL164C or YDR121W or YDR419W or YJR006W or YJR043C or YNL102W or YNL262W or YOR330C or YPL167C or YPR175W or YKR002W )
r_4050 NAN ( YBR154C or YHR143W-A or YIL021W or YKL144C or YKR025W or YFL036W or YDL140C or YDL150W or YDR045C or YDR156W or YDR404C or YGL070C or YJL011C or YJL140W or YJL148W or YJR063W or YNL113W or YNL151C or YNL248C or YNR003C or YOL005C or YOR116C or YOR151C or YOR207C or YOR210W or YOR224C or YOR340C or YOR341W or YPR010C or YPR110C or YPR187W or YPR190C )
r_0438 (( Q0045 and Q0250 and Q0275 and YDL067C and YEL039C and YGL187C and YGL191W and YHR051W and YIL111W and YLR038C and YLR395C and YMR256C ) or ( Q0045 and Q0250 and Q0275 and YDL067C and YEL039C and YGL187C and YGL191W and YHR051W and YLR038C and YLR395C and YMR256C and YNL052W ) or ( Q0045 and Q0250 and Q0275 and YDL067C and YGL187C and YGL191W and YHR051W and YIL111W and YJR048W and YLR038C and YLR395C and YMR256C ) or ( Q0045 and Q0250 and Q0275 and YDL067C and YGL187C and YGL191W and YHR051W and YJR048W and YLR038C and YLR395C and YMR256C and YNL052W )) (( Q0045 and Q0250 and Q0275 and YDL067C and YEL039C and YGL187C and YGL191W and YHR051W and YIL111W and YLR038C and YLR395C and YMR256C ) or ( Q0045 and Q0250 and Q0275 and YDL067C and YEL039C and YGL187C and YGL191W and YHR051W and YLR038C and YLR395C and YMR256C and YNL052W ) or ( Q0045 and Q0250 and Q0275 and YDL067C and YGL187C and YGL191W and YHR051W and YIL111W and YJR048W and YLR038C and YLR395C and YMR256C ) or ( Q0045 and Q0250 and Q0275 and YDL067C and YGL187C and YGL191W and YHR051W and YJR048W and YLR038C and YLR395C and YMR256C and YNL052W ) or (Q0045 and Q0250 and Q0275 and YDL067C and YHR116W and YDR231C and YGR062C and YJL003W and YPL132W and YLL018C-A))
r_1166 ( YDL245C or YDL247W or YDR342C or YDR343C or YDR345C or YDR536W or YEL069C or YFL011W or YHR092C or YHR094C or YHR096C or YJL214W or YJL219W or YJR158W or YJR160C or YLR081W or YMR011W or YNR072W or YOL156W ) ( YDL245C or YDL247W or YDR342C or YDR343C or YDR345C or YDR536W or YEL069C or YFL011W or YHR092C or YHR094C or YHR096C or YJL214W or YJL219W or YJR158W or YJR160C or YLR081W or YMR011W or YNR072W or YOL156W or YDR387C )
r_3264 ( YBR204C or YKR089C or YMR313C or YOR081C ) ( YBR204C or YKR089C or YMR313C or YOR081C or YCR068W )
r_3297 YMR313C ( YCR068W or YMR313C )
r_0804 YER005W ( YAL035W or YLL001W or YER005W )
r_1667 NAN YNL036W
r_0005 ( YGR032W or ( YLR342W and YCR034W )) ( YGR032W or YMR306W or ( YLR342W and YCR034W ))
r_1172 YLL043W ( YFL054C or YLL043W )
r_1217 YDR105C ( YCL025C or YDR508C or YFL055W or YKR039W or YPL265W or YDR105C )
r_1258 YLR138W ( YDR456W or YLR138W)
r_1249 YJL129C ( YDR456W or YJL129C )
r_0193 YPR026W ( YPR026W or YBR001C )
r_2064 NAN YDL024C
r_0323 YJR159W ( YDL246C or YJR159W )
r_0199 YMR293C ( YDR242W or YMR293C )
r_0139 YML022W ( YDR441C or YML022W)
r_0542 YDR234W ( YJL200C or YDR234W )
4 changes: 2 additions & 2 deletions ComplementaryScripts/increaseVersion.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ function increaseVersion(bumpType)
model = readCbModel('../ModelFiles/xml/yeastGEM.xml');

%Include tag and save model:
model.description = ['yeastGEM_v' newVersion];
saveYeastModel(model)
model.modelID = ['yeastGEM_v' newVersion];
saveYeastModel(model,false)

%Allow .mat & .xls storage:
copyfile('../.gitignore','backup')
Expand Down
52 changes: 52 additions & 0 deletions ComplementaryScripts/modelCuration/addDBNewGeneAnnotation.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% addDBNewGeneAnnotation
% Add changes from the database new anootation for new genes + manual curation on those changes
% Input: model, databasenewGPR.tsv,SGDgeneNames.tsv.
% As for the reference of new GPR, please find detailed information in:
% ComplementaryData/databases/DBnewGeneAnnotation.tsv
% NOTE: changeGeneAssociation.m is a function from cobra
%
% Feiran Li & Hongzhong Lu
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Load model
cd ..
model = loadYeastModel;

% Change GPR relations
fid = fopen('../ComplementaryData/modelCuration/databasenewGPR.tsv');
changegpr = textscan(fid,'%s %s %s','Delimiter','\t','HeaderLines',1);
newGPR.ID = changegpr{1};
newGPR.oldGPR = changegpr{2};
newGPR.GPR = changegpr{3};
fclose(fid);
for i = 1:length(newGPR.ID)
rxnIndex = find(strcmp(model.rxns, newGPR.ID(i)));
model = changeGeneAssociation(model, model.rxns{rxnIndex}, newGPR.GPR{i});
end

% Delete unused genes (if any)
model = removeUnusedGenes(model);

% Add gene standard name for new genes
fid = fopen('../ComplementaryData/databases/SGDgeneNames.tsv');
yeast_gene_annotation = textscan(fid,'%s %s','Delimiter','\t','HeaderLines',1);
fclose(fid);
for i = 1: length(model.genes)
geneIndex = strcmp(yeast_gene_annotation{1}, model.genes{i});
if sum(geneIndex) == 1 && ~isempty(yeast_gene_annotation{2}{geneIndex})
model.geneNames{i} = yeast_gene_annotation{2}{geneIndex};
else
model.geneNames{i} = model.genes{i};
end
end

% Add protein name for genes
for i = 1:length(model.genes)
model.proteins{i} = strcat('COBRAProtein',num2str(i));
end

% Save model:
model = rmfield(model,'grRules');
saveYeastModel(model)
cd modelCuration
48 changes: 43 additions & 5 deletions ComplementaryScripts/saveYeastModel.m
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% saveYeastModel(model)
% saveYeastModel(model,upDATE)
% Saves model as a .xml, .txt and .yml file. Also updates complementary
% files (boundaryMets.txt and dependencies.txt).
% files (boundaryMets.txt, README.md and dependencies.txt).
%
% Benjamín J. Sánchez
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function saveYeastModel(model)
function saveYeastModel(model,upDATE)

if nargin < 2
upDATE = true;
end

%Remove any space in rxnECNumbers:
model.rxnECNumbers = strrep(model.rxnECNumbers,' ','');
Expand All @@ -16,8 +20,17 @@ function saveYeastModel(model)
scriptFolder = fileparts(which(mfilename));
currentDir = cd(scriptFolder);

%Save changes to current model:
writeCbModel(model,'sbml','../ModelFiles/xml/yeastGEM.xml');
%Check if model is a valid SBML structure:
writeCbModel(model,'sbml','tempModel.xml');
[~,errors] = TranslateSBML('tempModel.xml');
if ~isempty(errors)
delete('tempModel.xml');
error('Model should be a valid SBML structure. Please fix all errors before saving.')
end

%Update .xml, .txt and .yml models:
copyfile('tempModel.xml','../ModelFiles/xml/yeastGEM.xml')
delete('tempModel.xml');
writeCbModel(model,'text','../ModelFiles/txt/yeastGEM.txt');
exportForGit(model,'yeastGEM','..',{'yml'});

Expand All @@ -31,6 +44,31 @@ function saveYeastModel(model)
end
fclose(fid);

%Update README file: date + size of model
copyfile('../README.md','backup.md')
fin = fopen('backup.md','r');
fout = fopen('../README.md','w');
still_reading = true;
while still_reading
inline = fgets(fin);
if ~ischar(inline)
still_reading = false;
else
if startsWith(inline,'* Last update: ') && upDATE
inline = ['* Last update: ' datestr(datetime,'yyyy-mm-dd') newline];
elseif startsWith(inline,'|_Saccharomyces cerevisiae_|')
inline = ['|_Saccharomyces cerevisiae_|[Yeast 7.6]' ...
'(https://sourceforge.net/projects/yeast/)|' ...
num2str(length(model.rxns)) '|' ...
num2str(length(model.mets)) '|' ...
num2str(length(model.genes)) '|' newline];
end
fwrite(fout,inline);
end
end
fclose('all');
delete('backup.md');

%Convert notation "e-005" to "e-05 " in stoich. coeffs. to avoid
%inconsistencies between Windows and MAC:
copyfile('../ModelFiles/xml/yeastGEM.xml','backup.xml')
Expand Down
2 changes: 1 addition & 1 deletion ModelFiles/dependencies.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MATLAB 9.4.0.813654 (R2018a)
libSBML 5.17.0
RAVEN_toolbox 2.0.0
COBRA_toolbox commit 4bfe8b3
COBRA_toolbox commit c72a7bd
SBML_level 3
SBML_version 1
fbc_version 2
Loading