Created
December 14, 2018 08:55
-
-
Save pjbriggs/6066f55bf10e412a4b9fe556e17b2072 to your computer and use it in GitHub Desktop.
SGE client JSV script to strip "-pe smp.pe 1" from cellranger SGE jobs
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
#!/usr/bin/env perl | |
# | |
# Client JSV script from Mark Lundie for running cellranger | |
# pipeline | |
# | |
# Strips "-pe smp.pe 1" lines from job submission scripts | |
# (requests for >1 core will be kept unchanged) | |
# | |
# Include in qsub commands using -jsv PATH/TO/sge.strip_pe.pl | |
use strict; | |
use warnings; | |
no warnings qw/uninitialized/; | |
use Env qw(SGE_ROOT); | |
use lib "$SGE_ROOT/util/resources/jsv"; | |
use JSV qw( :DEFAULT jsv_send_env jsv_log_info); | |
jsv_on_start(sub { | |
jsv_send_env(); | |
}); | |
jsv_on_verify(sub { | |
my %params = jsv_get_param_hash(); | |
if (exists $params{pe_name}) { | |
my $nslots = $params{pe_min}; | |
if ($nslots lt 2) { | |
jsv_del_param('pe_name'); | |
jsv_correct('Stripped PE from serial job.'); | |
} | |
} | |
jsv_accept(); | |
}); | |
jsv_main(); | |
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
no warnings qw/uninitialized/; | |
use Env qw(SGE_ROOT); | |
use lib "$SGE_ROOT/util/resources/jsv"; | |
use JSV qw( :DEFAULT jsv_send_env jsv_log_info); | |
jsv_on_start(sub { | |
jsv_send_env(); | |
}); | |
jsv_on_verify(sub { | |
my %params = jsv_get_param_hash(); | |
if (exists $params{pe_name}) { | |
my $nslots = $params{pe_min}; | |
if ($nslots lt 2) { | |
jsv_del_param('pe_name'); | |
jsv_correct('Stripped PE from serial job.'); | |
} | |
} | |
jsv_accept(); | |
}); | |
jsv_main(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment