Skip to content

Commit

Permalink
investigating post_process...
Browse files Browse the repository at this point in the history
  • Loading branch information
lee212 committed Feb 8, 2016
1 parent 744de82 commit aea9109
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion mgescan/nonltr/post_process.pl
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,26 @@ sub merge_thmm{
if ($name !~ /^\./){

my $result_file = $_[0].$name;
#print $result_file."\n";
print "Read".$result_file."\n" if ($debug);
# result_file has a same filename with its original genome file name
# e.g. NC_003070.9.fa
my ($end, $start, $te, $te_name,$count);
$end = -1000;
$start = -1000;
$te = -1;
$te_name ="";
$count=0;
open (IN, $result_file)|| die "Couldn't open ".$result_file;
# Content looks like:
# 19196109 3 167.544204
# 19195187 0 159.845651
# ...
while(my $each_line=<IN>){
chomp($each_line);
my @temp = split(/\s+/, $each_line);
# temp[0]
# temp[1]
# temp[2]
if ($te == $temp[1] + 1 && $temp[1] != 0){
$start = $temp[0];
$te = $temp[1];
Expand Down Expand Up @@ -194,8 +203,10 @@ sub merge_thmm{

}

# $temp[0] == 0 but count != 3 || count != 1 || !(count == 1 && te > 30)
$te = 0;
}else{
# First line falls into here?
$start = $temp[0];
$end = $temp[0];
$te = $temp[1];
Expand Down

0 comments on commit aea9109

Please sign in to comment.