annotate pyCRAC/pyFastqSplitter.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", "c=s", "o1=s", "o2=s","file_type=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/pyFastqSplitter.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/pyFastqSplitter.py -f $opt{f} -o $opt{id} --file_type=$opt{file_type}";
19b20927172d Uploaded
swebb
parents:
diff changeset
17
19b20927172d Uploaded
swebb
parents:
diff changeset
18 if(defined $opt{c}){
19b20927172d Uploaded
swebb
parents:
diff changeset
19 $cmnd.= " -c $opt{c}";
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
19b20927172d Uploaded
swebb
parents:
diff changeset
24 system $cmnd;
19b20927172d Uploaded
swebb
parents:
diff changeset
25 system "mv $opt{id}_1.$opt{file_type} $opt{o1}";
19b20927172d Uploaded
swebb
parents:
diff changeset
26 system "mv $opt{id}_2.$opt{file_type} $opt{o2}";
19b20927172d Uploaded
swebb
parents:
diff changeset
27