annotate mirdeep2/target_spy_wrapper.pl @ 1:798fe7ba8b5e default tip

uploading ucsc browser species file
author nikhil-joshi
date Mon, 19 Sep 2011 19:07:09 -0400
parents 5b9519f4b165
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
5b9519f4b165 Upload first commmit
nikhil-joshi
parents:
diff changeset
1 #!/usr/bin/perl
5b9519f4b165 Upload first commmit
nikhil-joshi
parents:
diff changeset
2
5b9519f4b165 Upload first commmit
nikhil-joshi
parents:
diff changeset
3 use File::Temp qw/ tempfile tempdir /;
5b9519f4b165 Upload first commmit
nikhil-joshi
parents:
diff changeset
4 use File::Copy qw/ copy /;
5b9519f4b165 Upload first commmit
nikhil-joshi
parents:
diff changeset
5 use Cwd;
5b9519f4b165 Upload first commmit
nikhil-joshi
parents:
diff changeset
6
5b9519f4b165 Upload first commmit
nikhil-joshi
parents:
diff changeset
7 $mirna_file = $ARGV[0];
5b9519f4b165 Upload first commmit
nikhil-joshi
parents:
diff changeset
8 $trans_file = $ARGV[1];
5b9519f4b165 Upload first commmit
nikhil-joshi
parents:
diff changeset
9 $targets = $ARGV[2];
5b9519f4b165 Upload first commmit
nikhil-joshi
parents:
diff changeset
10
5b9519f4b165 Upload first commmit
nikhil-joshi
parents:
diff changeset
11 # do all the dirty work in a temp directory
5b9519f4b165 Upload first commmit
nikhil-joshi
parents:
diff changeset
12 $cwd = cwd();
5b9519f4b165 Upload first commmit
nikhil-joshi
parents:
diff changeset
13 $tempdir = tempdir(CLEANUP => 1);
5b9519f4b165 Upload first commmit
nikhil-joshi
parents:
diff changeset
14
5b9519f4b165 Upload first commmit
nikhil-joshi
parents:
diff changeset
15 copy ("/opt/Bio/galaxy-dist/tools/mirdeep2/target_spy_wrapper.sh", $tempdir);
5b9519f4b165 Upload first commmit
nikhil-joshi
parents:
diff changeset
16 chdir ($tempdir);
5b9519f4b165 Upload first commmit
nikhil-joshi
parents:
diff changeset
17
5b9519f4b165 Upload first commmit
nikhil-joshi
parents:
diff changeset
18 $ret_ts = `sh target_spy_wrapper.sh $mirna_file $trans_file`;
5b9519f4b165 Upload first commmit
nikhil-joshi
parents:
diff changeset
19 if ($ret_ts ne "") {die "TargetSpy error"}
5b9519f4b165 Upload first commmit
nikhil-joshi
parents:
diff changeset
20 copy ("targets", $targets);
5b9519f4b165 Upload first commmit
nikhil-joshi
parents:
diff changeset
21
5b9519f4b165 Upload first commmit
nikhil-joshi
parents:
diff changeset
22 chdir($cwd);