annotate pyCRAC/pyFastqDuplicateRemover.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", "r=s", "o=s", "out2=s", "version","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 if (exists $opt{version}){
19b20927172d Uploaded
swebb
parents:
diff changeset
13 $cmnd = "python /usr/local/bin/pyFastqDuplicateRemover.py --version";
19b20927172d Uploaded
swebb
parents:
diff changeset
14 }
19b20927172d Uploaded
swebb
parents:
diff changeset
15 else{
19b20927172d Uploaded
swebb
parents:
diff changeset
16 $cmnd = "python /usr/local/bin/pyFastqDuplicateRemover.py -f $opt{f} -o $opt{id}";
19b20927172d Uploaded
swebb
parents:
diff changeset
17
19b20927172d Uploaded
swebb
parents:
diff changeset
18 if(defined $opt{r}){
19b20927172d Uploaded
swebb
parents:
diff changeset
19 $cmnd.= " -r $opt{r}";
19b20927172d Uploaded
swebb
parents:
diff changeset
20 }
19b20927172d Uploaded
swebb
parents:
diff changeset
21 }
19b20927172d Uploaded
swebb
parents:
diff changeset
22
19b20927172d Uploaded
swebb
parents:
diff changeset
23 system $cmnd;
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 if(defined $opt{r}){
19b20927172d Uploaded
swebb
parents:
diff changeset
28 system "mv $opt{id}"."_1.fasta $opt{o}";
19b20927172d Uploaded
swebb
parents:
diff changeset
29 system "mv $opt{id}"."_2.fasta $opt{out2}";
19b20927172d Uploaded
swebb
parents:
diff changeset
30 }
19b20927172d Uploaded
swebb
parents:
diff changeset
31 else{
19b20927172d Uploaded
swebb
parents:
diff changeset
32 system "mv $opt{id} $opt{o}";
19b20927172d Uploaded
swebb
parents:
diff changeset
33 }
19b20927172d Uploaded
swebb
parents:
diff changeset
34