Class: Bio::PSORT::WoLF_PSORT::Wrapper
- Inherits:
-
Object
- Object
- Bio::PSORT::WoLF_PSORT::Wrapper
- Defined in:
- lib/bio/appl/psort/wolf_psort_wrapper.rb
Constant Summary collapse
- ORGANISM_TYPES =
%w(plant animal fungi)
- SUMMARY_EXECUTABLE_NAME =
'runWolfPsortSummary'
Instance Method Summary collapse
-
#run(amino_acid_sequence_string, organism_type) ⇒ Object
Given an amino acid sequence as a String and an organism type (plasnt/animal/fungi) as a String, run a local version of WoLF_PSORT (which is assumed to be in the executable path) and return a parsed report.
Instance Method Details
#run(amino_acid_sequence_string, organism_type) ⇒ Object
Given an amino acid sequence as a String and an organism type (plasnt/animal/fungi) as a String, run a local version of WoLF_PSORT (which is assumed to be in the executable path) and return a parsed report. Return nil if something untoward happens.
A known problem is that it doesn’t work on sequences that are too short. For instance the sequence MRTLKTEVEKGFLSTMFVQELATPKG prints out an error on the command line: Modification of non-creatable array value attempted, subscript -1 at /home/ben/bioinfo/WoLFPSORT_package_v0.2/bin/psortModifiedForWolfFiles/psortModules/PsortFastaReader.pm line 440, <STDIN> line 1.
19 20 21 22 23 24 25 |
# File 'lib/bio/appl/psort/wolf_psort_wrapper.rb', line 19 def run(amino_acid_sequence_string, organism_type) fasta = ">wolf\n#{amino_acid_sequence_string}" output = Bio::Command.query_command([SUMMARY_EXECUTABLE_NAME, organism_type], fasta) return nil if output == '' or output.nil? # happens when the sequence is too short return Bio::PSORT::WoLF_PSORT::Report.parse_from_summary(organism_type, output.split("\n")[1]) end |