223445 BG2A093.x1 51 7 51 4 75 96 0 1 0 44 223446 BG2A073.x1 51 7 51 4 43 95 0 1 0 44 223447 BG2A033.x1 51 7 51 4 44 92 0 1 0 42 223448 BG2A693.x1 51 7 51 4 45 93 1 1 0 43 223449 BG2A045.x1 51 7 51 4 47 95 1 1 0 47 223501 BG2A034.x1 51 7 51 4 47 95 0 1 0 46 223442 BG2A021.x1 51 7 51 4 48 96 0 1 0 45 #### 223445 BG2A093.x1 51 7 51 4 1 75 96 0 1 0 44 223446 BG2A073.x1 51 7 51 4 2 75 95 0 1 0 43 223447 BG2A033.x1 51 7 51 4 1 44 92 0 1 0 42 223448 BG2A693.x1 51 7 51 4 1 45 93 1 1 0 43 223449 BG2A045.x1 51 7 51 4 1 47 95 1 1 0 47 223501 BG2A034.x1 51 7 51 4 2 47 95 0 1 0 46 223442 BG2A021.x1 51 7 51 4 1 48 96 0 1 0 45 #### #!/usr/local/bin/perl -w my $pre_ref_pos_b; my $pre_ref_pos_e; my $count while (<>) { chomp; my ($r_no,$r_name,$r_len,$r_pos_b, $r_pos_e, $ref_seq_no, $ref_pos_b, $ref_pos_e, $rev, $no_match, $paired, $aln_score) = split; while (defined($pre_ref_pos_b) && defined($pre_ref_pos_e) eq $ref_pos_b && $ref_pos_e) { $count++; print $r_name,$count,$r_ref_pos_b,$ref_pos_e\n; } $pre_ref_pos_b = $ref_pos_b; $pre_ref_pos_e = $ref_pos_e; } }