]> git.donarmstrong.com Git - biopieces.git/blobdiff - bp_bin/split_pair_seq
refactor subseq to Seq#[]
[biopieces.git] / bp_bin / split_pair_seq
index b0425acd2c0b02e27413554b74e806101e919913..cd0aea6533a625705bdfef66375d352c44a1146f 100755 (executable)
@@ -46,8 +46,8 @@ Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output|
         raise "SEQ_LEN_LEFT + SEQ_LEN_RIGHT != SEQ_LEN #{len_left} + #{len_right} != #{entry.length}"
       end
 
-      entry1 = entry.subseq(0, len_left)
-      entry2 = entry.subseq(len_left)
+      entry1 = entry[0 ... len_left]
+      entry2 = entry[len_left .. -1]
 
       if entry.seq_name =~ /^[^ ]+ \d:/
         entry2.seq_name.sub!(/ \d:/, " 2:")