Open dariushghasemi opened 2 days ago
Hi Dariush,
It's simply to do with the default order of the arguments. gene
is listed first, so unless you specify data = gwas_ld
, then when gene
is not specified as an argument then gwas_ld
is passed to gene
. Although the vast majority of users are using locuszoomr to plot GWAS data or similar, some might just want the genetracks to add to their own plots or heatmaps etc, so data is optional.
So your code will work if you write data = gwas_ld
.
However, I will think about whether it is more intuitive to put data
first in front of gene
as an argument which avoid the error message that you received.
Bw, Myles
Hi Myles, Thank you so much for your prompt response.
Ups, my bad! So, it was a simple problem of arguments' order which I missed to obey! Yes, it worked! Correcting my scripts with adding 'data = gwas_ld' produced the scatter plot of the locus.
Of course, genes mapping is quite important for locusZoom plot. I was wondering what happens if a signal falls into none of the coding segments, the genes. How does the package deal with these situations?
Thanks again, Dariush
It currently replies that there are no SNPs/datapoints in that region. But it does return a 'locus' object with the gene information. This won't plot anything using locus_plot()
(it just returns an error message), but will plot the genetracks if you call genetracks()
on the object.
Hi there,
I've been recently using locuszoomr instead of LocusZoom standalone tool. While defining a locus to draw the plot, this error occurred, which requires me to define
gene
argument. Oncegene
argument got introduced to locus function, the error went away.It seems that the gene name is not an optional argument anymore (?)! Specially, defining other parameters such as
fix_window
orflank
did not help to remove the error.I have tried with two different versions of locuszoomr, v0.3.4 and v0.3.5. Note that I am using a local LD info computed by my own, which merged with the GWAS summary results in a data frame format called "gwas_ld".
Here are the arguments I used to reproduce the error:
With
gene
argument defined, the message is: ARHGEF3, chromosome 3, position 56437401 to 57437401 80 SNPs/datapointsWithout
gene
, locus function returns: Error in locuszoomr::locus(gwas_ld, seqname = 3, xrange = c(56849749, : gene not foundThank you for your help! Dariush