Class: Piro
- Inherits:
-
FastaQualReader
- Object
- FastaQualReader
- Piro
- Defined in:
- lib/seqtrimnext/classes/piro.rb
Overview
- Author
-
Almudena Bocinos Rioboo
Extract stats like mean of sequence’s length
- Inherit
-
FastaReader
Instance Method Summary collapse
-
#initialize(path_fasta, path_qual) ⇒ Piro
constructor
attr_accessor :na.
- #on_end_process ⇒ Object
- #on_process_sequence(name_seq, fasta_seq, qual_seq) ⇒ Object
Constructor Details
#initialize(path_fasta, path_qual) ⇒ Piro
attr_accessor :na
20 21 22 23 24 25 26 |
# File 'lib/seqtrimnext/classes/piro.rb', line 20 def initialize(path_fasta,path_qual) @path_fasta=path_fasta super(path_fasta,path_qual) MakeBlastDb.execute('../sequences/gemini.fasta') end |
Instance Method Details
#on_end_process ⇒ Object
67 68 69 70 71 72 73 74 |
# File 'lib/seqtrimnext/classes/piro.rb', line 67 def on_end_process() end |
#on_process_sequence(name_seq, fasta_seq, qual_seq) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/seqtrimnext/classes/piro.rb', line 28 def on_process_sequence(name_seq,fasta_seq,qual_seq) puts "in piro, in on process sequence, #{name_seq}" blast = BatchBlast.new('-db '+ @path_fasta ,'blastn',' -task blastn -evalue 1e-10 -perc_identity 95') #get contaminants #blast = BatchBlast.new('DB/vectors.fasta','blastn',' -task blastn ') #get vectors $LOG.debug "-------OK----" # puts seq.seq_fasta res = blast.do_blast(fasta_seq) #rise seq to contaminants executing over blast # # blast_table_results = BlastTableResult.new(res,nil) # vectors=[] # blast_table_results.querys.each do |query| # first round to save contaminants without overlap # merge_hits(query.hits,vectors) # end # # begin # vectors2=vectors # second round to save contaminants without overlap # vectors = [] # merge_hits(vectors2,vectors) # end until (vectors2.count == vectors.count) # # # vectors.each do |c| # adds the correspondent action to the sequence # #if @seq_specie!=seq_specie-contaminant # # if (@params.get_param('genus')!=c.subject_id.split('_')[1]) # # puts "DIFFERENT SPECIE #{specie} ,#{hit.subject_id.split('_')[1].to_s}" # a = seq.add_action(c.q_beg,c.q_end,type) # a.message = c.subject_id # end # end end |