Hi,
I need to plot microarray time course data so that the gene expression profiles of the top 100 genes are shown on the graph, with the curves labeled with the replicate probes (Information below).
I was able to draw the graph frames with the right titles and axes labels, but label on the curves did not have the right names, using the following code:
for(j in 1:12){
pch_value = as.character(targets$grp[6*j])
points(c(0, 6, 24, 48, 72,80), exprs.row[(6*j-1):(6*j)],
type='b', pch=pch_value)
Contrasts:
mc = makeContrasts("hr6-hr0","hr24-hr0","hr48-hr0","hr72-hr0","hr80-hr0","hr72-hr6", levels = X)
colnames(X) = c('hr0', 'hr24', 'hr48', 'hr6', 'hr72', 'hr80')
Replicate information:
Replicates (hr0 - 6 reps, hr 6 - 6reps, hr24-4reps, hr48-4reps,hr72-6reps, hr80-2reps) are in the following order :
hr0
hr0
hr6
hr6
hr24
hr24
hr48
hr48
hr72
hr72
hr0
hr0
hr6
hr6
hr24
hr24
hr48
hr48
hr72
hr72
hr80
hr80
hr0
hr0
hr6
hr6
hr72
hr72
I have tried maSigPro and timecourse; I was unable to set the correct contrasts using these two programs.
Help will be appreciated.
I am not totally sure what you mean with "label on the curves". The code does not handle plotting "curve labels" explicitly. You are plotting an affy expression set, correct? I recommend you post an image of how your plot looks, and mark in the plot where you want labels to appear. It might be best to control your plot options explicitly, see for example documentation of
legend
and alsoaxis
,par
, andtext
.Could you include output for X and mc. If you are having a labeling problem make sure to check your colnames after every step and especially before reassigning them
Thanks everyone. I have added more information as requested. My figure example is here: http://s23.postimg.org/bqcp67jaj/Rplot01_page_1.jpg
It's as if I'm plotting the wrong things. I just want to show how the other time profiles are different from hr0 for each ranked gene and perhaps, I do not really need to label the profile graphs and should just get rid of the 'h' that appears as labels. Any suggestions will be welcome.
mc and X are as follows:
Check that your
pch_value
is changing after every iteration. Also an alternative way could be to create a vector of values ahead of time and then dopch=pch_vector[j]