Question: Gviz: axes related parameters
0
5.6 years ago by
Maxim170
Maxim170 wrote:
Hi, since very recently I'm using Gviz for plotting coverage vectors from ChIP-seq data. I would like to stick to it as it draws gene models much nicer than my previous attempts drawing them with my own plotting functions. I wonder whether it is possible to have mountain/polygon or histogram tracks with a continuous x-axis that indeed cuts the y-axis, at best in the same color as the y-axis? This is because I personally like the Gviz plots a lot but my boss expects me to produce typical plots with a standard x/y coordinate system! Best Maxim [[alternative HTML version deleted]]
coverage gviz • 1.2k views
modified 5.6 years ago by Steve Lianoglou12k • written 5.6 years ago by Maxim170
0
5.6 years ago by
Denali
Steve Lianoglou12k wrote:
Hi, On Mon, Feb 24, 2014 at 7:03 AM, Maxim <deeepersound at="" googlemail.com=""> wrote: > Hi, > > since very recently I'm using Gviz for plotting coverage vectors from > ChIP-seq data. I would like to stick to it as it draws gene models much > nicer than my previous attempts drawing them with my own plotting > functions. I wonder whether it is possible to have mountain/polygon or > histogram tracks with a continuous x-axis that indeed cuts the y-axis, at > best in the same color as the y-axis? This is because I personally like the > Gviz plots a lot but my boss expects me to produce typical plots with a > standard x/y coordinate system! Can you give a concrete example of what you mean? I'm having a hard time understanding what "cuts the y-axis" means. Perhaps you could provide graphic of how gviz plots your data now, and another (perhaps using photoshop) of you you'd like it to look like. -steve -- Steve Lianoglou Computational Biologist Genentech
Hi, sorry, you're of course right, my question not phrased correctly. I didn't mean "cut", rather cross, better intersect, i.e. a typical coordinate system, where x and y intersect at coordinate (0,0), e.g.: http://en.wikipedia.org/wiki/File:Cartesian-coordinate-system.svg (of course without negative x-values) In contrast to this, all my efforts to plot with Gviz resulted in plots without any x-axis, so my actual question is: how to draw an x-axis in a gviz polygon, mountain or histogram plot? In the documentation I couldn't find any parameter that allows setting x-axis related parameters (e.g. color, where is the intersection with y-axis, ticks ...), nor does the manual show an example that would suggest this is possible. But perhaps I'm just looking for the wrong descriptions. Furthermore I aim at an axis, that indeed intersects the y-axis, e.g. a plot like plot(1,frame.plot=T) does, whereas plot(1,frame.plot=F) does not. The latter aspect is not that important, having the x-axis (in the same color as the y-axis) is most important! Thank you for your efforts! Best Maxim 2014-02-24 18:28 GMT+01:00 Steve Lianoglou <lianoglou.steve@gene.com>: > Hi, > > On Mon, Feb 24, 2014 at 7:03 AM, Maxim <deeepersound@googlemail.com> > wrote: > > Hi, > > > > since very recently I'm using Gviz for plotting coverage vectors from > > ChIP-seq data. I would like to stick to it as it draws gene models much > > nicer than my previous attempts drawing them with my own plotting > > functions. I wonder whether it is possible to have mountain/polygon or > > histogram tracks with a continuous x-axis that indeed cuts the y-axis, at > > best in the same color as the y-axis? This is because I personally like > the > > Gviz plots a lot but my boss expects me to produce typical plots with a > > standard x/y coordinate system! > > Can you give a concrete example of what you mean? I'm having a hard > time understanding what "cuts the y-axis" means. > > Perhaps you could provide graphic of how gviz plots your data now, > and another (perhaps using photoshop) of you you'd like it to look > like. > > -steve > > -- > Steve Lianoglou > Computational Biologist > Genentech > [[alternative HTML version deleted]]
Hi Maxim, Perhaps you should read the package vignette more carefully given that you had indeed read it, say the first subsection of Track classes maybe. Since you had never shown us what you had done with any Gviz related codes. And regarding the cross which you think is important, someone correct me if I am wrong, you will never get it with Gviz. Those stacking tracks are never mean to be overlapping. Here is my 2ct if color is all you / your boss want, data(twoGroups) dTrack <- DataTrack(twoGroups, name = "uniform", type='polygon', col.axis='red', background.title = "white") axisTrack <- GenomeAxisTrack(col='red', fontcolor="red") plotTracks(list(dTrack, axisTrack)) HTH, Dan On Mon, 2014-02-24 at 20:30 +0100, Maxim wrote: > Hi, > > sorry, you're of course right, my question not phrased correctly. I didn't > mean "cut", rather cross, better intersect, i.e. a typical coordinate > system, where x and y intersect at coordinate (0,0), e.g.: > > http://en.wikipedia.org/wiki/File:Cartesian-coordinate-system.svg (of > course without negative x-values) > > In contrast to this, all my efforts to plot with Gviz resulted in plots > without any x-axis, so my actual question is: > > how to draw an x-axis in a gviz polygon, mountain or histogram plot? In the > documentation I couldn't find any parameter that allows setting x-axis > related parameters (e.g. color, where is the intersection with y-axis, > ticks ...), nor does the manual show an example that would suggest this is > possible. But perhaps I'm just looking for the wrong descriptions. > > Furthermore I aim at an axis, that indeed intersects the y-axis, e.g. a > plot like > > plot(1,frame.plot=T) > > does, whereas > > plot(1,frame.plot=F) > > does not. The latter aspect is not that important, having the x-axis (in > the same color as the y-axis) is most important! > > Thank you for your efforts! > Best > Maxim > > > 2014-02-24 18:28 GMT+01:00 Steve Lianoglou <lianoglou.steve at="" gene.com="">: > > > Hi, > > > > On Mon, Feb 24, 2014 at 7:03 AM, Maxim <deeepersound at="" googlemail.com=""> > > wrote: > > > Hi, > > > > > > since very recently I'm using Gviz for plotting coverage vectors from > > > ChIP-seq data. I would like to stick to it as it draws gene models much > > > nicer than my previous attempts drawing them with my own plotting > > > functions. I wonder whether it is possible to have mountain/polygon or > > > histogram tracks with a continuous x-axis that indeed cuts the y-axis, at > > > best in the same color as the y-axis? This is because I personally like > > the > > > Gviz plots a lot but my boss expects me to produce typical plots with a > > > standard x/y coordinate system! > > > > Can you give a concrete example of what you mean? I'm having a hard > > time understanding what "cuts the y-axis" means. > > > > Perhaps you could provide graphic of how gviz plots your data now, > > and another (perhaps using photoshop) of you you'd like it to look > > like. > > > > -steve > > > > -- > > Steve Lianoglou > > Computational Biologist > > Genentech > > > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
Hi, thanks for the information, the plot suggested by you is exactly what I have right now! Actually I like the plots that I was able to produce with Gviz a lot. http://postimg.org/image/u9cs7014f/ The code was produced using a wrapper function, the relevant part producing the DataTracks looks like: x<-GeneRegionTrack(txdb,chromosome = coords$chr,start=coords$start,end=coords$end,showId = TRUE,geneSymbols=TRUE,name = "Gene Model",col.sampleNames="black" ,background.title="white",col.axis="black",col.title="black",col=1,fil l=1 ,fontfamily="Helvetica") axisTrack <- GenomeAxisTrack() ### this happens in a loop myDataTrack[[i+2]]<-DataTrack(data = bDat[[i]][,2],start=bDat[[i]][,1 ],end=bDat[[i]][,1],chromosome=coords$chr,genome="hg19" ,name=myNames[c],ylim=c(mn,mx),type="polygon",fill .mountain=c(myCols[c],myCols[c]),col.mountain=myCols[c],col.sampleName s= "black",background.title="white",col.axis="black",col.title="black") ### then plot myDataTrack[[1]]<-x myDataTrack[[2]]<-axisTrack plotTracks(myDataTrack,chromosome = coords$chr,from=coords$start,to=coords$end) Similar to my plots your plot has no real X-axis - I can live with that, but my boss obviously thinks that quantitative data like this is best shown in a classical x/y-plot (having a real x-axis, same color and style as y-axis with both axes crossing). I will try to convince him that this is not necessary. Best Maxim 2014-02-25 10:24 GMT+01:00 Dan Du <tooyoung@gmail.com>: > Hi Maxim, > > Perhaps you should read the package vignette more carefully given that > you had indeed read it, say the first subsection of Track classes maybe. > Since you had never shown us what you had done with any Gviz related > codes. > > And regarding the cross which you think is important, someone correct me > if I am wrong, you will never get it with Gviz. Those stacking tracks > are never mean to be overlapping. > > Here is my 2ct if color is all you / your boss want, > > data(twoGroups) > dTrack <- DataTrack(twoGroups, name = "uniform", type='polygon', > col.axis='red', background.title = "white") > axisTrack <- GenomeAxisTrack(col='red', fontcolor="red") > plotTracks(list(dTrack, axisTrack)) > > HTH, > Dan > > > On Mon, 2014-02-24 at 20:30 +0100, Maxim wrote: > > Hi, > > > > sorry, you're of course right, my question not phrased correctly. I > didn't > > mean "cut", rather cross, better intersect, i.e. a typical coordinate > > system, where x and y intersect at coordinate (0,0), e.g.: > > > > http://en.wikipedia.org/wiki/File:Cartesian-coordinate-system.svg (of > > course without negative x-values) > > > > In contrast to this, all my efforts to plot with Gviz resulted in plots > > without any x-axis, so my actual question is: > > > > how to draw an x-axis in a gviz polygon, mountain or histogram plot? In > the > > documentation I couldn't find any parameter that allows setting x-axis > > related parameters (e.g. color, where is the intersection with y-axis, > > ticks ...), nor does the manual show an example that would suggest this > is > > possible. But perhaps I'm just looking for the wrong descriptions. > > > > Furthermore I aim at an axis, that indeed intersects the y-axis, e.g. a > > plot like > > > > plot(1,frame.plot=T) > > > > does, whereas > > > > plot(1,frame.plot=F) > > > > does not. The latter aspect is not that important, having the x-axis (in > > the same color as the y-axis) is most important! > > > > Thank you for your efforts! > > Best > > Maxim > > > > > > 2014-02-24 18:28 GMT+01:00 Steve Lianoglou <lianoglou.steve@gene.com>: > > > > > Hi, > > > > > > On Mon, Feb 24, 2014 at 7:03 AM, Maxim <deeepersound@googlemail.com> > > > wrote: > > > > Hi, > > > > > > > > since very recently I'm using Gviz for plotting coverage vectors from > > > > ChIP-seq data. I would like to stick to it as it draws gene models > much > > > > nicer than my previous attempts drawing them with my own plotting > > > > functions. I wonder whether it is possible to have mountain/polygon > or > > > > histogram tracks with a continuous x-axis that indeed cuts the > y-axis, at > > > > best in the same color as the y-axis? This is because I personally > like > > > the > > > > Gviz plots a lot but my boss expects me to produce typical plots > with a > > > > standard x/y coordinate system! > > > > > > Can you give a concrete example of what you mean? I'm having a hard > > > time understanding what "cuts the y-axis" means. > > > > > > Perhaps you could provide graphic of how gviz plots your data now, > > > and another (perhaps using photoshop) of you you'd like it to look > > > like. > > > > > > -steve > > > > > > -- > > > Steve Lianoglou > > > Computational Biologist > > > Genentech > > > > > > > [[alternative HTML version deleted]] > > > > _______________________________________________ > > Bioconductor mailing list > > Bioconductor@r-project.org > > https://stat.ethz.ch/mailman/listinfo/bioconductor > > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > > > [[alternative HTML version deleted]] ADD REPLYlink written 5.6 years ago by Maxim170 Hi Maxim, I am not sure I understand why you claim there is no horizontal axis on these plots. The GenomeAxisTrack shows the only 'x-axis' information that is relevant to these data, and there is one right there in the plot! What more information could possibly be conveyed to your boss or potential manuscript readers by repeating the same information six times in the DataTrack? Best, Jim On Tuesday, February 25, 2014 8:35:46 AM, Maxim wrote: > Hi, > > thanks for the information, the plot suggested by you is exactly what I > have right now! > Actually I like the plots that I was able to produce with Gviz a lot. > > http://postimg.org/image/u9cs7014f/ > > The code was produced using a wrapper function, the relevant part producing > the DataTracks looks like: > > x<-GeneRegionTrack(txdb,chromosome = > coords$chr,start=coords$start,end=coords$end,showId = > TRUE,geneSymbols=TRUE,name = "Gene Model",col.sampleNames="black" > ,background.title="white",col.axis="black",col.title="black",col=1,f ill=1 > ,fontfamily="Helvetica") > > axisTrack <- GenomeAxisTrack() > > ### this happens in a loop > > myDataTrack[[i+2]]<-DataTrack(data = bDat[[i]][,2],start=bDat[[i]][,1 > ],end=bDat[[i]][,1],chromosome=coords$chr,genome="hg19" > ,name=myNames[c],ylim=c(mn,mx),type="polygon",fill > .mountain=c(myCols[c],myCols[c]),col.mountain=myCols[c],col.sampleNa mes= > "black",background.title="white",col.axis="black",col.title="black") > > > ### then plot > > myDataTrack[[1]]<-x > > myDataTrack[[2]]<-axisTrack > > plotTracks(myDataTrack,chromosome = > coords$chr,from=coords$start,to=coords$end) > > > > > > Similar to my plots your plot has no real X-axis - I can live with that, > but my boss obviously thinks that quantitative data like this is best shown > in a classical x/y-plot (having a real x-axis, same color and style as > y-axis with both axes crossing). I will try to convince him that this is > not necessary. > > > > Best > > Maxim > > > > > > 2014-02-25 10:24 GMT+01:00 Dan Du <tooyoung at="" gmail.com="">: > >> Hi Maxim, >> >> Perhaps you should read the package vignette more carefully given that >> you had indeed read it, say the first subsection of Track classes maybe. >> Since you had never shown us what you had done with any Gviz related >> codes. >> >> And regarding the cross which you think is important, someone correct me >> if I am wrong, you will never get it with Gviz. Those stacking tracks >> are never mean to be overlapping. >> >> Here is my 2ct if color is all you / your boss want, >> >> data(twoGroups) >> dTrack <- DataTrack(twoGroups, name = "uniform", type='polygon', >> col.axis='red', background.title = "white") >> axisTrack <- GenomeAxisTrack(col='red', fontcolor="red") >> plotTracks(list(dTrack, axisTrack)) >> >> HTH, >> Dan >> >> >> On Mon, 2014-02-24 at 20:30 +0100, Maxim wrote: >>> Hi, >>> >>> sorry, you're of course right, my question not phrased correctly. I >> didn't >>> mean "cut", rather cross, better intersect, i.e. a typical coordinate >>> system, where x and y intersect at coordinate (0,0), e.g.: >>> >>> http://en.wikipedia.org/wiki/File:Cartesian-coordinate-system.svg (of >>> course without negative x-values) >>> >>> In contrast to this, all my efforts to plot with Gviz resulted in plots >>> without any x-axis, so my actual question is: >>> >>> how to draw an x-axis in a gviz polygon, mountain or histogram plot? In >> the >>> documentation I couldn't find any parameter that allows setting x-axis >>> related parameters (e.g. color, where is the intersection with y-axis, >>> ticks ...), nor does the manual show an example that would suggest this >> is >>> possible. But perhaps I'm just looking for the wrong descriptions. >>> >>> Furthermore I aim at an axis, that indeed intersects the y-axis, e.g. a >>> plot like >>> >>> plot(1,frame.plot=T) >>> >>> does, whereas >>> >>> plot(1,frame.plot=F) >>> >>> does not. The latter aspect is not that important, having the x-axis (in >>> the same color as the y-axis) is most important! >>> >>> Thank you for your efforts! >>> Best >>> Maxim >>> >>> >>> 2014-02-24 18:28 GMT+01:00 Steve Lianoglou <lianoglou.steve at="" gene.com="">: >>> >>>> Hi, >>>> >>>> On Mon, Feb 24, 2014 at 7:03 AM, Maxim <deeepersound at="" googlemail.com=""> >>>> wrote: >>>>> Hi, >>>>> >>>>> since very recently I'm using Gviz for plotting coverage vectors from >>>>> ChIP-seq data. I would like to stick to it as it draws gene models >> much >>>>> nicer than my previous attempts drawing them with my own plotting >>>>> functions. I wonder whether it is possible to have mountain/polygon >> or >>>>> histogram tracks with a continuous x-axis that indeed cuts the >> y-axis, at >>>>> best in the same color as the y-axis? This is because I personally >> like >>>> the >>>>> Gviz plots a lot but my boss expects me to produce typical plots >> with a >>>>> standard x/y coordinate system! >>>> >>>> Can you give a concrete example of what you mean? I'm having a hard >>>> time understanding what "cuts the y-axis" means. >>>> >>>> Perhaps you could provide graphic of how gviz plots your data now, >>>> and another (perhaps using photoshop) of you you'd like it to look >>>> like. >>>> >>>> -steve >>>> >>>> -- >>>> Steve Lianoglou >>>> Computational Biologist >>>> Genentech >>>> >>> >>> [[alternative HTML version deleted]] >>> >>> _______________________________________________ >>> Bioconductor mailing list >>> Bioconductor at r-project.org >>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>> Search the archives: >> http://news.gmane.org/gmane.science.biology.informatics.conductor >> >> >> > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- James W. MacDonald, M.S. Biostatistician University of Washington Environmental and Occupational Health Sciences 4225 Roosevelt Way NE, # 100 Seattle WA 98105-6099
0
5.6 years ago by
ying chen340
ying chen340 wrote:
Hi guys, I encounter this kind question quite a few times now and never have a good answer. Say we have the expression data (microarray or RNAseq) of gene A for both tumor and normal samples. The task is to detect how many tumor samples have gene A over-expressed. I had tried to use mean+2*stdev of normal samples, Q3+3*IQR of normal samples as cutoffs. But depending on normal sample data distribution, one cut-off could be more stringent in one case, but less stringent in another case. Your guys must have met this kind question before, what kind cutoff do you use and why? What do you do when you have very few (1,2,3,4,..) or no normal samples? Thanks, Ying [[alternative HTML version deleted]]