This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Search Hgmd By Accession

Hello

I'm probably missing something obvious but how do you search HGMD by the accession number of a variation?

thanks

thanks for answering

3 answers

[?]

http://www.hgmd.cf.ac.uk/docs/new_help.html

You can in the professional version but not in the public version

getHGMDData <- function(geneName,
                        user='hgmd',
                        password='hgmd',
                        host='192.168.99.100',
                        port='3306',
                        dbname='hgmd') {
  library("DBI")
  library("RMySQL")
  # load also HGMD
  con=dbConnect(MySQL(),username=user,password=password,host=host,unix.socket=port,dbname=dbname)
  # get all mutations
  res <- dbSendQuery(con,sprintf("select * from mutnomen inner join allmut as h1 on h1.acc_num=mutnomen.acc_num where gene='%s'",geneName))
  rawdat<-fetch(res,n=-1)
  cleanHGVS <- paste0("c.",rawdat$hgvs[!is.na(rawdat$hgvs)])
  dbDisconnect(con)
  (list(hgvs=cleanHGVS,rawData=rawdat))
}

getHGMDData("TP53")

Whenever connecting to a database, isolate connection and usage functions so you don't end up establishing a connection each time you need to query.

Also, this results in an error:

mysql -h 192.168.99.100 -u hgmd -p hgmd
Enter password: # I typed hgmd

ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.99.100' (60)

mysql -h 192.168.99.100 -u hgmd -P 3306 -p hgmd
Enter password: # I typed hgmd

ERROR 2005 (HY000): Unknown MySQL server host '192.168.99.100:3306' (0)

Do you need special permissions to access this server?

Log in to answer this question.