Method: Bio::FastaDefline#get_all_by_type

Defined in:
lib/bio/db/fasta/defline.rb

#get_all_by_type(*type_strarg) ⇒ Object

Returns identifiers by given type.



452
453
454
455
456
457
458
459
460
461
462
463
464
# File 'lib/bio/db/fasta/defline.rb', line 452

def get_all_by_type(*type_strarg)
  d = []
  @list_ids.each do |x|
    if labels = self.class::NSIDs[x[0]] then
      type_strarg.each do |y|
        if i = labels.index(y) then
          d << x[i+1] if x[i+1]
        end
      end
    end
  end
  d
end