<div class="gmail_extra"><div class="gmail_quote"><div class="gmail_extra"><div class="gmail_quote">Dear Ensembl team,<br>
<br>I am writing to report a bug in <i><a href="http://variant_effect_predictor.pl">variant_effect_predictor.pl</a></i> version 2.4. If you run the script with the optional parameter <i>-o stdout,</i> then "quiet" mode is forced too late in the program, and undesired debug statements are written in the beginning of the output.<br>
The API version used is 66.<br>

<br>PROPOSED FIX:<br><br>Move line 794 (<i>debug("Reading configuration from $file") unless defined($config->{quiet});</i>)<br>to line 809, i.e. to after the <i>while(<CONFIG>) {...} </i>statement.<br>

<br>
Move lines 394-398:<br> <span style="font-family:georgia,serif">   # force quiet if outputting to STDOUT</span><br style="font-family:georgia,serif"><span style="font-family:georgia,serif">    if(defined($config->{output_file}) && $config->{output_file} =~ /stdout/i) {</span><br style="font-family:georgia,serif">


<span style="font-family:georgia,serif">        delete $config->{verbose} if defined($config->{verbose});</span><br style="font-family:georgia,serif"><span style="font-family:georgia,serif">        $config->{quiet} = 1;</span><br style="font-family:georgia,serif">


<span style="font-family:georgia,serif">    }</span><br style="font-family:georgia,serif">to line 807, i.e. to between the <i>while(<CONFIG>) {...}</i> statement and the new location of the just-moved debug statement.<br>


<br>Therefore, the subroutine <i>read_config_from_file</i> should look like this:<br><br><span style="font-family:georgia,serif"># reads config from a file</span><br style="font-family:georgia,serif"><span style="font-family:georgia,serif">sub read_config_from_file {</span><br style="font-family:georgia,serif">


<span style="font-family:georgia,serif">    my $config = shift;</span><br style="font-family:georgia,serif"><span style="font-family:georgia,serif">    my $file = shift;</span><br style="font-family:georgia,serif"><span style="font-family:georgia,serif">    </span><br style="font-family:georgia,serif">


<span style="font-family:georgia,serif">    open CONFIG, $file or die "ERROR: Could not open config file \"$file\"\n";</span><br style="font-family:georgia,serif"><span style="font-family:georgia,serif">    </span><br style="font-family:georgia,serif">


<span style="font-family:georgia,serif">    while(<CONFIG>) {</span><br style="font-family:georgia,serif"><span style="font-family:georgia,serif">        next if /^\#/;</span><br style="font-family:georgia,serif"><span style="font-family:georgia,serif">        my @split = split /\s+|\=/;</span><br style="font-family:georgia,serif">


<span style="font-family:georgia,serif">        my $key = shift @split;            </span><br style="font-family:georgia,serif"><span style="font-family:georgia,serif">        $key =~ s/^\-//g;</span><br style="font-family:georgia,serif">


<span style="font-family:georgia,serif">        </span><br style="font-family:georgia,serif"><span style="font-family:georgia,serif">        if(defined($config->{$key}) && ref($config->{$key}) eq 'ARRAY') {</span><br style="font-family:georgia,serif">


<span style="font-family:georgia,serif">            push @{$config->{$key}}, @split;</span><br style="font-family:georgia,serif"><span style="font-family:georgia,serif">        }</span><br style="font-family:georgia,serif">


<span style="font-family:georgia,serif">        else {</span><br style="font-family:georgia,serif"><span style="font-family:georgia,serif">            $config->{$key} ||= $split[0];</span><br style="font-family:georgia,serif">


<span style="font-family:georgia,serif">        }</span><br style="font-family:georgia,serif"><span style="font-family:georgia,serif">    }</span><br style="font-family:georgia,serif"><span style="font-family:georgia,serif">    </span><br style="font-family:georgia,serif">


<span style="font-family:georgia,serif">    # force quiet if outputting to STDOUT</span><br style="font-family:georgia,serif"><span style="font-family:georgia,serif">    if(defined($config->{output_file}) && $config->{output_file} =~ /stdout/i) {</span><br style="font-family:georgia,serif">


