Last active
August 29, 2015 14:15
-
-
Save gatoravi/d09aaf053e5cb4deb0cd to your computer and use it in GitHub Desktop.
An example workflow on TGI's GMS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub _run_workflow { | |
my $self = shift; | |
my $lsf_queue = $ENV{GENOME_LSF_QUEUE_BUILD_WORKER_ALT}; | |
my $lsf_project = 'varscan_filter'; | |
my $w = Workflow::Operation->create( | |
name => "Filter Varscan SNVs", | |
operation_type => Workflow::OperationType::Command->get( | |
'Genome::Model::Tools::Capture::FormatSnvs') | |
); | |
$w->parallel_by('variants_file'); | |
$w->log_dir("/gscmnt/gc2607/mardiswilsonlab/aramu/test/genome/lib/perl/Genome/Model/Tools/Varscan"); | |
# Validate the workflow | |
my @errors = $w->validate; | |
if (@errors) { | |
$self->error_message(@errors); | |
die "Errors validating workflow\n"; | |
} | |
# the hardcoding here is just for example. | |
$self->status_message("Launching workflow now."); | |
my @inputs1 = ( | |
"/gscmnt/gc2607/mardiswilsonlab/aramu/analysis/misc/loh/PNS1_loh/varscan.snps.1.snp", | |
"/gscmnt/gc2607/mardiswilsonlab/aramu/analysis/misc/loh/PNS1_loh/varscan.snps.2.snp"); | |
my @outputs = ("tmp", "tmp2"); | |
print \@inputs1; | |
# Launch workflow | |
my $result = Workflow::Simple::run_workflow_lsf( | |
$w, | |
'variants_file' => \@inputs1, | |
'output_file' => \@outputs, | |
); | |
#Collect and analyze results | |
unless($result){ | |
foreach my $error (@Workflow::Simple::ERROR) { | |
$self->error_message($error->stdout()); | |
$self->error_message($error->stderr()); | |
} | |
die $self->error_message("Workflow did not return correctly."); | |
} | |
return 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment