-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRun.pl
More file actions
35 lines (27 loc) · 780 Bytes
/
Run.pl
File metadata and controls
35 lines (27 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/perl
use warnings;
#########################################
# Input parameters
# Input dataset
$data = $ARGV[0];
open (IN, "<$ARGV[0]") || die "Error in input dataset file $ARGV[0]";
close(IN),
# Chromosome length file
open (IN, "<$ARGV[1]") || die "Error in the chromosome length file $ARGV[1]";
while (!eof(IN)){
chomp($row=<IN>);
@tmp = split /\t/, $row;
push(@chromosomes, $tmp[0]);
push(@start, $tmp[1]);
push(@chrlen, $tmp[2]);
}
# Overlap threshold
$tau = $ARGV[2];
#############################################
# Iteration of RefGen algoritm over all chromosomes
$i = 0;
foreach $chr(@chromosomes){
system "./RefGen $data $data"."_$chr $start[$i] $chrlen[$i] $tau $chromosomes[$i]";
$i += 1;
}
system "cat $data"."_chr* > $data"."_All_chr";