Skip to content

Commit

Permalink
Merge pull request #1246 from Clinical-Genomics/feature/star_options
Browse files Browse the repository at this point in the history
feat(star_options): updates star parameters
  • Loading branch information
jemten committed Dec 6, 2019
2 parents 5831034 + c13075b commit 80b855f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 29 deletions.
8 changes: 4 additions & 4 deletions definitions/rd_rna_parameters.yaml
Expand Up @@ -299,19 +299,19 @@ align_intron_max:
associated_recipe:
- star_aln
data_type: SCALAR
default: 100000
mandatory: no
type: recipe_argument
align_mates_gap_max:
associated_recipe:
- star_aln
data_type: SCALAR
default: 100000
mandatory: no
type: recipe_argument
align_sjdb_overhang_min:
associated_recipe:
- star_aln
data_type: SCALAR
default: 10
mandatory: no
type: recipe_argument
chim_junction_overhang_min:
associated_recipe:
Expand All @@ -329,7 +329,7 @@ chim_out_type:
associated_recipe:
- star_aln
data_type: SCALAR
default: WithinBAM SoftClip
default: WithinBAM SoftClip
type: recipe_argument
pe_overlap_nbases_min:
associated_recipe:
Expand Down
27 changes: 10 additions & 17 deletions lib/MIP/Program/Star.pm
Expand Up @@ -25,15 +25,15 @@ BEGIN {
use base qw{ Exporter };

# Set the version for version checking
our $VERSION = 1.03;
our $VERSION = 1.04;

# Functions and variables which can be optionally exported
our @EXPORT_OK = qw{ star_aln star_genome_generate };
}

sub star_aln {

## Function : Perl wrapper for STAR v2.5.3a.
## Function : Perl wrapper for STAR v2.7.3a.
## Returns : @commands
## Arguments : $align_intron_max => Maximum intron size
## : $align_mates_gap_max => Maximum gap between two mates
Expand All @@ -60,49 +60,45 @@ sub star_aln {
my ($arg_href) = @_;

## Flatten argument(s)
my $align_intron_max;
my $align_mates_gap_max;
my $align_sjdb_overhang_min;
my $filehandle;
my $chim_out_type;
my $chim_junction_overhang_min;
my $chim_segment_min;
my $genome_dir_path;
my $infile_paths_ref;
my $limit_bam_sort_ram;
my $outfile_name_prefix;
my $pe_overlap_nbases_min;
my $stderrfile_path;
my $stderrfile_path_append;
my $stdoutfile_path;
my $thread_number;

## Default(s)
my $align_intron_max;
my $align_mates_gap_max;
my $align_sjdb_overhang_min;
my $chim_junction_overhang_min;
my $chim_segment_min;
my $chim_segment_read_gap_max;
my $limit_bam_sort_ram;
my $out_sam_strand_field;
my $out_sam_type;
my $quant_mode;
my $read_files_command;
my $thread_number;
my $two_pass_mode;

my $tmpl = {
align_intron_max => {
default => 100_000,
store => \$align_intron_max,
strict_type => 1,
},
align_mates_gap_max => {
default => 100_000,
store => \$align_mates_gap_max,
strict_type => 1,
},
align_sjdb_overhang_min => {
default => 10,
store => \$align_sjdb_overhang_min,
strict_type => 1,
},
chim_junction_overhang_min => {
default => 12,
store => \$chim_junction_overhang_min,
strict_type => 1,
},
Expand All @@ -117,7 +113,6 @@ sub star_aln {
strict_type => 1,
},
chim_segment_min => {
default => 12,
store => \$chim_segment_min,
strict_type => 1,
},
Expand All @@ -143,7 +138,6 @@ sub star_aln {
strict_type => 1,
},
limit_bam_sort_ram => {
default => 315_321_372_30,
store => \$limit_bam_sort_ram,
strict_type => 1,
},
Expand Down Expand Up @@ -192,8 +186,7 @@ sub star_aln {
strict_type => 1,
},
thread_number => {
allow => qr/ ^\d+$ /xms,
default => 16,
allow => qr/ \A \d+ \z /xms,
store => \$thread_number,
strict_type => 1,
},
Expand Down
17 changes: 9 additions & 8 deletions lib/MIP/Recipes/Analysis/Star_aln.pm
Expand Up @@ -25,7 +25,7 @@ BEGIN {
use base qw{ Exporter };

# Set the version for version checking
our $VERSION = 1.14;
our $VERSION = 1.15;

# Functions and variables which can be optionally exported
our @EXPORT_OK = qw{ analysis_star_aln };
Expand Down Expand Up @@ -279,13 +279,14 @@ sub analysis_star_aln {
$active_parameter_href->{align_sjdb_overhang_min},
chim_junction_overhang_min =>
$active_parameter_href->{chim_junction_overhang_min},
chim_out_type => $active_parameter_href->{chim_out_type},
chim_segment_min => $active_parameter_href->{chim_segment_min},
genome_dir_path => $referencefile_dir_path,
infile_paths_ref => \@fastq_files,
outfile_name_prefix => $outfile_path_prefix . $DOT,
thread_number => $recipe_resource{core_number},
two_pass_mode => $active_parameter_href->{two_pass_mode},
chim_out_type => $active_parameter_href->{chim_out_type},
chim_segment_min => $active_parameter_href->{chim_segment_min},
genome_dir_path => $referencefile_dir_path,
infile_paths_ref => \@fastq_files,
outfile_name_prefix => $outfile_path_prefix . $DOT,
pe_overlap_nbases_min => $active_parameter_href->{pe_overlap_nbases_min},
thread_number => $recipe_resource{core_number},
two_pass_mode => $active_parameter_href->{two_pass_mode},
},
);
say {$filehandle} $NEWLINE;
Expand Down

0 comments on commit 80b855f

Please sign in to comment.