Top Level Namespace
Defined Under Namespace
Constant Summary collapse
- PRINTERS =
{ 'flat' => :FlatPrinter, 'stack' => :CallStackPrinter }
Instance Method Summary collapse
- #apply_options(options, tiler) ⇒ Object
- #build_index(maf, index) ⇒ Object
- #desc(seq) ⇒ Object
- #parse_interval(line) ⇒ Object
- #target_for(base, interval, &blk) ⇒ Object
Instance Method Details
#apply_options(options, tiler) ⇒ Object
21 22 23 24 25 |
# File 'bin/maf_tile', line 21 def (, tiler) tiler.reference = .ref if .ref tiler.species = .species tiler.species_map = .species_map end |
#build_index(maf, index) ⇒ Object
18 19 20 21 22 23 24 |
# File 'bin/maf_index', line 18 def build_index(maf, index) parser = Bio::MAF::Parser.new(maf, :chunk_reader => $options.reader, :parse_extended => false) idx = Bio::MAF::KyotoIndex.build(parser, index) idx.close end |
#desc(seq) ⇒ Object
7 8 9 |
# File 'bin/find_overlaps', line 7 def desc(seq) "#{seq.source}:#{seq.start}-#{seq.end}" end |
#parse_interval(line) ⇒ Object
9 10 11 12 13 14 |
# File 'bin/maf_tile', line 9 def parse_interval(line) src, r_start_s, r_end_s, _ = line.split(nil, 4) r_start = r_start_s.to_i r_end = r_end_s.to_i return Bio::GenomicInterval.zero_based(src, r_start, r_end) end |
#target_for(base, interval, &blk) ⇒ Object
16 17 18 19 |
# File 'bin/maf_tile', line 16 def target_for(base, interval, &blk) path = "#{base}_#{interval.zero_start}-#{interval.zero_end}.fa" File.open(path, 'w', &blk) end |