Skip to content

Commit

Permalink
Merge 0dc9a36 into f18b023
Browse files Browse the repository at this point in the history
  • Loading branch information
jemten committed Dec 3, 2020
2 parents f18b023 + 0dc9a36 commit b4986f1
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 20 deletions.
1 change: 1 addition & 0 deletions definitions/rd_rna_parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ library_type:
associated_recipe:
- genebody_coverage
- picardtools_collectrnaseqmetrics
- star_aln
- stringtie_ar
data_type: SCALAR
default: reverse_stranded
Expand Down
6 changes: 3 additions & 3 deletions lib/MIP/Program/Star.pm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ BEGIN {
use base qw{ Exporter };

# Set the version for version checking
our $VERSION = 1.07;
our $VERSION = 1.08;

# Functions and variables which can be optionally exported
our @EXPORT_OK = qw{ star_aln star_genome_generate };
Expand Down Expand Up @@ -222,8 +222,8 @@ sub star_aln {
strict_type => 1,
},
out_sam_strand_field => {
allow => [qw{ None intronMotif }],
default => q{intronMotif},
allow => [ undef, qw{ None intronMotif } ],
default => q{None},
store => \$out_sam_strand_field,
strict_type => 1,
},
Expand Down
11 changes: 10 additions & 1 deletion lib/MIP/Recipes/Analysis/Star_aln.pm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ BEGIN {
use base qw{ Exporter };

# Set the version for version checking
our $VERSION = 1.19;
our $VERSION = 1.20;

# Functions and variables which can be optionally exported
our @EXPORT_OK = qw{ analysis_star_aln analysis_star_aln_mixed };
Expand Down Expand Up @@ -290,6 +290,8 @@ sub analysis_star_aln {
$active_parameter_href->{star_aln_reference_genome}
. $file_info_href->{star_aln_reference_genome}[0];

my $out_sam_strand_field =
$active_parameter_href->{library_type} eq q{unstranded} ? q{intronMotif} : undef;
star_aln(
{
align_intron_max => $active_parameter_href->{align_intron_max},
Expand All @@ -303,6 +305,7 @@ sub analysis_star_aln {
genome_dir_path => $referencefile_dir_path,
infile_paths_ref => \@fastq_files,
out_sam_attr_rgline => $out_sam_attr_rgline,
out_sam_strand_field => $out_sam_strand_field,
outfile_name_prefix => $outfile_path_prefix . $DOT,
pe_overlap_nbases_min => $active_parameter_href->{pe_overlap_nbases_min},
thread_number => $recipe_resource{core_number},
Expand Down Expand Up @@ -641,6 +644,11 @@ sub analysis_star_aln_mixed {
separator => $SPACE,
}
);

my $out_sam_strand_field =
$active_parameter_href->{library_type} eq q{unstranded}
? q{intronMotif}
: undef;
star_aln(
{
filehandle => $filehandle,
Expand All @@ -655,6 +663,7 @@ sub analysis_star_aln_mixed {
genome_dir_path => $referencefile_dir_path,
infile_paths_ref => \@fastq_files,
out_sam_attr_rgline => $out_sam_attr_rgline,
out_sam_strand_field => $out_sam_strand_field,
outfile_name_prefix => $outfile_path_prefix . $DOT,
pe_overlap_nbases_min => $active_parameter_href->{pe_overlap_nbases_min},
thread_number => $recipe_resource{core_number},
Expand Down
19 changes: 11 additions & 8 deletions t/analysis_star_aln.t
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ use Test::Trap;
## MIPs lib/
use lib catdir( dirname($Bin), q{lib} );
use MIP::Constants qw{ $COLON $COMMA $SPACE };
use MIP::Test::Fixtures qw{ test_add_io_for_recipe test_log test_mip_hashes test_standard_cli };
use MIP::Test::Fixtures
qw{ test_add_io_for_recipe test_log test_mip_hashes test_standard_cli };

my $VERBOSE = 1;
our $VERSION = 1.03;
our $VERSION = 1.04;

$VERBOSE = test_standard_cli(
{
Expand All @@ -41,7 +42,8 @@ BEGIN {
## Modules with import
my %perl_module = (
q{MIP::Recipes::Analysis::Star_aln} => [qw{ analysis_star_aln }],
q{MIP::Test::Fixtures} => [qw{ test_add_io_for_recipe test_log test_mip_hashes test_standard_cli }],
q{MIP::Test::Fixtures} =>
[qw{ test_add_io_for_recipe test_log test_mip_hashes test_standard_cli }],
);

test_import( { perl_module_href => \%perl_module, } );
Expand Down Expand Up @@ -77,6 +79,7 @@ my $sample_id = $active_parameter{sample_ids}[0];
$active_parameter{platform} = q{ILLUMINA};
$active_parameter{star_aln_reference_genome} = q{a_dir};
$active_parameter{two_pass_mode} = q{Basic};
$active_parameter{library_type} = q{unstranded};

my %file_info = test_mip_hashes(
{
Expand All @@ -98,11 +101,11 @@ my %parameter = test_mip_hashes(

test_add_io_for_recipe(
{
file_info_href => \%file_info,
id => $sample_id,
parameter_href => \%parameter,
recipe_name => $recipe_name,
step => q{fastq},
file_info_href => \%file_info,
id => $sample_id,
parameter_href => \%parameter,
recipe_name => $recipe_name,
step => q{fastq},
}
);

Expand Down
19 changes: 11 additions & 8 deletions t/analysis_star_aln_mixed.t
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ use Test::Trap;
## MIPs lib/
use lib catdir( dirname($Bin), q{lib} );
use MIP::Constants qw{ $COLON $COMMA $SPACE };
use MIP::Test::Fixtures qw{ test_add_io_for_recipe test_log test_mip_hashes test_standard_cli };
use MIP::Test::Fixtures
qw{ test_add_io_for_recipe test_log test_mip_hashes test_standard_cli };

my $VERBOSE = 1;
our $VERSION = 1.02;
our $VERSION = 1.03;

$VERBOSE = test_standard_cli(
{
Expand All @@ -41,7 +42,8 @@ BEGIN {
## Modules with import
my %perl_module = (
q{MIP::Recipes::Analysis::Star_aln} => [qw{ analysis_star_aln_mixed }],
q{MIP::Test::Fixtures} => [qw{ test_add_io_for_recipe test_log test_mip_hashes test_standard_cli }],
q{MIP::Test::Fixtures} =>
[qw{ test_add_io_for_recipe test_log test_mip_hashes test_standard_cli }],
);

test_import( { perl_module_href => \%perl_module, } );
Expand Down Expand Up @@ -77,6 +79,7 @@ my $sample_id = $active_parameter{sample_ids}[0];
$active_parameter{platform} = q{ILLUMINA};
$active_parameter{star_aln_reference_genome} = q{a_dir};
$active_parameter{two_pass_mode} = q{Basic};
$active_parameter{library_type} = q{reverse_stranded};

my %file_info = test_mip_hashes(
{
Expand All @@ -100,11 +103,11 @@ my %parameter = test_mip_hashes(

test_add_io_for_recipe(
{
file_info_href => \%file_info,
id => $sample_id,
parameter_href => \%parameter,
recipe_name => $recipe_name,
step => q{bam},
file_info_href => \%file_info,
id => $sample_id,
parameter_href => \%parameter,
recipe_name => $recipe_name,
step => q{bam},
}
);

Expand Down

0 comments on commit b4986f1

Please sign in to comment.