[ensembl-dev] Getting import_vcf.pl working

Will McLaren wm2 at ebi.ac.uk
Mon Feb 25 13:12:18 GMT 2013


Hello,

I'd recommend that you use the registry file rather than specifying the
connection parameters on the command line.

The problem with your registry file is that it does not return a true
value; all registry files must end with:

1;

as it is interpreted as a Perl module, and all Perl modules must return a
true value.

The DBAadaptor your file is creating should also be a Variation DBAdaptor,
and must have the species name specified in it.

Depending on your use case, you may also need to connect to a core
database; this should be specified as a non-variation DBAdaptor, as you had
before, but it should also have the species name included.

So, your registry file should look like:

use strict;

use Bio::EnsEMBL::Utils::ConfigRegistry;
use Bio::EnsEMBL::DBSQL::DBAdaptor;
use Bio::EnsEMBL::Compara::DBSQL::DBAdaptor;

new Bio::EnsEMBL::DBSQL::DBAdaptor(
  -species => 'Homo_sapiens',
  -user    => 'atchourb',
  -pass => 'abcd1234',
  -host    => 'localhost',
  -port    => '3306',
  -dbname  => 'my_core_database'
);

new Bio::EnsEMBL::Variation::DBSQL::DBAdaptor(
  -species => 'Homo_sapiens',
  -user    => 'atchourb',
  -pass => 'abcd1234',
  -host    => 'localhost',
  -port    => '3306',
  -dbname  => 'VCFdump'
);

my @aliases = ( 'H_Sapiens', 'human' );

Bio::EnsEMBL::Utils::ConfigRegistry->add_alias(
  -species => 'Homo sapiens',
  -alias   => \@aliases
);

1;

There's a slightly better example of a registry file (with the main
ensembldb parameters entered) here:

http://www.ensembl.org/info/docs/variation/vep/vep_script.html#local

Hope this helps!

Will McLaren
Ensembl Variation


On 22 February 2013 23:52, Tchourbanov, Alexander Y - (atchourb) <
atchourb at email.arizona.edu> wrote:

>  Dear ENSEMBL developers,
>
>  When I try to download VCF file to the locally installed database using
> the following command:
>
>  perl ./import_vcf.pl -i ./common_all.vcf.gz -db VCFdump -u atchourb
> --password abcd1234 --source dbSNP --population general
>
>  I get the following message:
>
>  Use of qw(...) as parentheses is deprecated at
> /usr/src/ensembl/modules/Bio/EnsEMBL/Registry.pm line 1564.
> 2013-02-22 16:33:54 - Session ID is a9703281edc05675ba906f396b0586fb
> human is not a valid species name for this instance
> Use of uninitialized value $species in hash element at
> /usr/src/ensembl/modules/Bio/EnsEMBL/Registry.pm line 958.
> Use of uninitialized value $species in hash element at
> /usr/src/ensembl/modules/Bio/EnsEMBL/Registry.pm line 969.
> ERROR: Could not get population adaptor
>
>  What is the way to get the population adapter? Are there more detailed
> instructions on how to download de novo VCF file to a database with
> import_vcf.pl?
>
>  Another question refers to usage of the registry file, which I never
> managed to get working:
>
>  use strict;
>
>  use Bio::EnsEMBL::Utils::ConfigRegistry;
> use Bio::EnsEMBL::DBSQL::DBAdaptor;
> use Bio::EnsEMBL::Compara::DBSQL::DBAdaptor;
>
>  new Bio::EnsEMBL::DBSQL::DBAdaptor(
>   -user    => 'atchourb',
>   -pass => 'abcd1234',
>   -host    => 'localhost',
>   -port    => '3306',
>   -dbname  => 'VCFdump'
> );
>
>  my @aliases = ( 'H_Sapiens', 'human' );
>
>  Bio::EnsEMBL::Utils::ConfigRegistry->add_alias(
>   -species => 'Homo sapiens',
>   -alias   => \@aliases
> );
>
>  after running the program I get the following message:
>
>  Use of qw(...) as parentheses is deprecated at
> /usr/src/ensembl/modules/Bio/EnsEMBL/Registry.pm line 1564.
> 2013-02-22 16:40:30 - Session ID is dd2fc7598559030f21bfcc9bc529162f
> ./registry.conf did not return a true value at
> /usr/src/ensembl/modules/Bio/EnsEMBL/Registry.pm line 360.
>
>  Thanks for any suggestions!
>
>
> _______________________________________________
> Dev mailing list    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/20130225/e70fcb58/attachment.html>


More information about the Dev mailing list