X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bp_bin%2Fclip_adaptor;h=1bf6bf5240a61f374ec4ac9bed8d7e6e51aa001f;hb=10e0db1d8cc294afc9bcff4c56ca34770e0052cb;hp=1e722b28ba8f64c322006e566d61c00681bb70b9;hpb=3656f15bb59e2eb7eff628bae117db6479b2f03f;p=biopieces.git diff --git a/bp_bin/clip_adaptor b/bp_bin/clip_adaptor index 1e722b2..1bf6bf5 100755 --- a/bp_bin/clip_adaptor +++ b/bp_bin/clip_adaptor @@ -42,12 +42,12 @@ Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output| entry = Seq.new_bp(record) if record[:ADAPTOR_POS_RIGHT] - entry.subseq!(0, record[:ADAPTOR_POS_RIGHT].to_i) + entry = entry[0 ... record[:ADAPTOR_POS_RIGHT].to_i] end if record[:ADAPTOR_POS_LEFT] if record[:ADAPTOR_POS_LEFT].to_i + record[:ADAPTOR_LEN_LEFT].to_i < entry.length - entry.subseq!(record[:ADAPTOR_POS_LEFT].to_i + record[:ADAPTOR_LEN_LEFT].to_i) + entry = entry[record[:ADAPTOR_POS_LEFT].to_i + record[:ADAPTOR_LEN_LEFT].to_i .. -1] end end