<span style="font-family:georgia,serif">        delete $config->{verbose} if defined($config->{verbose});</span><br style="font-family:georgia,serif"><span style="font-family:georgia,serif">        $config->{quiet} = 1;</span><br style="font-family:georgia,serif">


<span style="font-family:georgia,serif">    }</span><br style="font-family:georgia,serif"><span style="font-family:georgia,serif">    </span><br style="font-family:georgia,serif"><span style="font-family:georgia,serif">    debug("Reading configuration from $file") unless defined($config->{quiet});</span><br style="font-family:georgia,serif">


<span style="font-family:georgia,serif">    </span><br style="font-family:georgia,serif"><span style="font-family:georgia,serif">    close CONFIG;</span><br style="font-family:georgia,serif"><span style="font-family:georgia,serif">}</span><br>


<br>Finally, some debug statements don't check for whether we're in quiet mode. Change those occurences of <i>debug("...");</i> to<br><i>debug("...") unless defined($config->{quiet});</i><br>


<br>This occurs at the following lines:<br><span style="font-family:georgia,serif">838    debug("Failed to compile plugin $module: $@");</span><br style="font-family:georgia,serif"><span style="font-family:georgia,serif">850    debug("Failed to instantiate plugin $module: $@");</span><br style="font-family:georgia,serif">


<span style="font-family:georgia,serif">869    debug("Warning: plugin $plugin version ($plugin_version) does not match the current VEP version ($VERSION)");</span><br style="font-family:georgia,serif"><span style="font-family:georgia,serif">874    debug("Warning: plugin $plugin does not define a version number");</span><br style="font-family:georgia,serif">


<span style="font-family:georgia,serif">878    debug("You may experience unexpected behaviour with this plugin") unless $version_ok;</span><br style="font-family:georgia,serif"><span style="font-family:georgia,serif">884    debug("Plugin $module doesn't implement a required method '$required', does it inherit from BaseVepPlugin?");</span><br style="font-family:georgia,serif">


<span style="font-family:georgia,serif">893    debug("Loaded plugin: $module");</span><br style="font-family:georgia,serif"><span style="font-family:georgia,serif">898    debug("Fetching regulatory features for plugin: $module");</span><br>


<br><br>Sincerely,<br>Aliz R. Rao<br><br><span style="font-family:Helvetica;font-size:12px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:12px;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:12px;white-space:normal;font-family:Helvetica;word-spacing:0px"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 10px/normal 'Lucida Grande'">


<span style="letter-spacing:0px">UCLA Geffen School of Medicine</span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 10px/normal 'Lucida Grande'"><span style="letter-spacing:0px">Department of Human Genetics, <span>Nelson</span> Lab</span></div>


<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 10px/normal 'Lucida Grande'"><span style="letter-spacing:0px">695 Charles E Young Drive S</span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 10px/normal 'Lucida Grande'">


<span style="letter-spacing:0px">Gonda 5554A</span></div><p style="margin-top:0px;margin-right:0px;margin-bottom:3px;margin-left:0px;font:normal normal normal 10px/normal 'Lucida Grande'"><span style="letter-spacing:0px">Los Angeles CA 90095-8348 USA</span></p>


<p style="margin-top:0px;margin-right:0px;margin-bottom:3px;margin-left:0px;font:normal normal normal 10px/normal 'Lucida Grande';color:rgb(0,0,153)"><span style="text-decoration:underline;letter-spacing:0px"><a href="mailto:alizrrao@gmail.com" target="_blank">alizrrao@gmail.com</a></span></p>


<p style="margin-top:0px;margin-right:0px;margin-bottom:6px;margin-left:0px;font:normal normal normal 10px/normal 'Lucida Grande'"><span style="letter-spacing:0px"><a href="tel:714.548.1133" value="+19706918299" target="_blank">714.548.1133</a></span></p>


</span></span></span><br>
</div><br></div>
<br></div><br></div>