Re: [R] How to stack two Stack manhattan plots?

2020-06-11 Thread Ana Marija
Thank you so much it is getting better (see attach) when I do: ggplot( data = tmp.tidy) +geom_point( aes(y = -log10(value),x = CHR,color=key) ,position = "jitter", size=0.5 ) is there is a way to have separation between every chromosome shown better and also every number of chromosome shown on

Re: [R] How to stack two Stack manhattan plots?

2020-06-11 Thread Ana Marija
I tried it, ggplot( data = tmp.tidy) +geom_point( aes(y = BP,x = CHR,color=key) ,position = "jitter" ) I got the attached On Thu, Jun 11, 2020 at 4:18 PM wrote: > > Try adding > position = "jitter" to the geom_point(... > > > > On 11 Jun 2020 21:41, Ana Marija wrote: > > Hello, > > I tried your

Re: [R] How to stack two Stack manhattan plots?

2020-06-11 Thread Ana Marija
Hello, I tried your code and this is what I got I really need two groups side by side shown per chromosome as it is here: https://imgur.com/a/pj40c on the image there are 4 groups I do have only two On Thu, Jun 11, 2020 at 11:52 AM wrote: > > On 2020-06-11 15:59, Ana Marija wrote: > > yes all

Re: [R] How to stack two Stack manhattan plots?

2020-06-11 Thread cpolwart
On 2020-06-11 15:59, Ana Marija wrote: yes all in one plot. So I want key (and therefore color)to be "Pold" and "Pnew" as those I am comparing per CHR so I used facet_wrap(~CHR) to create a graph per chromosome (on x-axis) On the end x-axis would have two strikes of Pold and Pnew (different

Re: [R] How to stack two Stack manhattan plots?

2020-06-11 Thread Ana Marija
yes all in one plot. So I want key (and therefore color)to be "Pold" and "Pnew" as those I am comparing per CHR so I used facet_wrap(~CHR) to create a graph per chromosome (on x-axis) On the end x-axis would have two strikes of Pold and Pnew (different colors) per one chromosome, and CHR would go

Re: [R] How to stack two Stack manhattan plots?

2020-06-11 Thread cpolwart
On 2020-06-11 14:54, Ana Marija wrote: Hello, I expected it to look like this: https://imgur.com/a/pj40c Ah - so all on the one plot? - so you don't want a facet. It puts two plots side by side (or 22) where x-axis would be CHR, there is 22 of them unique(tmp.tidy$CHR) [1] 1 2 3 4

Re: [R] How to stack two Stack manhattan plots?

2020-06-11 Thread Ana Marija
Hello, I expected it to look like this: https://imgur.com/a/pj40c where x-axis would be CHR, there is 22 of them > unique(tmp.tidy$CHR) [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 I also have two phenotypes (keys) which I would like to compare > unique(tmp.tidy$key)

Re: [R] How to stack two Stack manhattan plots?

2020-06-10 Thread John via R-help
On Wed, 10 Jun 2020 15:36:11 -0500 Ana Marija wrote: > Hello, > > I have a data frame like this: > > > head(tmp1) > CHR BP PoldPnew > 1 1 785989 0.9521 0.09278 > 2 1 1130727 0.4750 0.19010 > 3 1 1156131 0.5289 0.48520 > 4 1 1158631 0.2554 0.18140 > 5 1 1211292 0.2954

Re: [R] How to stack two Stack manhattan plots?

2020-06-10 Thread cpolwart
What did you expect? I'm assuming two plots (based on the subject) and side by side based on the code (nrow =1) But you are getting several graphs (facets) on the row and only expected 2? What is in CHR? i.e. summary(tmp1$CHR) I'm assuming its not a factor with 2 elements...? > Hello,

Re: [R] How to stack two Stack manhattan plots?

2020-06-10 Thread Ana Marija
HI Jim I run it like this: Rscript --no-save Manhattan_plot.R and just in case I added: stringsAsFactors=FALSE so the script looks like this: library(qqman) results_log <- read.table("logistic_results_M3.assoc.logistic.C", head=TRUE,stringsAsFactors=FALSE) jpeg("M3.assoc.logistic.jpeg")

Re: [R] How to stack two Stack manhattan plots?

2020-06-10 Thread Jim Lemon
Hi Ana, The problem may be that the JPEG device doesn't handle transparency. Perhaps PNG? Jim On Thu, Jun 11, 2020 at 6:48 AM Ana Marija wrote: > > Hello, > > I have a data frame like this: > > > head(tmp1) > CHR BP PoldPnew > 1 1 785989 0.9521 0.09278 > 2 1 1130727 0.4750

Re: [R] How to stack two Stack manhattan plots?

2020-06-10 Thread Jeff Newmiller
?dput We cannot tell how the columns are being stored in memory from your head() output. On June 10, 2020 1:36:11 PM PDT, Ana Marija wrote: >Hello, > >I have a data frame like this: > >> head(tmp1) > CHR BP PoldPnew >1 1 785989 0.9521 0.09278 >2 1 1130727 0.4750 0.19010 >3 1