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

feat: add yaml validation #236

Merged
merged 8 commits into from
Apr 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
39 changes: 39 additions & 0 deletions .github/workflows/yaml-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: YAML validation

on:
push:
branches: [ devel ]
pull_request:
branches: [ master, devel ]

jobs:
yaml-validation:
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1

- name: YAML Lint
uses: ibiqlik/[email protected]
with:
## File(s) or Directory, separate by space if multiple files or folder are specified
file_or_dir: ModelFiles/
## Custom configuration (as YAML source)
config_data: "{extends: default, rules: {line-length: disable}}"
## Format for parsing output [parsable,standard,colored,auto]
# format: # optional, default is colored
## Return non-zero exit code on warnings as well as errors
# strict: # optional, default is false

- name: Set up Python 3
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Import with cobrapy
run: |
pip install -r requirements/ci-requirements.txt
python -c "import cobra ; cobra.io.load_yaml_model('ModelFiles/yml/yeastGEM.yml')"
16 changes: 16 additions & 0 deletions ComplementaryScripts/modelCuration/curationsOnV8_4_2.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
%% Curations on version 8.4.2
% This is a list of various smaller curations to be performed on version
% 8.4.2 of yeast-GEM. Indicated is what Issue is solved.

% Load model
cd ..
model = loadYeastModel;

% Solves #252
model = changeGeneAssociation(model,'r_4590','YOL130W');

% Solves #254
model.metNames = regexprep(model.metNames,'^nicotinamide ribose','nicotinamide riboside');
% All annotations, formula and charge were correct.

saveYeastModel(model);
3 changes: 2 additions & 1 deletion ComplementaryScripts/saveYeastModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ function saveYeastModel(model,upDATE,allowNoGrowth)
num2str(length(model.mets)) '|' ...
num2str(length(model.genes)) '|' newline];
end
fwrite(fout,inline);
inline=unicode2native(inline,'UTF-8');
fwrite(fout,inline,'uint8');
end
end
fclose('all');
Expand Down
6 changes: 3 additions & 3 deletions ModelFiles/dependencies.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MATLAB 9.7.0.1190202 (R2019b)
MATLAB 9.9.0.1524771 (R2020b) Update 2
libSBML 5.17.0
RAVEN_toolbox 2.4.1
COBRA_toolbox commit 6c49aaf
RAVEN_toolbox commit 5061381
COBRA_toolbox commit 800dcfe
SBML_level 3
SBML_version 1
fbc_version 2
2 changes: 1 addition & 1 deletion ModelFiles/txt/yeastGEM.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3948,7 +3948,7 @@ r_4586 s_3998[c] + s_4192[c] -> 2 s_4193[c] 0.00 1000.00 0.00
r_4587 s_0796[e] + s_4199[e] <=> s_0794[c] + s_3880[c] YOL122C -1000.00 1000.00 0.00
r_4588 s_4200[e] <=> s_3778[c] YNL275W -1000.00 1000.00 0.00
r_4589 s_0796[e] + s_4201[e] <=> s_0794[c] + s_4019[c] YOL122C -1000.00 1000.00 0.00
r_4590 s_0796[e] + s_4202[e] <=> s_0794[c] + s_3801[c] YGR191W -1000.00 1000.00 0.00
r_4590 s_0796[e] + s_4202[e] <=> s_0794[c] + s_3801[c] YOL130W -1000.00 1000.00 0.00
r_4591 s_0796[e] + s_4203[e] <=> s_0794[c] + s_3822[c] ( YGL255W or YLR130C ) -1000.00 1000.00 0.00
r_4592 s_0796[e] + s_4204[e] <=> s_0794[c] + s_4013[c] ( YGR191W or YOL130W ) -1000.00 1000.00 0.00
r_4593 s_4200[e] <=> -1000.00 1000.00 0.00
Expand Down
4 changes: 2 additions & 2 deletions ModelFiles/xml/yeastGEM.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20570,7 +20570,7 @@
</rdf:RDF>
</annotation>
</species>
<species metaid="s_1218__91__c__93__" sboTerm="SBO:0000247" id="s_1218__91__c__93__" name="nicotinamide ribose [cytoplasm]" compartment="c" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false" fbc:charge="1" fbc:chemicalFormula="C11H15N2O5">
<species metaid="s_1218__91__c__93__" sboTerm="SBO:0000247" id="s_1218__91__c__93__" name="nicotinamide riboside [cytoplasm]" compartment="c" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false" fbc:charge="1" fbc:chemicalFormula="C11H15N2O5">
<annotation xmlns:sbml="http://www.sbml.org/sbml/level3/version1/core">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#" xmlns:vCard4="http://www.w3.org/2006/vcard/ns#" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/" xmlns:bqmodel="http://biomodels.net/model-qualifiers/">
<rdf:Description rdf:about="#s_1218__91__c__93__">
Expand Down Expand Up @@ -214436,7 +214436,7 @@
<speciesReference species="s_3801__91__c__93__" stoichiometry="1" constant="true"/>
</listOfProducts>
<fbc:geneProductAssociation>
<fbc:geneProductRef fbc:geneProduct="G_YGR191W"/>
<fbc:geneProductRef fbc:geneProduct="G_YOL130W"/>
</fbc:geneProductAssociation>
</reaction>
<reaction metaid="r_4591" sboTerm="SBO:0000655" id="r_4591" name="Zn(2+) transport" reversible="true" fast="false" fbc:lowerFluxBound="FB1N1000" fbc:upperFluxBound="FB5N1000">
Expand Down
Loading