0
|
1 #!/usr/bin/perl -w
|
|
2 use strict;
|
|
3 use Getopt::Long;
|
|
4
|
|
5 my %opt;
|
|
6
|
|
7
|
|
8 GetOptions(\%opt, "f=s", "c=s", "o1=s", "o2=s","file_type=s", "version","id=s");
|
|
9
|
|
10 my $cmnd;
|
|
11
|
|
12 if (exists $opt{version}){
|
|
13 $cmnd = "python /usr/local/bin/pyFastqSplitter.py --version";
|
|
14 }
|
|
15 else{
|
|
16 $cmnd = "python /usr/local/bin/pyFastqSplitter.py -f $opt{f} -o $opt{id} --file_type=$opt{file_type}";
|
|
17
|
|
18 if(defined $opt{c}){
|
|
19 $cmnd.= " -c $opt{c}";
|
|
20 }
|
|
21
|
|
22 }
|
|
23
|
|
24 system $cmnd;
|
|
25 system "mv $opt{id}_1.$opt{file_type} $opt{o1}";
|
|
26 system "mv $opt{id}_2.$opt{file_type} $opt{o2}";
|
|
27
|