HTqPCR plotting groups of interest
1
0
Entering edit mode
Simon Melov ▴ 340
@simon-melov-266
Last seen 9.6 years ago
If anyone can help, it would be great. I want to plot different groups of interest in HTqPCR using some of the plot functions, and I've played around with plotting different ways a number of times, and cant get the plot functions in HTqPCR to display what I want. I've a large number of groups, and dont want to plot everything every time (plotting everything works just fine after Heidi's help). #the plate6 CSV file links the sample ID to the group (Treatment) it belongs to# >plate6=read.csv("PlateG6.csv", header=TRUE, as.is=TRUE) > head(plate6) Sample Treatment 1 NTC NTC 2 L29 LFY 3 M10 MMO 4 C30 CFY 5 S15 SFO 6 S28 SMY > group6=as.vector(t(plate6$Treatment)) > sample6=as.vector(t(plate6$Sample)) > raw6=readCtData(files="Chip6NTC.csv", format="BioMark", n.features=48, n.data=48, samples=sample6) > g=featureNames(raw6)[1] > g [1] "TUB" > plotCtOverview(raw6, genes=g, col=rainbow(48), group=group6, Legend=FALSE) #works fine, plots the first gene Tubulin nicely, however, now I want to compare my NTC group with my LFY group (listed in "Treatment" above)# #I've tried the below to just plot one group, the "NTC" group, and it doesnt work (I'm not clear why, whatever is being plotted is not correct), # #not sure how to plot just two groups with this function (or three, or however many I want)# >plotCtOverview(raw6, genes=g, col=rainbow(48), group=group6[1], legend=FALSE) thanks in advance Simon
HTqPCR HTqPCR • 1.1k views
ADD COMMENT
0
Entering edit mode
Heidi Dvinge ★ 2.0k
@heidi-dvinge-2195
Last seen 9.6 years ago
Hi Simon, > If anyone can help, it would be great. > > I want to plot different groups of interest in HTqPCR using some of the > plot functions, and I've played around with plotting different ways a > number of times, and cant get the plot functions in HTqPCR to display what > I want. I've a large number of groups, and dont want to plot everything > every time (plotting everything works just fine after Heidi's help). > > #the plate6 CSV file links the sample ID to the group (Treatment) it > belongs to# > >plate6=read.csv("PlateG6.csv", header=TRUE, as.is=TRUE) >> head(plate6) > Sample Treatment > 1 NTC NTC > 2 L29 LFY > 3 M10 MMO > 4 C30 CFY > 5 S15 SFO > 6 S28 SMY >> group6=as.vector(t(plate6$Treatment)) >> sample6=as.vector(t(plate6$Sample)) >> raw6=readCtData(files="Chip6NTC.csv", format="BioMark", n.features=48, >> n.data=48, samples=sample6) >> g=featureNames(raw6)[1] >> g > [1] "TUB" >> plotCtOverview(raw6, genes=g, col=rainbow(48), group=group6, >> Legend=FALSE) > #works fine, plots the first gene Tubulin nicely, however, now I want to > compare my NTC group with my LFY group (listed in "Treatment" above)# Do you just want the Ct values of NTC relative to LFY? In that case have a look at the 'calibrator' parameter. As shown in the plotCtOverview examples, setting calibrator="LFY" will show all Ct values for other groups with LFY subtracted first. > #I've tried the below to just plot one group, the "NTC" group, and it > doesnt work (I'm not clear why, whatever is being plotted is not correct), > # > #not sure how to plot just two groups with this function (or three, or > however many I want)# > > >plotCtOverview(raw6, genes=g, col=rainbow(48), group=group6[1], > legend=FALSE) > The problem here is that you're inputting an object with 6 columns, but you're only providing link from 1 column to a group. On top of that, plotCtOverview has no way of knowing which of the six columns you mean. For plotting just some of your groups, you therefore need to subset your qPCRset object. For example: index > thanks in advance > > Simon
ADD COMMENT
0
Entering edit mode
Sorry all, pressed "send" too soon. > Hi Simon, > >> If anyone can help, it would be great. >> >> I want to plot different groups of interest in HTqPCR using some of the >> plot functions, and I've played around with plotting different ways a >> number of times, and cant get the plot functions in HTqPCR to display >> what >> I want. I've a large number of groups, and dont want to plot everything >> every time (plotting everything works just fine after Heidi's help). >> >> #the plate6 CSV file links the sample ID to the group (Treatment) it >> belongs to# >> >plate6=read.csv("PlateG6.csv", header=TRUE, as.is=TRUE) >>> head(plate6) >> Sample Treatment >> 1 NTC NTC >> 2 L29 LFY >> 3 M10 MMO >> 4 C30 CFY >> 5 S15 SFO >> 6 S28 SMY >>> group6=as.vector(t(plate6$Treatment)) >>> sample6=as.vector(t(plate6$Sample)) >>> raw6=readCtData(files="Chip6NTC.csv", format="BioMark", n.features=48, >>> n.data=48, samples=sample6) >>> g=featureNames(raw6)[1] >>> g >> [1] "TUB" >>> plotCtOverview(raw6, genes=g, col=rainbow(48), group=group6, >>> Legend=FALSE) >> #works fine, plots the first gene Tubulin nicely, however, now I want to >> compare my NTC group with my LFY group (listed in "Treatment" above)# > > Do you just want the Ct values of NTC relative to LFY? In that case have a > look at the 'calibrator' parameter. As shown in the plotCtOverview > examples, setting calibrator="LFY" will show all Ct values for other > groups with LFY subtracted first. > >> #I've tried the below to just plot one group, the "NTC" group, and it >> doesnt work (I'm not clear why, whatever is being plotted is not >> correct), >> # >> #not sure how to plot just two groups with this function (or three, or >> however many I want)# >> >> >plotCtOverview(raw6, genes=g, col=rainbow(48), group=group6[1], >> legend=FALSE) >> > The problem here is that you're inputting an object with *multiple* columns, but > you're only providing link from 1 column to a group. On top of that, > plotCtOverview has no way of knowing which of the six columns you mean. > > For plotting just some of your groups, you therefore need to subset your > qPCRset object. For example: > index <- group6 %in% c("SFY", "LFY", "CFY") plotCtOverview(raw6[,index], genes=g, col=rainbow(48), group=group6[index], Legend=FALSE) NOw you're limiting your data to these 3 groups, but you still have a column-to-group mapping for all your data. HTH \Heidi > > >> thanks in advance >> >> Simon > >
ADD REPLY
0
Entering edit mode
This worked great Heidi, thanks very much! It would be great if you could put this in the next update as an example. When you have a lot of groups, you dont want to plot them on every graph. Also, I think you have the color function set to only plot 10 colors as a default. People might be confused by that when you have more than 10 groups. You end up with 10 distinct colors for the first 10 columns, and the rest of the bars plotted have no color, I just assigned the number of colors to the number of groups used) thanks again! best s On Jul 3, 2012, at 1:53 PM, Heidi Dvinge wrote: > Sorry all, pressed "send" too soon. > >> Hi Simon, >> >>> If anyone can help, it would be great. >>> >>> I want to plot different groups of interest in HTqPCR using some of the >>> plot functions, and I've played around with plotting different ways a >>> number of times, and cant get the plot functions in HTqPCR to display >>> what >>> I want. I've a large number of groups, and dont want to plot everything >>> every time (plotting everything works just fine after Heidi's help). >>> >>> #the plate6 CSV file links the sample ID to the group (Treatment) it >>> belongs to# >>>> plate6=read.csv("PlateG6.csv", header=TRUE, as.is=TRUE) >>>> head(plate6) >>> Sample Treatment >>> 1 NTC NTC >>> 2 L29 LFY >>> 3 M10 MMO >>> 4 C30 CFY >>> 5 S15 SFO >>> 6 S28 SMY >>>> group6=as.vector(t(plate6$Treatment)) >>>> sample6=as.vector(t(plate6$Sample)) >>>> raw6=readCtData(files="Chip6NTC.csv", format="BioMark", n.features=48, >>>> n.data=48, samples=sample6) >>>> g=featureNames(raw6)[1] >>>> g >>> [1] "TUB" >>>> plotCtOverview(raw6, genes=g, col=rainbow(48), group=group6, >>>> Legend=FALSE) >>> #works fine, plots the first gene Tubulin nicely, however, now I want to >>> compare my NTC group with my LFY group (listed in "Treatment" above)# >> >> Do you just want the Ct values of NTC relative to LFY? In that case have a >> look at the 'calibrator' parameter. As shown in the plotCtOverview >> examples, setting calibrator="LFY" will show all Ct values for other >> groups with LFY subtracted first. >> >>> #I've tried the below to just plot one group, the "NTC" group, and it >>> doesnt work (I'm not clear why, whatever is being plotted is not >>> correct), >>> # >>> #not sure how to plot just two groups with this function (or three, or >>> however many I want)# >>> >>>> plotCtOverview(raw6, genes=g, col=rainbow(48), group=group6[1], >>> legend=FALSE) >>> >> The problem here is that you're inputting an object with *multiple* > columns, but >> you're only providing link from 1 column to a group. On top of that, >> plotCtOverview has no way of knowing which of the six columns you mean. >> >> For plotting just some of your groups, you therefore need to subset your >> qPCRset object. For example: >> > index <- group6 %in% c("SFY", "LFY", "CFY") > plotCtOverview(raw6[,index], genes=g, col=rainbow(48), > group=group6[index], Legend=FALSE) > > NOw you're limiting your data to these 3 groups, but you still have a > column-to-group mapping for all your data. > > HTH > \Heidi > >> >> >>> thanks in advance >>> >>> Simon >> >> > >
ADD REPLY

Login before adding your answer.

Traffic: 831 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6