while coverage(sum) < max_cov
entry = self.subseq_rand(size)
- entry.revcomp if strand == '-'
+ entry.reverse!.complement! if strand == '-'
if block_given?
yield entry
Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output|
input.each_record do |record|
- if record.has_key? :SEQ and record[:SEQ].length >= options[:size]
+ if record[:SEQ] and record[:SEQ].length >= options[:size]
entry = Seq.new(record[:SEQ_NAME], record[:SEQ], record[:SCORES])
- entry.type = 'dna'
+ entry.type = :dna
entry.shred(options[:size], options[:coverage]) do |subentry|
output.puts subentry.to_bp