Skip to content

Commit

Permalink
Merge branch 'develop' into pr/662
Browse files Browse the repository at this point in the history
  • Loading branch information
feiranl committed Jun 26, 2023
2 parents 24ef6e6 + 97ba938 commit d562f56
Show file tree
Hide file tree
Showing 7 changed files with 179 additions and 831 deletions.
8 changes: 5 additions & 3 deletions code/GPRs/simplifyGrRules.m
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
eqn = str2sym(eqn_str);

% separate equation into terms/pieces ("children")
eqn_pieces = arrayfun(@char,children(eqn),'UniformOutput',false);
eqn_pieces = cellfun(@char,children(eqn),'UniformOutput',false);

% find pieces that are further separable, and recursively separate until
% all pieces are single genes
Expand All @@ -202,12 +202,14 @@
%% Functions to test whether an equation is a collection of ORs or ANDs
function res = is_or(eqn)
% check if outermost operations contain ORs
res = length(regexp(char(eqn),'\|')) > length(regexp(char(children(eqn)),'\|'));
res = length(regexp(char(eqn),'\|')) > ...
sum(cell2mat(cellfun(@(x) length(regexp(char(x), '\|')), children(eqn), 'UniformOutput', false)));
end

function res = is_and(eqn)
% check if outermost operations contain ANDs
res = length(regexp(char(eqn),'&')) > length(regexp(char(children(eqn)),'&'));
res = length(regexp(char(eqn),'&')) > ...
sum(cell2mat(cellfun(@(x) length(regexp(char(x), '\&')), children(eqn), 'UniformOutput', false)));
end


Expand Down
2 changes: 1 addition & 1 deletion code/test/sanityCheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def checkUnusedEntities(model, entity_type):

# collect unused entites
unused_entities = find_unused_entities(model, entity_type)
assert len(unused_entities) == 0, f"Found unused {{entity_type}}!"
assert len(unused_entities) == 0, f"Found unused {entity_type}: {unused_entities}"


