Home > external > getWoLFScores.m

getWoLFScores

PURPOSE ^

getWoLFScores

SYNOPSIS ^

function GSS = getWoLFScores(inputFile, kingdom)

DESCRIPTION ^

 getWoLFScores
   Call 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 one wants to use another predictor, see parseScores. The
   function normalizes the scores so that the best score for each gene is
   1.0.

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

   Output:
   GSS         a gene scoring structure to be used in predictLocalization

   Usage: GSS = getWoLFScores(inputFile, kingdom)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function GSS = getWoLFScores(inputFile, kingdom)
0002 % getWoLFScores
0003 %   Call 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 one wants to use another predictor, see parseScores. The
0007 %   function normalizes the scores so that the best score for each gene is
0008 %   1.0.
0009 %
0010 %   Input:
0011 %   inputFile    a FASTA file with protein sequences
0012 %   kingdom     the kingdom of the organism, 'animal', 'fungi' or 'plant'
0013 %
0014 %   Output:
0015 %   GSS         a gene scoring structure to be used in predictLocalization
0016 %
0017 %   Usage: GSS = getWoLFScores(inputFile, kingdom)
0018 
0019 if ~isfile(inputFile)
0020     error('FASTA file %s cannot be found',string(inputFile));
0021 end
0022 
0023 kingdom=char(kingdom);
0024 if ~any(strcmp(kingdom,{'animal','fungi','plant'}))
0025     EM='Allowed kingdoms are "animal", "fungi", and "plant"';
0026     dispEM(EM);
0027 end
0028 
0029 if ispc || ismac
0030     EM='This function currently runs only on Linux. Use parseScores if you want to use another predictor';
0031     dispEM(EM);
0032 end
0033 
0034 %Get the directory for RAVEN Toolbox
0035 ravenPath=findRAVENroot();
0036 
0037 %Temporary output name
0038 outFile=tempname;
0039 fid=fopen(outFile,'w');
0040 
0041 %Do the prediction
0042 [~, output]=unix(['perl "' ravenPath '/software/WoLFPSORT/bin/runWolfPsortSummary" ' kingdom ' < ' inputFile]);
0043 
0044 %Save output and call the general parser
0045 fprintf(fid,output);
0046 fclose(fid);
0047 GSS=parseScores(outFile,'wolf');
0048 
0049 %Clean up
0050 delete(outFile);
0051 end

Generated by m2html © 2005