[ensembl-dev] Suggested code changes

Youens-Clark, Ken kclark at cshl.edu
Tue May 14 16:55:53 BST 2013


Below please find suggested minor changes to Perl code that will keep Perl from complaining so much.

--
Ken Youens-Clark
Ware Lab/CSHL/USDA-ARS
kclark at cshl.edu

Index: common/modules/Bio/EnsEMBL/External/BlastAdaptor.pm
===================================================================
RCS file: /cvsroot/ensembl/eg-plugins/common/modules/Bio/EnsEMBL/External/BlastAdaptor.pm,v
retrieving revision 1.3
diff -r1.3 BlastAdaptor.pm
433,434d432
< warn $dbh;
< warn $SQL_SEARCH_MULTI_RETRIEVE;
436d433
< warn $sth;
Index: common/modules/Bio/EnsEMBL/GlyphSet/gsv_transcript.pm
===================================================================
RCS file: /cvsroot/ensembl/eg-plugins/common/modules/Bio/EnsEMBL/GlyphSet/gsv_transcript.pm,v
retrieving revision 1.6
diff -r1.6 gsv_transcript.pm
141,142c141,142
<     my $start_ex = @l_exons->[0];
<     my $end_ex   = @l_exons->[$#l_exons];
---
>     my $start_ex = $l_exons[0];
>     my $end_ex   = $l_exons[$#l_exons];
332,333c332,333
< 	my $start_ex = @l_exons->[0];
< 	my $end_ex   = @l_exons->[$#l_exons];
---
> 	my $start_ex = $l_exons[0];
> 	my $end_ex   = $l_exons[$#l_exons];
Index: common/modules/Bio/Search/HSP/EnsemblHSP.pm
===================================================================
RCS file: /cvsroot/ensembl/eg-plugins/common/modules/Bio/Search/HSP/EnsemblHSP.pm,v
retrieving revision 1.2
diff -r1.2 EnsemblHSP.pm
425d424
<  
430,431d428
<     $DB::single = 1;
< 
Index: multi/blastview
===================================================================
RCS file: /cvsroot/ensembl/ensembl-webcode/perl/multi/blastview,v
retrieving revision 1.39
diff -r1.39 blastview
2194c2194
<   foreach my $stat qw( score evalue pvalue identity length ){
---
>   foreach my $stat ( qw( score evalue pvalue identity length ) ){
2209c2209
<   foreach my $type qw( subject query ){
---
>   foreach my $type ( qw( subject query ) ){
2276,2278c2276,2278
<   foreach my $type qw( query subject genome contig stats ){
<     foreach my $col qw( name start end orientation 
<                         score evalue identity length ){
---
>   foreach my $type ( qw( query subject genome contig stats ) ){
>     foreach my $col ( qw( name start end orientation 
>                         score evalue identity length ) ){
2388c2388
<   foreach my $stat qw( score evalue pvalue identity length ){
---
>   foreach my $stat (qw( score evalue pvalue identity length )){
Index: Bio/Tools/Run/Search/WuBlast.pm
===================================================================
RCS file: /cvsroot/ensembl/ensembl-webcode/modules/Bio/Tools/Run/Search/WuBlast.pm,v
retrieving revision 1.5
diff -r1.5 WuBlast.pm
257c257
<   foreach my $env qw( PATH BLASTMAT BLASTFILTER BLASTDB ){
---
>   foreach my $env ( qw( PATH BLASTMAT BLASTFILTER BLASTDB ) ){
Index: EnsEMBL/Web/Object/Transcript.pm
===================================================================
RCS file: /cvsroot/ensembl/ensembl-webcode/modules/EnsEMBL/Web/Object/Transcript.pm,v
retrieving revision 1.236.2.1
diff -r1.236.2.1 Transcript.pm
1010c1010
<   foreach my $attrib_code qw(cds_start_NF cds_end_NF mRNA_start_NF mRNA_end_NF) {
---
>   foreach my $attrib_code ( qw(cds_start_NF cds_end_NF mRNA_start_NF mRNA_end_NF) ) {
Index: EnsEMBL/Web/Tools/Registry.pm
===================================================================
RCS file: /cvsroot/ensembl/ensembl-webcode/modules/EnsEMBL/Web/Tools/Registry.pm,v
retrieving revision 1.19
diff -r1.19 Registry.pm
65c65,66
<       my $is_collection = $self->{'conf'}->{'_storage'}{$species}{'SPP_IN_DB'} > 1 ? 1 : 0;
---
>       my $val = $self->{'conf'}->{'_storage'}{$species}{'SPP_IN_DB'};
>       my $is_collection = defined $val && $val > 1 ? 1 : 0;




More information about the Dev mailing list