annotate pyCRAC/pyMotif.pl @ 1:7c9574213c0a draft default tip

Uploaded
author swebb
date Thu, 20 Jun 2013 12:13:43 -0400
parents 19b20927172d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
19b20927172d Uploaded
swebb
parents:
diff changeset
1 #!/usr/bin/perl -w
19b20927172d Uploaded
swebb
parents:
diff changeset
2 use strict;
19b20927172d Uploaded
swebb
parents:
diff changeset
3 use Getopt::Long;
19b20927172d Uploaded
swebb
parents:
diff changeset
4
19b20927172d Uploaded
swebb
parents:
diff changeset
5 my %opt;
19b20927172d Uploaded
swebb
parents:
diff changeset
6
19b20927172d Uploaded
swebb
parents:
diff changeset
7
19b20927172d Uploaded
swebb
parents:
diff changeset
8 GetOptions(\%opt, "f=s","version","gtf=s","range=i","overlap=i","--annotation=s", "--tab=s","--k_min=i","--k_max=i","--numberofkmers=i","--count=s","--features=s","--zscores=s","--random=s","options","o=s","id=s");
19b20927172d Uploaded
swebb
parents:
diff changeset
9
19b20927172d Uploaded
swebb
parents:
diff changeset
10 my $cmnd;
19b20927172d Uploaded
swebb
parents:
diff changeset
11
19b20927172d Uploaded
swebb
parents:
diff changeset
12 my $prefix = "m_$opt{id}";
19b20927172d Uploaded
swebb
parents:
diff changeset
13
19b20927172d Uploaded
swebb
parents:
diff changeset
14
19b20927172d Uploaded
swebb
parents:
diff changeset
15 if (exists $opt{version}){
19b20927172d Uploaded
swebb
parents:
diff changeset
16 $cmnd = "python /usr/local/bin/pyMotif.py --version";
19b20927172d Uploaded
swebb
parents:
diff changeset
17 }
19b20927172d Uploaded
swebb
parents:
diff changeset
18 else{
19b20927172d Uploaded
swebb
parents:
diff changeset
19 $cmnd = "python /usr/local/bin/pyMotif.py -f $opt{f} --gtf $opt{gtf} --tab $opt{tab} --annotation $opt{annotation} -o $prefix";
19b20927172d Uploaded
swebb
parents:
diff changeset
20
19b20927172d Uploaded
swebb
parents:
diff changeset
21 if(exists $opt{options}){
19b20927172d Uploaded
swebb
parents:
diff changeset
22
19b20927172d Uploaded
swebb
parents:
diff changeset
23 $cmnd .= " --range=$opt{range} --overlap=$opt{overlap} --k_min=$opt{k_min} --k_max=$opt{k_max} --numberofkmers=$opt{numberofkmers}";
19b20927172d Uploaded
swebb
parents:
diff changeset
24 }
19b20927172d Uploaded
swebb
parents:
diff changeset
25 }
19b20927172d Uploaded
swebb
parents:
diff changeset
26
19b20927172d Uploaded
swebb
parents:
diff changeset
27 #testing
19b20927172d Uploaded
swebb
parents:
diff changeset
28 #open (COUNT, ">$opt{count}") || die "";
19b20927172d Uploaded
swebb
parents:
diff changeset
29 #print COUNT "$cmnd";
19b20927172d Uploaded
swebb
parents:
diff changeset
30
19b20927172d Uploaded
swebb
parents:
diff changeset
31 system $cmnd;
19b20927172d Uploaded
swebb
parents:
diff changeset
32
19b20927172d Uploaded
swebb
parents:
diff changeset
33
19b20927172d Uploaded
swebb
parents:
diff changeset
34 system "mv $prefix"."_$opt{annotation}_data_k-mers_count.txt $opt{count}";
19b20927172d Uploaded
swebb
parents:
diff changeset
35 system "mv $prefix"."_$opt{annotation}_top_k-mers_in_features.gtf $opt{features}";
19b20927172d Uploaded
swebb
parents:
diff changeset
36 system "mv $prefix"."_$opt{annotation}_k-mer_Z_scores.txt $opt{zscores}";
19b20927172d Uploaded
swebb
parents:
diff changeset
37 system "mv $prefix"."_$opt{annotation}_random_k-mers_count.txt $opt{random}";
19b20927172d Uploaded
swebb
parents:
diff changeset
38
19b20927172d Uploaded
swebb
parents:
diff changeset
39
19b20927172d Uploaded
swebb
parents:
diff changeset
40
19b20927172d Uploaded
swebb
parents:
diff changeset
41