Sha256: ff7df8b7e43f2d30538823a1e42e44f55c6394fc157a5e42be2ed925a81d5aad
Contents?: true
Size: 1.26 KB
Versions: 2
Compression:
Stored size: 1.26 KB
Contents
module EcfClassify module HMMER DBLOCATION = { :general => "data/HMM_general/all.hmm", :sigma3 => "data/HMM_s3/Sigma70_r3.hmm", :pfam => "data/Pfam_domains/sigma2and4.hmm", :groups => "data/HMM_groups/all_models.hmm", :subgroups => "data/HMM_subgroups/all_models.hmm", } def self.hmmscan(infile, outfile, db) if DBLOCATION.key? db hmm = Utils.path(DBLOCATION[db]) cmd = "hmmscan --noali --domtblout #{outfile} #{Utils.path(DBLOCATION[db])} #{infile} 2>&1" out = `#{cmd}` return [out,$?.exitstatus] else return ["No such database", 2] end end def self.hmmsearch(infile, outfile, db) unless EcfClassify::Zenodo.status EcfClassify::Zenodo.download end if EcfClassify::Zenodo::FILES.key? db hmm = EcfClassify::Zenodo.path(db) cmd = "hmmsearch --noali --domtblout #{outfile} #{hmm} #{infile} 2>&1" out = `#{cmd}` return [out, $?.exitstatus] else return ["No such database", 2] end end def self.hmmpress(file) Dir.glob("#{file}.h3{i,f,m,p}").each { |f| File.delete(f) } cmd = "hmmpress #{file}" out = `#{cmd}` return [out, $?.exitstatus ] end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ecf_classify-1.0.3 | lib/ecf_classify/hmmer.rb |
ecf_classify-1.0.2 | lib/ecf_classify/hmmer.rb |