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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
ravenPath=findRAVENroot();

% Load COBRA field information
fid = fopen(fullfile(ravenPath,'struct_conversion','COBRA_structure_fields.csv')); % Taken from https://github.com/opencobra/cobratoolbox/blob/develop/src/base/io/definitions/COBRA_structure_fields.csv
fid = fopen(fullfile(ravenPath,'conversion','COBRA_structure_fields.csv')); % Taken from https://github.com/opencobra/cobratoolbox/blob/develop/src/base/io/definitions/COBRA_structure_fields.csv
fieldFile = textscan(fid,repmat('%s',1,15),'Delimiter','\t','HeaderLines',1);
dbFields = ~cellfun(@isempty,fieldFile{5}); % Only keep fields with database annotations that should be translated to xxxMiriams
dbFields = dbFields & ~contains(fieldFile{1},{'metInChIString','metKEGGID','metPubChemID','rxnECNumbers'});
Expand All @@ -48,7 +48,7 @@
fclose(fid);

% Load conversion between additional COBRA fields and namespaces:
fid = fopen(fullfile(ravenPath,'struct_conversion','cobraNamespaces.csv'));
fid = fopen(fullfile(ravenPath,'conversion','cobraNamespaces.csv'));
fieldFile = textscan(fid,'%s %s','Delimiter',',','HeaderLines',0);
COBRAfields = [COBRAfields; fieldFile{1}];
COBRAnamespace = [COBRAnamespace; fieldFile{2}];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
ravenPath=findRAVENroot();

if ~isfield(model,'rules') % Check if model is RAVEN
fid = fopen(fullfile(ravenPath,'struct_conversion','orderRavenFields.csv'));
fid = fopen(fullfile(ravenPath,'conversion','orderRavenFields.csv'));
fields = textscan(fid,'%s','Delimiter',',','HeaderLines',0);
fields = fields{1};
fclose(fid);
else % If model is COBRA
fid = fopen(fullfile(ravenPath,'struct_conversion','COBRA_structure_fields.csv')); % Taken from https://github.com/opencobra/cobratoolbox/blob/develop/src/base/io/definitions/COBRA_structure_fields.csv
fid = fopen(fullfile(ravenPath,'conversion','COBRA_structure_fields.csv')); % Taken from https://github.com/opencobra/cobratoolbox/blob/develop/src/base/io/definitions/COBRA_structure_fields.csv
fields = textscan(fid,repmat('%s',1,15),'Delimiter','\t','HeaderLines',1);
fields = fields{1};
fclose(fid);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion installation/removeRavenFromPath.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function removeRavenFromPath()
end
end

