locuscompare icon indicating copy to clipboard operation
locuscompare copied to clipboard

Mis labelling of lead SNP

Open 1Coleman opened this issue 5 years ago • 3 comments

Locus compare plot do not show the lead snp in my data. Using the command below still do not work. Any suggestions to deal with this in R ? Screenshot 2020-08-09 at 22 47 16

locuscomparer::locuscompare(gwas_data,cqtl_data, title1 = "GWAS", title2 = "cQTL", snp = "rs28393318")

1Coleman avatar Aug 09 '20 13:08 1Coleman

Same issue here

lebf3 avatar Jan 09 '21 12:01 lebf3

The problem is with the add_label() function;

function (merged, snp) 
{
  merged$label = ifelse(merged$rsid %in% snp, merged$rsid, 
    "")
  return(merged)
}

Which returns row.names if you have a factor. Changing the rsid column to character solves it.

Adding this to the function would prevent such an issue.

lebf3 avatar Jan 09 '21 13:01 lebf3

The problem is with the add_label() function;

function (merged, snp) 
{
  merged$label = ifelse(merged$rsid %in% snp, merged$rsid, 
    "")
  return(merged)
}

Which returns row.names if you have a factor. Changing the rsid column to character solves it.

Adding this to the function would prevent such an issue.

Hi I do not find the function add_label(), where is it? I came with the sanme queston, it did not label the SNP. Furthermore, I do not know which SNP was labled, did you find the causal SNP because i see eCAVIAR in your code. and because MySQL is connected to the Internet to plot the LD manhattan, it is not very convenient for network outage . Could we draw pictures without connecting to the Internet? Looking forward to your reply!

Captain-Pam avatar Mar 31 '21 16:03 Captain-Pam