Skip to content

Commit

Permalink
fixing bug where samtools_file_convert component is added if counts a…
Browse files Browse the repository at this point in the history
…re used as sample input
  • Loading branch information
adkinsrs committed Jun 17, 2019
1 parent da506da commit d1b3a31
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions package-rnaseq/bin/create_euk_rnaseq_pipeline_config.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1138,20 +1138,25 @@ =head1 AUTHOR
$samtools_convert_position = 0;
$samtools_convert_name = 0;

if ( (! defined $hCmdLineOption{'alignment'}) && (!((defined $hCmdLineOption{'sorted'}) && ($hCmdLineOption{'sorted'} =~ m/position/) &&
(defined $hCmdLineOption{'file_type'}) && ($hCmdLineOption{'file_type'} =~ m/BAM/i))) &&
((defined $hCmdLineOption{'visualization'}) || (defined $hCmdLineOption{'rpkm_analysis'}) ||
((defined $hCmdLineOption{'isoform_analysis'}) || (defined $hCmdLineOption{'diff_isoform_analysis'}))) ) {
$samtools_convert_position = 1;
}

# Sample info file is either BAM or counts input
if (! defined $hCmdLineOption{'alignment'}) {
if ( (!(defined $hCmdLineOption{'sorted'} && $hCmdLineOption{'sorted'} =~ m/position/ &&
defined $hCmdLineOption{'file_type'} && $hCmdLineOption{'file_type'} =~ m/BAM/i)) &&
(defined $hCmdLineOption{'visualization'} || defined $hCmdLineOption{'rpkm_analysis'} ||
(defined $hCmdLineOption{'isoform_analysis'} || defined $hCmdLineOption{'diff_isoform_analysis'})) ) {
$samtools_convert_position = 1;
}

if ( (! defined $hCmdLineOption{'alignment'}) && ( ! defined $hCmdLineOption{'file_type'} ) && (defined $hCmdLineOption{'diff_gene_expr'}) ) {
$samtools_convert_name = 0;
}
elsif ( (! defined $hCmdLineOption{'alignment'}) && (!((defined $hCmdLineOption{'sorted'}) && ($hCmdLineOption{'sorted'} =~ m/name/) &&
(defined $hCmdLineOption{'file_type'}) && ($hCmdLineOption{'file_type'} =~ m/SAM/i))) && (defined $hCmdLineOption{'diff_gene_expr'} && defined $hCmdLineOption{'count'}) ) {
$samtools_convert_name = 1;
if (defined $hCmdLineOption{'diff_gene_expr'}){
if ( !(defined $hCmdLineOption{'sorted'} && $hCmdLineOption{'sorted'} =~ m/name/ &&
defined $hCmdLineOption{'file_type'} && $hCmdLineOption{'file_type'} =~ m/SAM/i)) {
$samtools_convert_name = 1;
}
# Sample Info file contains counts
if (! defined $hCmdLineOption{'count'}) {
$samtools_convert_name = 0;
}
}
}

if ( $samtools_convert_position == 1 && $samtools_convert_name == 1){
Expand Down

0 comments on commit d1b3a31

Please sign in to comment.