[ensembl-dev] Bugs in gtf2vep.pl script

Duarte Molha Duarte.Molha at ogt.co.uk
Thu Nov 8 16:10:16 GMT 2012

I am glad I was able to make a small contribution :)

BTW... when will be have a git repository to make this process a little bit more effective. I am sure lots of people would love to help and fix bugs :)



From: dev-bounces at ensembl.org [mailto:dev-bounces at ensembl.org] On Behalf Of Will McLaren
Sent: 08 November 2012 15:57
To: Ensembl developers list
Subject: Re: [ensembl-dev] Bugs in gtf2vep.pl script

Hi Duarte,

Thanks for the suggestions.

The @ARGV thing slipped through the net! I've fixed that on the CVS tree, but using a slightly different change to the one you suggest.

There is nothing in GetOptions that requires you specify --dir or --cache_region_size; GetOptions will only fail if you provide an invalid option, for example providing a string to --db_version instead of an integer.

cache_region_size is not mentioned at all because it is not an option you should be changing unless you really really know what you are doing - it is there mainly to assist me in development.

Thanks again

Will McLaren
Ensembl Variation

On 8 November 2012 15:24, Duarte Molha <Duarte.Molha at ogt.co.uk<mailto:Duarte.Molha at ogt.co.uk>> wrote:
Dear Developers

I had a play around with the new gtf2vep script and came across a few bugs and incomplete help.

I have made some improvements on the help usage information and corrected the bugs on line 29 , 30 and 34

Briefly, the first issue I encountered is that I believe the "cache_region_size" and the "dir" arguments are suppose to be optional since they are assigned default values on lines 46 and 49
They are set to be required so the script does not pass the GetOptions step if you do not provide them.
Also the  "cache_region_size" wasn't even mentioned in the usage information so I added it.

In line 34 the if statement:
if(defined($config->{help}) || !@ARGV)
would always fail because on a correctly input command line, after the GetOptions step the @ARGV variable should be empty. So the expression for a valid syntax would always return true and the script would not continue.
I corrected it to:
if(defined($config->{help}) || @ARGV)

I also took the liberty to indicate in the help session what arguments a really required and what arguments are optional.

I hope you agree with the changes.

Best regards

Duarte Molha

Dev mailing list    Dev at ensembl.org<mailto:Dev at ensembl.org>
Posting guidelines and subscribe/unsubscribe info: http://lists.ensembl.org/mailman/listinfo/dev
Ensembl Blog: http://www.ensembl.info/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20121108/f908b6ab/attachment.html>

More information about the Dev mailing list