view pyCRAC/pyFastqSplitter.pl @ 1:7c9574213c0a draft default tip

Uploaded
author swebb
date Thu, 20 Jun 2013 12:13:43 -0400
parents 19b20927172d
children
line wrap: on
line source

#!/usr/bin/perl -w
use strict;
use Getopt::Long;

my %opt;


GetOptions(\%opt, "f=s", "c=s", "o1=s", "o2=s","file_type=s", "version","id=s");

my $cmnd;

if (exists $opt{version}){
	$cmnd = "python /usr/local/bin/pyFastqSplitter.py --version";
}
else{
	$cmnd = "python /usr/local/bin/pyFastqSplitter.py -f $opt{f} -o $opt{id} --file_type=$opt{file_type}";

	if(defined $opt{c}){
		$cmnd.= " -c $opt{c}";
	}

}

system $cmnd;
system "mv $opt{id}_1.$opt{file_type} $opt{o1}";
system "mv $opt{id}_2.$opt{file_type} $opt{o2}";