Search Hgmd By Accession
3
1
Entering edit mode
14.0 years ago
Andrea_Bio ★ 2.8k

Hello

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

thanks

• 3.5k views
ADD COMMENT
0
Entering edit mode

thanks for answering

ADD REPLY
3
Entering edit mode
ADD COMMENT
3
Entering edit mode
14.0 years ago
Flyn Morris ▴ 30

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

ADD COMMENT
0
Entering edit mode
5.5 years ago
Shicheng Guo ★ 9.6k
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")
ADD COMMENT
0
Entering edit mode

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?

ADD REPLY

Login before adding your answer.

Traffic: 2139 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6