ravenPath = unique(regexprep(currPath(ravenPath),'(\\|\/)((external)|(struct_conversion)|(solver))',''));
ravenPath = unique(regexprep(currPath(ravenPath),'(\\|\/)((reconstruction)|(conversion)|(solver))',''));
addOnDir = contains(ravenPath,'MATLAB Add-Ons');
if any(addOnDir)
warning(['RAVEN is installed as MATLAB Add-On at the following directory, but MATLAB '...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ function updateDocumentation()
ravenDirs(startsWith(ravenDirs,strcat(ravenDir,filesep,'legacy',filesep,'software')))=[];

%Remove keggModel.mat if it exists
if exist(fullfile(ravenDir,'external','kegg','keggModel.mat'), 'file') == 2
delete(fullfile(ravenDir,'external','kegg','keggModel.mat'));
if exist(fullfile(ravenDir,'reconstruction','kegg','keggModel.mat'), 'file') == 2
delete(fullfile(ravenDir,'reconstruction','kegg','keggModel.mat'));
end

%Remove existing "doc" directory from RAVEN
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
end

ravenPath=findRAVENroot();
genesFile=fullfile(ravenPath,'external','kegg','keggGenes.mat');
genesFile=fullfile(ravenPath,'reconstruction','kegg','keggGenes.mat');
if ~exist(genesFile, 'file')
try
downloadKEGGgenes();
Expand Down Expand Up @@ -284,7 +284,7 @@

%First check if the reactions have already been parsed
ravenPath=findRAVENroot;
rxnsFile=fullfile(ravenPath,'external','kegg','keggRxns.mat');
rxnsFile=fullfile(ravenPath,'reconstruction','kegg','keggRxns.mat');
if exist(rxnsFile, 'file')
fprintf(['NOTE: Importing KEGG ORTHOLOGY list from ' strrep(rxnsFile,'\','/') '.\n']);
load(rxnsFile,'model');
Expand Down Expand Up @@ -367,7 +367,7 @@ function downloadKEGGgenes()
releaseTag = 'v2.11.1';

archiveName = 'keggGenes.zip';
targetDir = fullfile(findRAVENroot(),'external','kegg');
targetDir = fullfile(findRAVENroot(),'reconstruction','kegg');
targetFile = fullfile(targetDir,'keggGenes.mat');
url = ['https://github.com/SysBioChalmers/RAVEN/releases/download/',...
releaseTag,'/',archiveName];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@
%First remove all reactions without genes
if keepSpontaneous==true
fprintf('Removing non-spontaneous reactions without GPR rules... ');
load(fullfile(ravenPath,'external','kegg','keggRxns.mat'),'isSpontaneous');
load(fullfile(ravenPath,'reconstruction','kegg','keggRxns.mat'),'isSpontaneous');
I=~any(model.rxnGeneMat,2)&~ismember(model.rxns,isSpontaneous);
spontRxnsWithGenes=model.rxns(any(model.rxnGeneMat,2)&~ismember(model.rxns,isSpontaneous));
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
end

ravenPath=findRAVENroot();
metsFile=fullfile(ravenPath,'external','kegg','keggMets.mat');
metsFile=fullfile(ravenPath,'reconstruction','kegg','keggMets.mat');
if exist(metsFile, 'file')
fprintf(['Importing KEGG metabolites from ' strrep(metsFile,'\','/') '... ']);
load(metsFile);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
ravenPath=findRAVENroot();

if nargin<1
keggPath=fullfile(ravenPath,'external','kegg');
keggPath=fullfile(ravenPath,'reconstruction','kegg');
else
keggPath=char(keggPath);
end
Expand All @@ -64,7 +64,7 @@
keepGeneral=false;
end

modelFile=fullfile(ravenPath,'external','kegg','keggModel.mat');
modelFile=fullfile(ravenPath,'reconstruction','kegg','keggModel.mat');
if exist(modelFile, 'file') && isNewestFile(ravenPath)
fprintf(['Importing the global KEGG model from ' strrep(modelFile,'\','/') '... ']);
load(modelFile);
Expand Down Expand Up @@ -267,10 +267,10 @@
function output = isNewestFile(ravenPath)
%The ad hoc function, which checks whether keggModel.mat is the more
%recently modified than keggRxns.mat, keggGenes.mat and keggRxns.mat
modelFile=fullfile(ravenPath,'external','kegg','keggModel.mat');
rxnsFile=fullfile(ravenPath,'external','kegg','keggRxns.mat');
genesFile=fullfile(ravenPath,'external','kegg','keggGenes.mat');
metsFile=fullfile(ravenPath,'external','kegg','keggMets.mat');
modelFile=fullfile(ravenPath,'reconstruction','kegg','keggModel.mat');
rxnsFile=fullfile(ravenPath,'reconstruction','kegg','keggRxns.mat');
genesFile=fullfile(ravenPath,'reconstruction','kegg','keggGenes.mat');
metsFile=fullfile(ravenPath,'reconstruction','kegg','keggMets.mat');
if (getFileTime(modelFile)>getFileTime(rxnsFile))&&...
(getFileTime(modelFile)>getFileTime(genesFile))&&...
(getFileTime(modelFile)>getFileTime(metsFile))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
%Check if the reactions have been parsed before and saved. If so, load the
%model
ravenPath=findRAVENroot();
distFile=fullfile(ravenPath,'external','kegg','keggPhylDist.mat');
distFile=fullfile(ravenPath,'reconstruction','kegg','keggPhylDist.mat');
if exist(distFile, 'file')
fprintf(['Importing the KEGG phylogenetic distance matrix from ' strrep(distFile,'\','/') '... ']);
load(distFile);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@
ravenPath=findRAVENroot();

if nargin<1
keggPath=fullfile(ravenPath,'external','kegg');
keggPath=fullfile(ravenPath,'reconstruction','kegg');
else
keggPath=char(keggPath);
end

%Check if the reactions have been parsed before and saved. If so, load the
%model
rxnsFile=fullfile(ravenPath,'external','kegg','keggRxns.mat');
rxnsFile=fullfile(ravenPath,'reconstruction','kegg','keggRxns.mat');
if exist(rxnsFile, 'file')
fprintf(['Importing KEGG reactions from ' strrep(rxnsFile,'\','/') '... ']);
load(rxnsFile);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

if nargin<1
ravenPath=findRAVENroot();
metacycPath=fullfile(ravenPath,'external','metacyc');
metacycPath=fullfile(ravenPath,'reconstruction','metacyc');
else
metacycPath=char(metacycPath);
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@
%Generate blast strcture by either DIAMOND or BLASTP
if isempty(metacycBlastStruct)
if useDiamond
blastStruc=getDiamond(organismID,fastaFile,{'MetaCyc'},fullfile(ravenPath,'external','metacyc','protseq.fsa'));
blastStruc=getDiamond(organismID,fastaFile,{'MetaCyc'},fullfile(ravenPath,'reconstruction','metacyc','protseq.fsa'));
else
blastStruc=getBlast(organismID,fastaFile,{'MetaCyc'},fullfile(ravenPath,'external','metacyc','protseq.fsa'));
blastStruc=getBlast(organismID,fastaFile,{'MetaCyc'},fullfile(ravenPath,'reconstruction','metacyc','protseq.fsa'));
end
%Only look the query
blastStructure=blastStruc(2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
% the model.
if nargin<1
ravenPath=findRAVENroot();
metacycPath=fullfile(ravenPath,'external','metacyc');
metacycPath=fullfile(ravenPath,'reconstruction','metacyc');
else
metacycPath=char(metacycPath);
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

if nargin<1
ravenPath=findRAVENroot();
metacycPath=fullfile(ravenPath,'external','metacyc');
metacycPath=fullfile(ravenPath,'reconstruction','metacyc');
else
metacycPath=char(metacycPath);
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
% A line that contains only '//' separates each object.
if nargin<1
ravenPath=findRAVENroot();
metacycPath=fullfile(ravenPath,'external','metacyc');
metacycPath=fullfile(ravenPath,'reconstruction','metacyc');
else
metacycPath=char(metacycPath);
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@

%Get the MetaCyc path and update the metaCycRxns.mat
ravenPath=findRAVENroot();
rxnsFile=fullfile(ravenPath,'external','metacyc','metaCycRxns.mat');
rxnsFile=fullfile(ravenPath,'reconstruction','metacyc','metaCycRxns.mat');
save(rxnsFile,'metaCycRxns','rxnLinks','TRANSPORT','UNBALANCED','UNDETERMINED','isSpontaneous');
fprintf(['Reaction associations between MetaCyc and KEGG have been successfully updated!\n\n']);

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading