forked from keylabivdc/VIP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
parse_tree.pl
31 lines (27 loc) · 848 Bytes
/
parse_tree.pl
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
#!/usr/bin/perl -w
#
# parse_tree.pl
#
# This program will get the reference number and contig number.
# Both number will be highlighted.
#
# parse_tree.pl <*.tree> <contig_num> <refgenome_num> <output>
#
### Authors : Yang Li <[email protected]>
### License : GPL 3 <http://www.gnu.org/licenses/gpl.html>
### Update : 2015-08-05
### Copyright (C) 2015 Yang Li and Xuejun Ma - All Rights Reserved
if (@ARGV < 4) {
die "usage: $0\t<*.tree> <contig_num> <refgenome_num> <output>\n";
}
open TREE, $ARGV[0] or die "Cannot open file:$!\n";
$contig = $ARGV[1];
$refgenome = $ARGV[2];
$output = $ARGV[3];
while (<TREE>) {
chomp;
$contig_num = $_ if /$contig/;
$refgenome_num = $_ if /$refgenome/;
}
system "echo -e TreeView.py $ARGV[0] $contig_num $refgenome_num $output";
system "TreeView.py $ARGV[0] $contig_num $refgenome_num $output";