comparison pyCRAC/pyGTF2bedGraph.pl @ 0:19b20927172d draft

Uploaded
author swebb
date Tue, 18 Jun 2013 09:11:00 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:19b20927172d
1 #!/usr/bin/perl -w
2 use strict;
3 use Getopt::Long;
4
5 my %opt;
6
7
8 GetOptions(\%opt, "gtf=s","po=s","version","mo=s","count=i","chromfile=s","t=s","iCLIP","track","name=s","description=s","color=s","s=s","id=s");
9
10 my $cmnd;
11 my $prefix = "gb_$opt{id}";
12 $prefix =~ s/\s/_/g;
13
14
15 if (exists $opt{version}){
16 $cmnd = "python /usr/local/bin/pyGTF2bedGraph.py --version";
17 }
18 else{
19 $cmnd = "python /usr/local/bin/pyGTF2bedGraph.py --gtf $opt{gtf} --chromfile $opt{chromfile} -t $opt{t} --count $opt{count} -o $prefix";
20
21 if(exists $opt{iCLIP}){
22
23 $cmnd .= " --iCLIP";
24 }
25
26 if(exists $opt{track}){
27 $cmnd .= " --track --name \"$opt{name}\" --description \"$opt{description}\"";
28
29 if(exists $opt{color}){$cmnd .= " --color $opt{color}";}
30 if(exists $opt{s}){$cmnd .= " -s \"$opt{s}\"";}
31 }
32 }
33
34 system $cmnd;
35
36 system "mv $prefix"."_plus_strand.bedgraph $opt{po}";
37 system "mv $prefix"."_minus_strand.bedgraph $opt{mo}";
38