From: martinahansen Date: Sat, 22 Jan 2011 09:45:27 +0000 (+0000) Subject: added S_BEG and S_END keys to digest_seq X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6b206a970406acb806365b5524c506d1fbfaedc2;p=biopieces.git added S_BEG and S_END keys to digest_seq git-svn-id: http://biopieces.googlecode.com/svn/trunk@1213 74ccb610-7750-0410-82ae-013aeee3265d --- diff --git a/bp_bin/digest_seq b/bp_bin/digest_seq index bf5c730..9fe81e9 100755 --- a/bp_bin/digest_seq +++ b/bp_bin/digest_seq @@ -48,6 +48,14 @@ bp.each_record do |record| digest.each do |subseq| new_record = subseq.to_bp + + if new_record[:SEQ_NAME] =~ /\[(\d+)-(\d+)\]$/ + s_beg = $1 + s_end = $2 + end + + new_record[:S_BEG] = s_beg + new_record[:S_END] = s_end new_record[:REC_TYPE] = "DIGEST" bp.puts new_record end