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
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ mafft binary
.gitattributes export-ignore
.gitignore export-ignore
.github export-ignore
*.mat filter=lfs diff=lfs merge=lfs -text
598 changes: 332 additions & 266 deletions doc/external/kegg/getGenesFromKEGG.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion doc/external/kegg/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h2>Matlab files in this directory:</h2>

<h2>Other Matlab-specific files in this directory:</h2>
<ul style="list-style-image:url(../../matlabicon.gif)">
<li>keggGenes.mat</li><li>keggMets.mat</li><li>keggPhylDist.mat</li><li>keggRxns.mat</li></ul>
<li>keggMets.mat</li><li>keggPhylDist.mat</li><li>keggRxns.mat</li></ul>


<hr><address>Generated by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
Expand Down
66 changes: 66 additions & 0 deletions external/kegg/getGenesFromKEGG.m
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@

ravenPath=findRAVENroot();
genesFile=fullfile(ravenPath,'external','kegg','keggGenes.mat');
if ~exist(genesFile, 'file')
try
downloadKEGGgenes();
catch
%Download failed; fall through to local regeneration below
end
end
if exist(genesFile, 'file')
fprintf(['Importing KEGG genes from ' strrep(genesFile,'\','/') '... ']);
load(genesFile);
Expand Down Expand Up @@ -338,3 +345,62 @@
end
allKOs=unique(allKOs);
end

function downloadKEGGgenes()
% downloadKEGGgenes
% Downloads keggGenes.mat from the RAVEN GitHub release into
% external/kegg/. This file is distributed as a release asset rather
% than shipped in the repository because it exceeds GitHub's 100 MB
% file-size limit.
%
% The following asset is expected on the release tag defined below:
% keggGenes.zip containing keggGenes.mat
%
% To force a refresh (for example, after a new KEGG snapshot has been
% published with a new RAVEN release), delete
% external/kegg/keggGenes.mat and call getGenesFromKEGG again.
%
% Usage: downloadKEGGgenes()

% Release tag that hosts the data archive. Bump this for any RAVEN
% release that ships an updated keggGenes.mat.
releaseTag = 'v2.11.1';

archiveName = 'keggGenes.zip';
targetDir = fullfile(findRAVENroot(),'external','kegg');
targetFile = fullfile(targetDir,'keggGenes.mat');
url = ['https://github.com/SysBioChalmers/RAVEN/releases/download/',...
releaseTag,'/',archiveName];
zipPath = fullfile(targetDir,archiveName);

fprintf(['Downloading ' archiveName ' from RAVEN ' releaseTag ' release... ']);
try
websave(zipPath,url);
catch ME
if strcmp(ME.identifier,'MATLAB:webservices:HTTP404StatusCodeError')
error(['Failed to download ' archiveName ': the server returned ' ...
'a 404 error. If this persists, please report it at ' ...
'https://github.com/SysBioChalmers/RAVEN/issues']);
else
rethrow(ME);
end
end
fprintf('COMPLETE\n');

fprintf(['Extracting ' archiveName ' to ' strrep(targetDir,'\','/') '... ']);
try
unzip(zipPath,targetDir);
catch ME
if isfile(zipPath); delete(zipPath); end
error(['Failed to extract ' archiveName '. The downloaded archive ' ...
'may be corrupted.\nOriginal error: %s'],ME.message);
end
fprintf('COMPLETE\n');

if isfile(zipPath); delete(zipPath); end

if ~isfile(targetFile)
error(['keggGenes.mat was not found in ' archiveName ...
'. Please verify the release asset contents.']);
end
end
3 changes: 0 additions & 3 deletions external/kegg/keggGenes.mat

This file was deleted.

Binary file modified external/kegg/keggMets.mat
Binary file not shown.
Binary file modified external/kegg/keggPhylDist.mat
Binary file not shown.
Binary file modified external/kegg/keggRxns.mat
Binary file not shown.
Binary file modified external/metacyc/metaCycEnzymes.mat
Binary file not shown.
Binary file modified external/metacyc/metaCycMets.mat
Binary file not shown.
Binary file modified external/metacyc/metaCycRxns.mat
Binary file not shown.
Binary file modified software/m2html/private/m2htmltoolbarimages.mat
Binary file not shown.
Binary file modified testing/unit_tests/test_data/ecoli_textbook.mat
Binary file not shown.
Binary file modified testing/unit_tests/test_data/expBlastResults.mat
Binary file not shown.
Binary file modified testing/unit_tests/test_data/expCdhitMafftOutput.mat
Binary file not shown.
Binary file modified testing/unit_tests/test_data/expDiamondResults.mat
Binary file not shown.
Binary file modified testing/unit_tests/test_data/importExportResults.mat
Binary file not shown.
Binary file modified testing/unit_tests/test_data/miriamTestOutput.mat
Binary file not shown.
Binary file modified testing/unit_tests/test_data/solverTestOutput.mat
Binary file not shown.
Binary file modified tutorial/empty.mat
Binary file not shown.
Binary file modified tutorial/iMK1208+suppInfo.mat
Binary file not shown.
Binary file modified tutorial/pathway.mat
Binary file not shown.
Binary file modified tutorial/pcPathway.mat
Binary file not shown.
Loading