if __name__ == "__main__":
Expand Down
11 changes: 10 additions & 1 deletion data/deprecatedIdentifiers/deprecatedMetabolites.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -2204,5 +2204,14 @@ mets metsNoComp metBiGGID metKEGGID metHMDBID metChEBIID metPubChemID metLipidMa
"MAM03574m" "MAM03574" "etfrd" "" "" "" "" "" "" "" "etfrd" "MNXM11480" "" "etfrd_m"
"MAM03494c" "MAM03494" "c3dc" "" "" "" "22833583" "" "" "" "c3dc" "" "" "c3dc_c"
"MAM03494e" "MAM03494" "c3dc" "" "" "" "22833583" "" "" "" "c3dc" "" "" "c3dc_s"
"MAM03318e" "MAM03318" "C02528" "C02528" "HMDB0000518" "CHEBI:16755" "10133" "" "" "" "C02528" "MNXM1183" "" "C02528_s"
"MAM03318c" "MAM03318" "C02528" "C02528" "HMDB0000518" "CHEBI:16755" "10133" "" "" "" "C02528" "MNXM1183" "" "C02528_c"
"MAM03318r" "MAM03318" "C02528" "C02528" "HMDB0000518" "CHEBI:16755" "10133" "" "" "" "C02528" "MNXM1183" "" "C02528_r"
"MAM03318m" "MAM03318" "C02528" "C02528" "HMDB0000518" "CHEBI:16755" "10133" "" "" "" "C02528" "MNXM1183" "" "C02528_m"
"MAM03325c" "MAM03325" "C08276" "C08276" "HMDB0001527" "CHEBI:1438" "563" "" "" "" "C08276" "MNXM2782" "" "C08276_c"
"MAM00591c" "MAM00591" "" "C14748" "" "CHEBI:34306" "" "" "" "HC02179" "" "MNXM6760" "m00591c" "m00591c"
"MAM00591e" "MAM00591" "" "C14748" "" "CHEBI:34306" "" "" "" "HC02179" "" "MNXM6760" "m00591s" "m00591s"
"MAM03162c" "MAM03162" "" "C05578" "" "CHEBI:27404" "" "" "" "" "M03162" "MNXM2336" "m03162c" "m03162c"
"MAM03231c" "MAM03231" "" "" "" "CHEBI:57277" "" "" "" "" "3hppa" "" "" "3hppa_c"
"MAM03540c" "MAM03540" "ddeccrn" "" "" "" "168381" "" "" "" "ddeccrn" "" "" "ddeccrn_c"
"MAM03540e" "MAM03540" "ddeccrn" "" "" "" "168381" "" "" "" "ddeccrn" "" "" "ddeccrn_s"
"MAM03540e" "MAM03540" "ddeccrn" "" "" "" "168381" "" "" "" "ddeccrn" "" "" "ddeccrn_s"
34 changes: 33 additions & 1 deletion data/deprecatedIdentifiers/deprecatedReactions.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,26 @@ rxns rxnKEGGID rxnBiGGID rxnEHMNID rxnHepatoNET1ID rxnREACTOMEID rxnRecon3DID rx
"MAR04411" "" "PIt8" "" "" "" "PIt8" "MNXR102875" "HMR_4911" "RCR40976" "" 0 "" "" "PIt8"
"MAR08749" "" "H2CO3D2" "" "" "" "HMR_8749" "MNXR100483" "HMR_8749" "RCR14128" "" 1 "" "" "HMR_8749"
"MAR08750" "" "H2CO3D2m" "" "" "" "HMR_8750" "MNXR100483" "HMR_8750" "RCR14129" "" 1 "" "" "HMR_8750"
"MAR02035" "" "r0310" "" "" "" "r0310" "" "" "" "" 0 "" "" "r0310"
"MAR03211" "R00924" "" "" "r0683" "" "r0683" "MNXR103101" "HMR_3211" "RCR14348" "" 0 "" "" "HMR_3211"
"MAR03751" "R02660" "" "R02660M" "r0560" "" "r0560" "" "HMR_3751" "RCR14421" "" 0 "" "" "HMR_3751"
"MAR03783" "R03172" "" "R03172M" "r0603" "" "r0603" "MNXR108000" "HMR_3783" "RCR14424" "" 0 "" "" "HMR_3783"
"MAR04242" "R02487" "" "R02487M" "r0541" "" "r0541" "MNXR100293" "HMR_4242" "RCR14356" "" 0 "" "RHEA:30847" "HMR_4242"
"MAR03769" "R04095" "" "R04095M" "r0655" "" "r0655" "MNXR95318" "HMR_3769" "RCR14423" "" 0 "" "" "HMR_3769"
"MAR03838" "" "" "" "r1453" "" "" "" "HMR_3838" "RCR14286" "" 0 "" "" "HMR_3838"
"MAR02366" "" "r1446" "" "" "" "r1446" "" "" "" "" 0 "" "" "r1446"
"MAR02367" "" "r1447" "" "" "" "r1447" "" "" "" "" 0 "" "" "r1447"
"MAR02370" "" "r1449" "" "" "" "r1449" "" "" "" "" 0 "" "" "r1449"
"MAR02372" "" "r1450" "" "" "" "r1450" "" "" "" "" 0 "" "" "r1450"
"MAR02373" "" "r1451" "" "" "" "r1451" "" "" "" "" 0 "" "" "r1451"
"MAR00483" "R00849" "" "" "r0205" "" "r0205" "MNXR106713" "HMR_0483" "RCR21050" "" 0 "" "RHEA:18977" "HMR_0483"
"MAR08743" "R00408" "SUCD1m" "" "" "" "SUCD1m" "MNXR99636" "HMR_8743" "RCR11674" "" 0 "" "RHEA:30343" "HMR_8743"
"MAR05294" "R00362" "" "R00362C" "r1109" "" "r1109" "MNXR96731" "HMR_5294" "RCR11670" "" 0 "RHEA:10761" "RHEA:10760" "HMR_5294"
"MAR11421" "" "CITL" "" "" "" "CITL" "MNXR96731" "" "" "" 0 "RHEA:10761" "RHEA:10760" "CITL"
"MAR00562" "" "ETF" "" "" "" "ETF" "MNXR97965" "" "" "" 0 "" "" "ETF"
"MAR00563" "" "ETFQO" "" "" "" "ETFQO" "MNXR97966" "" "" "" 0 "" "" "ETFQO"
"MAR05434" "" "FAOXC3DC" "" "" "" "FAOXC3DC" "" "" "" "" 0 "" "" "FAOXC3DC"
"MAR02369" "" "r1448" "" "" "" "r1448" "" "" "" "" 0 "" "" "r1448"
"MAR02185" "" "" "" "" "" "r0701" "" "" "" "" 0 "" "" "r0701"
"MAR11649" "" "" "" "" "" "PAIL_hs_t1e" "" "" "" "" 0 "" "" "PAIL_hs_t1e"
"MAR11729" "" "" "" "" "" "2HXIC_Lt2e" "" "" "" "" 0 "" "" "2HXIC_Lt2e"
Expand Down Expand Up @@ -142,4 +157,21 @@ rxns rxnKEGGID rxnBiGGID rxnEHMNID rxnHepatoNET1ID rxnREACTOMEID rxnRecon3DID rx
"MAR20015" "R02549" "ABUTD;ABUTDm;R_ABUTD;R_ABUTDm" "" "" "" "" "MNXR95191" "" "" "" 0 "RHEA:19105" "" ""
"MAR20014" "R03283" "R_TMABADH;TMABADH" "" "" "" "" "MNXR104876" "" "" "" 0 "RHEA:17985" "" ""
"MAR20052" "" "ALDD21;RE3076X;R_ALDD21;R_RE3076X" "" "" "" "" "MNXR95747" "" "" "" 0 "RHEA:44016" "" ""
"MAR04506" "" "C120CPT1" "" "" "" "C120CPT1" "" "" "" "" 0 "" "" "C120CPT1"
"MAR02276" "" "r0993" "" "" "" "r0993" "MNXR105414" "" "" "" 0 "" "" "r0993"
"MAR02277" "" "r0994" "" "" "" "r0994" "MNXR105415" "" "" "" 0 "" "" "r0994"
"MAR02384" "" "r1495" "" "" "" "r1495" "MNXR105478" "" "" "" 0 "" "" "r1495"
"MAR02390" "" "r2157" "" "" "" "r2157" "MNXR106054" "" "" "" 0 "" "" "r2157"
"MAR02392" "" "r2158" "" "" "" "r2158" "MNXR106055" "" "" "" 0 "" "" "r2158"
"MAR02394" "" "r2159" "" "" "" "r2159" "MNXR106056" "" "" "" 0 "" "" "r2159"
"MAR04144" "" "EX_C02528_e" "" "" "" "EX_C02528[e]" "MNXR98101" "" "" "" 0 "" "" "EX_C02528[e]"
"MAR10447" "" "HC02220c" "" "" "" "HC02220c" "" "" "" "" 0 "" "" "HC02220c"
"MAR00941" "R07041" "" "R07041C" "" "" "" "MNXR110751" "HMR_0941" "RCR12090" "" 0 "" "" "HMR_0941"
"MAR06142" "" "" "" "r2236" "" "" "MNXR106133" "HMR_6142" "RCR40595" "2.A.60.1.5" 0 "" "" "HMR_6142"
"MAR06143" "" "" "" "r2237" "" "" "MNXR106134" "HMR_6143" "RCR40596" "2.A.60.1.5" 0 "" "" "HMR_6143"
"MAR06144" "" "" "" "r2238" "" "" "MNXR106135" "HMR_6144" "RCR40597" "2.A.60.1.5" 0 "" "" "HMR_6144"
"MAR06220" "" "" "" "r2315" "" "" "MNXR106212" "HMR_6220" "RCR40672" "2.A.60.1.2" 0 "" "" "HMR_6220"
"MAR06252" "" "" "" "r2346" "" "" "MNXR106235" "HMR_6252" "RCR40129" "" 0 "" "" "HMR_6252"
"MAR09733" "R03674" "" "" "" "" "HMR_9733" "MNXR108330" "HMR_9733" "RCR14346" "" 0 "" "" "HMR_9733"
"MAR09734" "R04884" "" "" "" "" "HMR_9734" "MNXR109190" "HMR_9734" "RCR14347" "" 0 "RHEA:33516" "RHEA:33515" "HMR_9734"
"MAR10025" "" "" "" "" "" "" "" "" "" "" 0 "" "" "HMR_10025"
"MAR04506" "" "C120CPT1" "" "" "" "C120CPT1" "" "" "" "" 0 "" "" "C120CPT1"
Loading

0 comments on commit d562f56

Please sign in to comment.