Skip to content
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
6 changes: 4 additions & 2 deletions src/get_enzyme_data/getECstring.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
% EC_set : char
% existing EC string to which the EC numbers are appended.
% ecNumbers : char
% space-separated EC numbers associated to the protein.
% EC numbers associated to the protein, separated by white space and/or
% semicolons.
%
% Returns
% -------
Expand All @@ -25,7 +26,8 @@
% --------
% findECInDB
%In case of several ec numbers for the same protein
new_EC_set = replace(strsplit(ecNumbers,' '),';','');
new_EC_set = regexp(strtrim(ecNumbers),'[;\s]+','split');
new_EC_set = new_EC_set(~cellfun(@isempty,new_EC_set));
for l = 1:length(new_EC_set)
EC_set = [EC_set 'EC' new_EC_set{l}];
if l<length(new_EC_set)
Expand Down
4 changes: 2 additions & 2 deletions test/VerificationMatrix.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ gather_kcats/reviewKcatAssignment.m Has only been tested by running it manually,
gather_kcats/ecStatsFromBrenda.m Not verified against real BRENDA data in this environment -- see its own TODO comment
gather_kcats/mergeKcats.m tc0240
get_enzyme_data/calculateMW.m Not explicitly tested - The code has existed for a long time
get_enzyme_data/findECInDB.m Called from getECfromDatabase - tested when that function is tested; also tc0242, tc0243, tc0244, tc0245
get_enzyme_data/findECInDB.m Called from getECfromDatabase - tested when that function is tested; also tc0242, tc0243, tc0244, tc0245, tc0246
get_enzyme_data/getECfromDatabase.m tc0007 - does not test download of the databases - this is tested in the manual workflows for Yeast-GEM and Human-GEM
get_enzyme_data/getECfromGEM.m tc0006
get_enzyme_data/getECstring.m Called from findECInDB - tested when that function is tested.
get_enzyme_data/getECstring.m Called from findECInDB - tested when that function is tested; also tc0246
download_databases/loadBRENDAdata.m Called from fuzzyKcatMatching - tested when that function is tested; also tc0105, tc0220, tc0221, tc0222
download_databases/fetchBrendaAsset.m tc0085
download_databases/loadDatabases.m Called from getECfromDatabase - tested when that function is tested.
Expand Down
13 changes: 13 additions & 0 deletions test/unit_tests/parityDecisionTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,19 @@ function testFindECInDBGeneWithoutECIsLeftOut_tc0245(testCase)
verifyEqual(testCase, EC, '1.1.1.4')
end

function testFindECInDBSplitsCodesOnSemicolons_tc0246(testCase)
% A database cell joins codes with white space, with '; ' or with ';' alone;
% each is read as separate codes.
DBMW = 10000;
geneHashMap = containers.Map({'G1'}, {1});
geneIndex = {1};
cells = {'1.1.1.1 2.2.2.2', '1.1.1.1; 2.2.2.2;', '1.1.1.1;2.2.2.2', ' 1.1.1.1;;2.2.2.2 '};
for i = 1:numel(cells)
EC = findECInDB({'G1'}, cells(i), DBMW, geneIndex, geneHashMap);
verifyEqual(testCase, EC, '1.1.1.1;2.2.2.2')
end
end

function [fuzzy, dlkcat] = originFiveLists()
fuzzy.rxns = {'R1'};
fuzzy.kcats = 5;
Expand Down
Loading