Mercurial > repos > swebb > pycrac
comparison pyCRAC/pyMotif.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, "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"); | |
| 9 | |
| 10 my $cmnd; | |
| 11 | |
| 12 my $prefix = "m_$opt{id}"; | |
| 13 | |
| 14 | |
| 15 if (exists $opt{version}){ | |
| 16 $cmnd = "python /usr/local/bin/pyMotif.py --version"; | |
| 17 } | |
| 18 else{ | |
| 19 $cmnd = "python /usr/local/bin/pyMotif.py -f $opt{f} --gtf $opt{gtf} --tab $opt{tab} --annotation $opt{annotation} -o $prefix"; | |
| 20 | |
| 21 if(exists $opt{options}){ | |
| 22 | |
| 23 $cmnd .= " --range=$opt{range} --overlap=$opt{overlap} --k_min=$opt{k_min} --k_max=$opt{k_max} --numberofkmers=$opt{numberofkmers}"; | |
| 24 } | |
| 25 } | |
| 26 | |
| 27 #testing | |
| 28 #open (COUNT, ">$opt{count}") || die ""; | |
| 29 #print COUNT "$cmnd"; | |
| 30 | |
| 31 system $cmnd; | |
| 32 | |
| 33 | |
| 34 system "mv $prefix"."_$opt{annotation}_data_k-mers_count.txt $opt{count}"; | |
| 35 system "mv $prefix"."_$opt{annotation}_top_k-mers_in_features.gtf $opt{features}"; | |
| 36 system "mv $prefix"."_$opt{annotation}_k-mer_Z_scores.txt $opt{zscores}"; | |
| 37 system "mv $prefix"."_$opt{annotation}_random_k-mers_count.txt $opt{random}"; | |
| 38 | |
| 39 | |
| 40 | |
| 41 |
