knmkr / dbsnp-pg

PostgreSQL schema for NCBI dbSNP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error on the getting allele frequency

nuin opened this issue · comments

commented

Hi

I am getting this error when trying the query

SELECT * FROM get_allele_freq(3, ARRAY[671, 2230021]);
ERROR:  function get_allele_freq(integer, integer[]) does not exist
LINE 1: SELECT * FROM get_allele_freq(3, ARRAY[671, 2230021]);
                      ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

I installed using the three bash scripts. All other example queries are OK.

It seems that the function was removed from the schema

dbsnp_b146_GRCh37=# SELECT  p.proname
dbsnp_b146_GRCh37-# FROM    pg_catalog.pg_namespace n
dbsnp_b146_GRCh37-# JOIN    pg_catalog.pg_proc p
dbsnp_b146_GRCh37-# ON      p.pronamespace = n.oid
dbsnp_b146_GRCh37-# WHERE   n.nspname = 'public';
      proname
-------------------
 get_current_rs
 get_pos_by_rs
 get_rs_by_pos
 get_all_pos_by_rs
 get_refseq_by_rs
 get_omim_by_rs
 get_snp3d_by_rs
(7 rows)

Hi,

Allele frequency related tables and functions, including get_allele_freq(), are under contrib/freq directory.

Could you try contrib/freq/01_fetch_data.sh, contrib/freq/02_drop_create_table.sh, and contrib/freq/03_import_data.sh?

See details in https://github.com/knmkr/dbsnp-pg/tree/master/contrib/freq

PLINK needs to be installed for contrib/freq/03_import_data.sh.

I'll update README later. Thank you for reporting!