Home > external > makeFakeBlastStructure.m

makeFakeBlastStructure

PURPOSE ^

makeFakeBlastStructure

SYNOPSIS ^

function blastStructure=makeFakeBlastStructure(orthologList,sourceModelID,getModelFor)

DESCRIPTION ^

 makeFakeBlastStructure
   Makes a fake blastStructure, that would normally be generated by
   getBlast. This allows to feed a predefined list of orthologs to
   getModelFromHomology while retaining the further use of that function.
   For this function to work, it is crucial that the orthologList is a
   cell array where the first column contains the genes from the source
   organism, and the second column contains the genes from the target
   organism
  
   orthologList        cell array of orthologous genes, where the first
                       column contains the genes from the source organism,
                       while the second column contains the genes from the
                       target organism
   sourceModelID       ID of the model that will be used as template, that
                       contains the genes in the first column of
                       orthologList
   getModelFor         the name of the organism to build a model for,
                       identical to the getModelFor parameter in the
                       getModelFromHomology function

   blastStructure      a fake blastStructure, where the evalue, identity
                       and aligLen are set at extreme values, such that
                       all orthologous pairs will pass the filter when
                       running getModelFromHomology

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function blastStructure=makeFakeBlastStructure(orthologList,sourceModelID,getModelFor)
0002 % makeFakeBlastStructure
0003 %   Makes a fake blastStructure, that would normally be generated by
0004 %   getBlast. This allows to feed a predefined list of orthologs to
0005 %   getModelFromHomology while retaining the further use of that function.
0006 %   For this function to work, it is crucial that the orthologList is a
0007 %   cell array where the first column contains the genes from the source
0008 %   organism, and the second column contains the genes from the target
0009 %   organism
0010 %
0011 %   orthologList        cell array of orthologous genes, where the first
0012 %                       column contains the genes from the source organism,
0013 %                       while the second column contains the genes from the
0014 %                       target organism
0015 %   sourceModelID       ID of the model that will be used as template, that
0016 %                       contains the genes in the first column of
0017 %                       orthologList
0018 %   getModelFor         the name of the organism to build a model for,
0019 %                       identical to the getModelFor parameter in the
0020 %                       getModelFromHomology function
0021 %
0022 %   blastStructure      a fake blastStructure, where the evalue, identity
0023 %                       and aligLen are set at extreme values, such that
0024 %                       all orthologous pairs will pass the filter when
0025 %                       running getModelFromHomology
0026 
0027 if nargin<3
0028     error('All three parameters should be set');
0029 end
0030 sourceModelID=char(sourceModelID);
0031 getModelFor=char(getModelFor);
0032 
0033 % Check whether orthologList is a cell array, with two columns, and more
0034 % than 10 rows
0035 if (~iscell(orthologList) || ~(size(orthologList,2)==2) || ~(size(orthologList,1)>=10))
0036     error('orthologList should be a cell array with two columns');
0037 end
0038 
0039 blastStructure(1).fromId=sourceModelID;
0040 blastStructure(1).toId=getModelFor;
0041 blastStructure(1).fromGenes=orthologList(:,1);
0042 blastStructure(1).toGenes=orthologList(:,2);
0043 
0044 blastStructure(2).fromId=getModelFor;
0045 blastStructure(2).toId=sourceModelID;
0046 blastStructure(2).fromGenes=orthologList(:,2);
0047 blastStructure(2).toGenes=orthologList(:,1);
0048 
0049 blastStructure(1).evalue=zeros(size(orthologList,1),1);
0050 blastStructure(2).evalue=zeros(size(orthologList,1),1);
0051 blastStructure(1).identity(1:size(orthologList,1),1)=100;
0052 blastStructure(2).identity(1:size(orthologList,1),1)=100;
0053 blastStructure(1).aligLen(1:size(orthologList,1),1)=1000;
0054 blastStructure(2).aligLen(1:size(orthologList,1),1)=1000;
0055 blastStructure(1).bitscore(1:size(orthologList,1),1)=100;
0056 blastStructure(2).bitscore(1:size(orthologList,1),1)=100;
0057 blastStructure(1).ppos(1:size(orthologList,1),1)=100;
0058 blastStructure(2).ppos(1:size(orthologList,1),1)=100;
0059 end

Generated by m2html © 2005