From 056e8e9bd6f8ea3aefa5420fdfda5adc7f5f7282 Mon Sep 17 00:00:00 2001 From: brainfood <967448+brainfood@users.noreply.github.com> Date: Tue, 27 Feb 2018 15:19:40 -0500 Subject: [PATCH 1/2] Fix 'Possible precedence issue with control flow operator' warnings thrown when using perl versions >= 5.20 --- norm_scripts/get_master_list_of_exons.pl | 4 ++-- norm_scripts/get_master_list_of_genes.pl | 4 ++-- norm_scripts/get_master_list_of_intergenic_regions.pl | 4 ++-- norm_scripts/get_master_list_of_introns.pl | 4 ++-- norm_scripts/quantify_exons_introns.pl | 4 ++-- norm_scripts/quantify_intergenic_regions.pl | 4 ++-- norm_scripts/quantify_introns.pl | 4 ++-- norm_scripts/rum-2.0.5_05/lib/RUM/Common.pm | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/norm_scripts/get_master_list_of_exons.pl b/norm_scripts/get_master_list_of_exons.pl index 51f1686..207a549 100644 --- a/norm_scripts/get_master_list_of_exons.pl +++ b/norm_scripts/get_master_list_of_exons.pl @@ -359,11 +359,11 @@ ($) } sub isroman($) { my $arg = shift; - return $arg ne '' and + return ($arg ne '' and $arg =~ /^(?: M{0,3}) (?: D?C{0,3} | C[DM]) (?: L?X{0,3} | X[LC]) - (?: V?I{0,3} | I[VX])$/ix; + (?: V?I{0,3} | I[VX])$/ix); } diff --git a/norm_scripts/get_master_list_of_genes.pl b/norm_scripts/get_master_list_of_genes.pl index b88d5ed..2e1442d 100644 --- a/norm_scripts/get_master_list_of_genes.pl +++ b/norm_scripts/get_master_list_of_genes.pl @@ -368,10 +368,10 @@ ($) } sub isroman($) { my $arg = shift; - return $arg ne '' and + return ($arg ne '' and $arg =~ /^(?: M{0,3}) (?: D?C{0,3} | C[DM]) (?: L?X{0,3} | X[LC]) - (?: V?I{0,3} | I[VX])$/ix; + (?: V?I{0,3} | I[VX])$/ix); } diff --git a/norm_scripts/get_master_list_of_intergenic_regions.pl b/norm_scripts/get_master_list_of_intergenic_regions.pl index ba417ab..dd936d2 100644 --- a/norm_scripts/get_master_list_of_intergenic_regions.pl +++ b/norm_scripts/get_master_list_of_intergenic_regions.pl @@ -621,11 +621,11 @@ ($) } sub isroman($) { my $arg = shift; - return $arg ne '' and + return ($arg ne '' and $arg =~ /^(?: M{0,3}) (?: D?C{0,3} | C[DM]) (?: L?X{0,3} | X[LC]) - (?: V?I{0,3} | I[VX])$/ix; + (?: V?I{0,3} | I[VX])$/ix); } sub uniq { diff --git a/norm_scripts/get_master_list_of_introns.pl b/norm_scripts/get_master_list_of_introns.pl index aec6e87..ee2ce32 100644 --- a/norm_scripts/get_master_list_of_introns.pl +++ b/norm_scripts/get_master_list_of_introns.pl @@ -337,9 +337,9 @@ ($) } sub isroman($) { my $arg = shift; - return $arg ne '' and + return ($arg ne '' and $arg =~ /^(?: M{0,3}) (?: D?C{0,3} | C[DM]) (?: L?X{0,3} | X[LC]) - (?: V?I{0,3} | I[VX])$/ix; + (?: V?I{0,3} | I[VX])$/ix); } diff --git a/norm_scripts/quantify_exons_introns.pl b/norm_scripts/quantify_exons_introns.pl index b1076f7..ef09870 100644 --- a/norm_scripts/quantify_exons_introns.pl +++ b/norm_scripts/quantify_exons_introns.pl @@ -1646,11 +1646,11 @@ ($) } sub isroman($) { my $arg = shift; - return $arg ne '' and + return ($arg ne '' and $arg =~ /^(?: M{0,3}) (?: D?C{0,3} | C[DM]) (?: L?X{0,3} | X[LC]) - (?: V?I{0,3} | I[VX])$/ix; + (?: V?I{0,3} | I[VX])$/ix); } diff --git a/norm_scripts/quantify_intergenic_regions.pl b/norm_scripts/quantify_intergenic_regions.pl index 05a44f2..8ff5413 100644 --- a/norm_scripts/quantify_intergenic_regions.pl +++ b/norm_scripts/quantify_intergenic_regions.pl @@ -605,11 +605,11 @@ ($) } sub isroman($) { my $arg = shift; - return $arg ne '' and + return ($arg ne '' and $arg =~ /^(?: M{0,3}) (?: D?C{0,3} | C[DM]) (?: L?X{0,3} | X[LC]) - (?: V?I{0,3} | I[VX])$/ix; + (?: V?I{0,3} | I[VX])$/ix); } diff --git a/norm_scripts/quantify_introns.pl b/norm_scripts/quantify_introns.pl index f05b52e..10a6e52 100644 --- a/norm_scripts/quantify_introns.pl +++ b/norm_scripts/quantify_introns.pl @@ -362,11 +362,11 @@ ($) sub isroman($) { my $arg = shift; - return $arg ne '' and + return ($arg ne '' and $arg =~ /^(?: M{0,3}) (?: D?C{0,3} | C[DM]) (?: L?X{0,3} | X[LC]) - (?: V?I{0,3} | I[VX])$/ix; + (?: V?I{0,3} | I[VX])$/ix); } diff --git a/norm_scripts/rum-2.0.5_05/lib/RUM/Common.pm b/norm_scripts/rum-2.0.5_05/lib/RUM/Common.pm index 760d35f..18ce1e0 100644 --- a/norm_scripts/rum-2.0.5_05/lib/RUM/Common.pm +++ b/norm_scripts/rum-2.0.5_05/lib/RUM/Common.pm @@ -97,11 +97,11 @@ Return a true value if N is a roman numeral, false otherwise. =cut sub isroman($) { my $arg = shift; - return $arg ne '' and + return ($arg ne '' and $arg =~ /^(?: M{0,3}) (?: D?C{0,3} | C[DM]) (?: L?X{0,3} | X[LC]) - (?: V?I{0,3} | I[VX])$/ix; + (?: V?I{0,3} | I[VX])$/ix); } =item arabic(N) From df6e1cdcae2471f294bafb2101080b42ad2ca80e Mon Sep 17 00:00:00 2001 From: brainfood <967448+brainfood@users.noreply.github.com> Date: Thu, 8 Mar 2018 10:06:53 -0500 Subject: [PATCH 2/2] Fix bug with reporting gene norm results in run_normalization.log file. --- norm_scripts/runall_normalization.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/norm_scripts/runall_normalization.pl b/norm_scripts/runall_normalization.pl index 4311d08..4f3a56d 100644 --- a/norm_scripts/runall_normalization.pl +++ b/norm_scripts/runall_normalization.pl @@ -2692,7 +2692,7 @@ print LOG "Check the following before proceeding:\n\n"; if ($GNORM eq "true"){ - $exp_num_reads = `grep -A 3 Expected $s_dir/GENE/expected_num_reads_gnorm.txt"; | grep -A 3 estimate`; + $exp_num_reads = `grep -A 3 Expected $s_dir/GENE/expected_num_reads_gnorm.txt" | grep -A 3 estimate`; chomp($exp_num_reads); print LOG "\n[Gene Normalization]\n"; print LOG "(1) Number of reads\n";