boxiangliu / locuscomparer Goto Github PK
View Code? Open in Web Editor NEWLocusCompareR is a R package with visualization tools for comparing two genetic association datasets.
LocusCompareR is a R package with visualization tools for comparing two genetic association datasets.
The merge
function in assign_color
can flip the order of SNPs where one rsid is a substring of the other, e.g. rs123456 and rs1234567. In the following if
statement, the line color[rsid == snp,'color'] = 'purple'
should then colour the lead SNP (snp = "rs123456"
) purple; however, it colours rs1234567 purple instead.
The core issue is that the line color[rsid == snp,'color']
uses the input structure rsid
(which is just a renaming of merged$rsid
) to mask color
, rather than color$rsid
. Since rsid
has the ordering of SNPs prior to the reordering by merge
and color$rsid
the ordering post merge
, it changes the colour of the wrong SNP.
This can be fixed simply by changing color[rsid == snp,'color']
to color[color$rsid == snp,'color']
.
I'm not sure if this only happens for SNPs with rsids that are substrings of other SNP rsids, or why the merge
function does this at all, but this fix should ensure that any change in ordering during merge
is irrelevant.
Top SNP level is not showing for GWAS plot. get this error Warning message:
ggrepel: 1 unlabeled data points (too many overlaps). Consider increasing max.overlaps. Any solution to this?
Hi, I installed your package and got the following error:
> library(locuscomparer)
Error: package or namespace load failed for ‘locuscomparer’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
namespace ‘rlang’ 0.3.0.1 is already loaded, but >= 0.3.1 is required
Got around that by updating rlang to 0.3.1. Maybe you can incorporate this into the dependencies?
Hi,
I am using locuscomparer under a linux environment. When I run the function locuscompare(), it shows an error as follows:
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/jhuli/R/x86_64-pc-linux-gnu-library/4.1/RMySQL/libs/RMySQL.so':
libmariadb.so.3: cannot open shared object file: No such file or directory
Warning message:
In rm(config) : object 'config' not found
I already have RMySQL installed, so I am not sure what I can do to fix this. Could you help me with this? Thank you!
Hi,
While running locuscompare
function I encountered this error:
Error in .local(drv, ...) :
Failed to connect to database: Error: Unknown MySQL server host 'locuscompare-us-west-2a.cvocub39nnri.us-west-2.rds.amazonaws.com' (2)
Calls: locuscompare ... get_position -> <Anonymous> -> <Anonymous> -> .local
Execution halted
Warning message:
In rm(config) : object 'config' not found
I did not have this problem when I was doing the same thing before, though.
Thanks
Hi Boxiang,
I'm testing the locuscomparer
package on my Mac.
The environment is R 3.6 and the sample data works very well.
But when I load my own datasets, it always shows the following msg after running a while.
Error in .local(conn, statement, ...) :
could not run statement: MySQL server has gone away
My datasets are a GWAS data ~ 260M, and the GTEx v7 data ~ 3.5G.
Do you have any clue for this error msg? Is it due to the large size dataset?
Thanks so much.
Hi
I am having two dataset , as below
eqtl_fn <- read.table(file="XXXXX/Artery_Coronary_v7_eQTL_PHACTR1.txt", header=T, as.is=T)
head(eqtl_fn)
gwas_fn <- read.table(file="XXXXX/CAD_GWAS.txt", header=T, as.is=T)
head(gwas_fn)
locuscompare(in_fn1=gwas_fn, in_fn2=eqtl_fn, title1="CAD GWAS", title2="Coronary Artery eQTL",
marker_col1= gwas_fn$rsnum, pval_col1=gwas_fn$pvalue, marker_col2=eqtl_fn$rsnum, pval_col2=eqtl_fn$pval_nominal)
keep having this error
Error in [.data.frame
(d, , c("rsid", "pval", "logp")) :
undefined columns selected
your advise is appreciated.
Hi there,
Thanks for this great tool. It is very convenient to use and makes great plots. I'm wondering if you've considered adding an option to plot zscores instead of pvalues. As you probably know, when samples sizes get large enough, pvalues are sufficiently close to zero that R and other programs cannot distinguish between them and they get truncated to some arbitrarily small number.
One could argue that we shouldn't bother trying to interpret differences between such small numbers. But i think for plotting purposes, the visual might be better if zscores were used instead of pvalues -- so you don't end up with a cluster of points on a flat line at the edge of "detection." If there's a reason you've chosen not to do this, I'd also be interested to know!
Thanks again for the great tool.
Hi,
Very useful tool! A simple question is how can I change Y axes in locuscomparer?
Thanks!
Ya
Hi boxiangliu:
Thank you for your tool to plot the COLOC, but I have a problem about the legend, the "r2" deviate downward. As shown below(I did not change any drawing parameters in LINUX R 3.6.1):
but it is normal in Windows10. I think this tool should be very good, but I don’t know why this problem occurs. It has troubled me for a long time, so I want to ask you to help me
Hello,
Thanks for developing this convenient tools! But I ran into some problems.
It seems like no option to add a main title for the figure in locuscompare, which is an important function in some case. And it's also difficult to add a title without plot() or ggplot2().
I would appreciate your help. Thank you.
P-values exceeded R's folate limit would automatically be transformed to 0, resulting an infinite value of -log10 (P), and the figure would be very weird. I suggest reading in the P-value columns as character first, and then to transform it to -log10 value. (split the P-value by the number before and after e)
Hi,
I wonder if there is a way to use my own LD matrix to produce locuscompare plot, for example, I have multi-ancestry results but your package reference data does not provide LD in such scenario.
Thank you.
Xiaowei
Hello Boxiang,
I was trying to run your tool and encountered the following error:
Error in .local(conn, statement, ...) :
could not run statement: MySQL server has gone away
I'm not entirely sure what the problem is. I would appreciate your help. Thank you.
Nelson Barrientos
Hi,
To be sure I downloaded the example data for locuscompareR. I'm getting all the time the same error message.
"Error in .local(drv, ...) :
Failed to connect to database: Error: Can't connect to MySQL server on 'locuscompare-us-west-2a.cvocub39nnri.us-west-2.rds.amazonaws.com' (115)
Warning message:
In rm(config) : object 'config' not found"
Thanks for your assistance,
Hi,
I am using locuscomparer to visualize colocalization results, but the SNPs I draw with the R package are not the same as the colocalized SNPs. Could you help me with this? Thank you!
https://github.com/boxiangliu/locuscomparer/blob/master/R/locuscompare.R#L122 has d1 =
but d2 =
is intended
Tried to run the example and got the following error
> library(locuscomparer)
> gwas_fn = system.file('extdata','gwas.tsv', package = 'locuscomparer')
> eqtl_fn = system.file('extdata','eqtl.tsv', package = 'locuscomparer')
> main(in_fn1 = gwas_fn, in_fn2 = eqtl_fn, title1 = 'CAD GWAS', title2 = 'Coronary Artery eQTL')
Error in loadNamespace(name) : there is no package called ‘RMySQL’
Since RMySQL
is essential to run the main functions, you could have it as a dependency too. Does this make sense?
Dear developer,
I am frequently encountering the following problem at runtime, is there any way to cope with this problem?
Error in dbSendQuery(conn, statement, ...) :
could not run statement: Lost connection to server during query
Good morning,
I would really like to use LocusCompareR as it seems like a great pacakges, but I'm having trouble installing LocusComparer on R 3.5.3 and Windows 10. I can load devtools properly, but when doing
devtools::install_github("boxiangliu/locuscomparer")
I get the following error message after the dependencies have been installed:
\* installing *source* package 'locuscomparer' ... ** libs no DLL was created ERROR: compilation failed for package 'locuscomparer' \* removing 'C:/Users/Jenny/Documents/R/win-library/3.5/locuscomparer' In R CMD INSTALL Error in i.p(...) : (converted from warning) installation of package ‘C:/Users/Jenny/AppData/Local/Temp/RtmpWkwypc/file18646fe17717/locuscomparer_1.0.0.tar.gz’ had non-zero exit status
I've tried other versions of R (3.5.1, 3.4.3), reinstalling Rtools (trying both version 34 and 35), using another computer (same problem), only installing the 32 bit or 64 bit version of R, and I keep getting similar compilation issues. Other packages work fine. I would really appreciate any help in getting it to work.
Many thanks!
/Jenny
Hello
I met a problem that I can not open the link: http://locuscompare.com/ .
A fewer days ago, I can use it for visualization. It is so practical.
Looking forward to your reply.
Thank you so much!
With GTEx release v8 being released soon, is it possible to compute LD from other sources? I'm assuming the default is 1k genomes, but is there an option to compute LD from GTEx, for example?
Hi, I am trying to run this command locuscompare(in_fn1 = gwas_fn, in_fn2 = eqtl_fn, title1 = 'CAD GWAS', title2 = 'Coronary Artery eQTL')
but having the persistent issue for three days.
Error in .local(drv, ...) :
Failed to connect to database: Error: Can't connect to MySQL server on 'locuscompare-us-west-2a.cvocub39nnri.us-west-2.rds.amazonaws.com' (111)
Warning message:
In rm(config) : object 'config' not found
I have already tried my best but still do not know how to run it smoothly.
I am working on ubuntu behind a corporate proxy. So, I thought at first it was a proxy issue due to the lacking of MySQL server and AWS account on my device. But, when I use it on my mac, it is working like a charm without any installation and creation of MySQL server and AWS account. However, I still need to use this tool on my work PC because of input data privacy issue.
Does it mean I need to create an AWS account and adjust the network setting in it to access MySQL server on this URL 'locuscompare-us-west-2a.cvocub39nnri.us-west-2.rds.amazonaws.com'?
Please let me know how to run this tool behind a corporate proxy.
Hi!
In the latest commit 15 May 2019, the SNPs that are missing in the LD lookup table are coloured grey in the main table, which is great. However, it seems that since SNPs with r2 < 0.2 with the lead SNP are dropped from the LD table, they are also coded as grey. Is there any possibility to update so that SNPs without LD are coded grey and SNPs with r2 0-0.2 are dark blue?
Thank you very much - and thanks for a great software!
Best,
Jenny
Hello,
I've installed locuscomparer successfully as far as I can tell. I have RMySQL installed as well. When I run the example code provided, R simply hangs (for more than 10 min), with no indication that anything is happening.
The example code I'm referring to is:
gwas_fn = system.file('extdata','gwas.tsv', package = 'locuscomparer')
eqtl_fn = system.file('extdata','eqtl.tsv', package = 'locuscomparer')
locuscompare(in_fn1 = gwas_fn, in_fn2 = eqtl_fn, title1 = 'CAD GWAS', title2 = 'Coronary Artery eQTL')
This happens on my Mac (High Sierra) with RStudio + R 3.6.0, as well as on our unix server. On the server I get the message:
Error in .local(drv, ...) :
Failed to connect to database: Error: Can't connect to MySQL server on 'locuscompare-us-west-2a.cvocub39nnri.us-west-2.rds.amazonaws.com' (111)
On my Mac it simply hangs. Any clue as to what is going on?
Thanks!
Jeremy
Hi, I keep having this issues.
gwas_fn = 'xxxxx/Desktop/CAD_GWAS.txt'
eqtl_fn = 'xxxxxx/Desktop/Artery_Coronary_v7_eQTL_PHACTR1.txt'
locuscompare(in_fn1 = gwas_fn, in_fn2 = eqtl_fn, title = 'CAD GWAS', title2 = 'Coronary Artery eQTL')
Error in .local(drv, ...) :
Failed to connect to database: Error: Can't connect to server on 'locuscompare-us-west-2a.cvocub39nnri.us-west-2.rds.amazonaws.com' (10060)
Warning message:
In rm(config) : object 'config' not found
Please advise.
Thanks for the great package! However, I have noticed that the points sometimes don't color correctly: the lead SNP isn't purple but another (random?) SNP is. Also, it would be great if we could accommodate "secondary lead" SNPs that are labelled but not as big as the lead SNP. Currently, when I try multiple lead SNPs, they're labelled correctly but I can't tell which one is the main lead SNP that defines LD. I have reinstalled the package a few days ago:
Packaged: 2019-08-20 13:25:13 UTC;
Built: R 3.5.3; ; 2019-08-20 13:25:14 UTC; windows
I got the following error:
"ERROR: Error in sprintf("%s not found in the intersection of %s and %s", snp, : object 'in_fn1' not found\n"
I traced this to the function get_lead_snp, where objects in_fn1 and in_fn2 are used, but are not in scope since they aren't passed in to the function.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.