[BioC] how to make line graph

Alex Gutteridge alexg at ruggedtextile.com
Mon Mar 5 15:31:11 CET 2012


On 05.03.2012 14:13, Dana.Stanley at csiro.au wrote:
> Thanks Jim!!!
>
> I have a list of genes that follow specific pattern coming from
> co-expressed network module I did in WGCNA. I subsetted the original
> eset to contain only genes from my modules of interest and now I want
> to see the pattern of expression of the genes from each subset across
> all of my samples (1040 arrays)  as a line graph. I want to show how
> they always "move together" across over a 1000 samples and make
> distinct pattern of expression. I expect all genes to overlap in
> expression so I should see a stream of genes moving across the 
> samples
> and I should see two streams of genes; positively coexpressed and
> negatively coexpressed should move in the opposite direction like a
> mirror image of one another.  I have done other plots like heatmap 
> but
> the line graph is the best for this kind of module pattern
> comparisons... I tried to use  plot(x, y)  but  I do not know how to
> specify that my x is all of the samples from Eset and y is all
> expression values of the all genes. If I could find!
>   an example in literature or just the name of the package to use I
> could work it out.    The good example of what I want is in
> http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3142134/?tool=pubmed
> figures 1 and 2.
> Thanks
> Dana

Hi Dana

Does this example code represent something like what you're after?

m = matrix(rnorm(1000),ncol=10)
plot(1:10,m[1,],type="l",ylim=c(-2,2),xlab="Samples",ylab="Expression")
for(i in 2:100){
   lines(1:10,m[i,])
}

I know the mfuzz package produces similar plots, but I don't think it's 
a general solution.Also, in my experience you will often want to scale 
the expression values first in some way, depending on the patterns you 
are seeing.

Alex Gutteridge

>
> -----Original Message-----
> From: James W. MacDonald [mailto:jmacdon at uw.edu]
> Sent: Monday, March 05, 2012 11:53 PM
> To: Stanley, Dana (LI, Geelong AAHL)
> Cc: bioconductor at r-project.org
> Subject: Re: [BioC] how to make line graph
>
> Hi Dana,
>
> On 3/1/2012 6:21 PM, Dana.Stanley at csiro.au wrote:
>> Dear All
>>
>> I am trying to make a nice line chart using subset of my eset. I 
>> have been trying all night but I did not get very far, it does not 
>> seem to be as popular as other charts in Bioconductor literature. I 
>> just could not find any examples. Can anyone help me with this? Which 
>> package to use and sample code would be great.
>
> You need to give us more to go on. What exactly are you trying to do?
> What have you tried? What sort of errors or unexpected results did
> you get? Try to think about your question from the point of view of
> someone who has no idea what you are trying to accomplish, and go 
> from
> there.
>
> Best,
>
> Jim
>
>
>>
>> Thanks
>> Dana
>>
>> 	[[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
>
> _______________________________________________
> 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

-- 
Alex Gutteridge



More information about the Bioconductor mailing list