Home > RAVEN > getWoLFScores.m

getWoLFScores

PURPOSE ^

getWoLFScores

SYNOPSIS ^

function geneScoreStruct=getWoLFScores(inputFile,kingdom)

DESCRIPTION ^

 getWoLFScores
   Calls WoLF PSort to predict the sub-cellular localization of proteins.
   The output can be used as input to predictLocalization. This function
   is currently only available for Linux and requires PERL to be
   installed. If you want to use another predictor, see parseScores.

   inputFile    a FASTA file with protein sequences
   kingdom     the kingdom of the organism, 'animal', 'fungi' or 'plant'.

   The function normalizes the scores so that the best score for each gene
   is 1.0.

   geneScoreStructure  a structure to be used in predictLocalization

   Usage: geneScoreStruct=getWoLFScores(inputFile,kingdom)

   Rasmus Agren, 2012-03-27

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function geneScoreStruct=getWoLFScores(inputFile,kingdom)
0002 % getWoLFScores
0003 %   Calls WoLF PSort to predict the sub-cellular localization of proteins.
0004 %   The output can be used as input to predictLocalization. This function
0005 %   is currently only available for Linux and requires PERL to be
0006 %   installed. If you want to use another predictor, see parseScores.
0007 %
0008 %   inputFile    a FASTA file with protein sequences
0009 %   kingdom     the kingdom of the organism, 'animal', 'fungi' or 'plant'.
0010 %
0011 %   The function normalizes the scores so that the best score for each gene
0012 %   is 1.0.
0013 %
0014 %   geneScoreStructure  a structure to be used in predictLocalization
0015 %
0016 %   Usage: geneScoreStruct=getWoLFScores(inputFile,kingdom)
0017 %
0018 %   Rasmus Agren, 2012-03-27
0019 
0020 if ~strcmp(kingdom,'animal') && ~strcmp(kingdom,'fungi') && ~strcmp(kingdom,'plant')
0021     throw(MException('','Allowed kingdoms are "animal", "fungi", and "plant"')); 
0022 end
0023 
0024 if ispc==true
0025     throw(MException('','This function currently runs only on Linux. Use parseScores if you want to use another predictor')); 
0026 end
0027 
0028 %Get the directory for RAVEN Toolbox. This may not be the easiest or best
0029 %way to do this
0030 [ST I]=dbstack('-completenames');
0031 ravenPath=fileparts(ST(I).file);
0032 
0033 %Temporary output name
0034 outFile=tempname;
0035 fid=fopen(outFile,'w');
0036 
0037 %Do the prediction
0038 [status output]=unix(['perl ' ravenPath '/software/WoLFPSORT_package_v0.2/bin/runWolfPsortSummary ' kingdom ' < ' inputFile]);
0039 
0040 %Save output and call the general parser
0041 fprintf(fid,output);
0042 fclose(fid);
0043 geneScoreStruct=parseScores(outFile,'wolf');
0044 
0045 %Clean up
0046 delete(outFile);

Generated on Tue 23-Apr-2013 15:18:37 by m2html © 2005