Sha256: 663669b671c42f2c97c8fa524cd3e91ddff4887f9d06447a6f55bf856fa40b39
Contents?: true
Size: 1.17 KB
Versions: 2
Compression:
Stored size: 1.17 KB
Contents
#!/usr/bin/env ruby require 'rubygems' require 'bio' require 'optparse' $:.unshift File.join(File.dirname(__FILE__),'..','lib') require 'bio-plasmoap' SCRIPT_NAME = File.basename(__FILE__); LOG_NAME = SCRIPT_NAME.gsub('.rb','') o = OptionParser.new do |opts| opts.banner = " Usage: #{SCRIPT_NAME} <fasta_file> Predict whether protein(s) are targeted to the apicoplast using the PlasmoAP algorithm described here: Dissecting apicoplast targeting in the malaria parasite Plasmodium falciparum. Foth BJ, Ralph SA, Tonkin CJ, Struck NS, Fraunholz M, Roos DS, Cowman AF, McFadden GI. Science. 2003 Jan 31;299(5607):705-8. PMID: 12560551 It uses SignalP version 3 (not 4!), which it expects to be on the PATH. \n" end; o.parse! # print out a list of proteins with yes/no answers puts [ 'Name', 'PlasmoAP Score', 'Apicoplast Targeted', 'Points' ].join("\t") runner = Bio::PlasmoAP.new Bio::FlatFile.auto(ARGF).each do |seq| result = runner.calculate_score(seq.seq) to_print = [seq.definition, result.to_s] if result.apicoplast_targeted? to_print.push 1 else to_print.push 0 end to_print.push result.points puts to_print.join("\t") end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
bio-plasmoap-0.1.1 | bin/plasmoap.rb |
bio-plasmoap-0.1.0 | bin/plasmoap.rb |