Question: How to calculate delta CT in R for miRNA data
0
gravatar for myyid68
16 days ago by
myyid6830
myyid6830 wrote:

Hello,

I'm trying to learn how to analyze miRNA data in R and I'm a bit confused about what the proper way to calculate delta Ct and delta delta CT are.. I have a dataframe with the first column being the miRNA, second column is Task (target/control) and then I have the samples (10 columns: 5 treatment groups and 5 control groups). I've been trying to find examples with data similar to mine for how to compute the delta CT but haven't found anything helpful so far. Could someone please help me by providing a simple example calculation for a dataset similar to mine,for delta CT and delta delta CT? Do I calculate the mean for every column and then subtract the mean from each value in the column to get the delta CT or how does it work?


Edit:

I have something that looks like this:

miRNA<-c("hsa-miR-10a-4373153", "hsa-miR-10b-4395329", "MammU6-4395470", "MammU6-4395470", "hsa-miR-15a-4373123")

Task<-c("Target", "Target", "Control", "Control", "Target")
C1<-c(28.005966, 30.806433, 17.341375, 17.40666, 30.039436)
T2<-c(30.973469, 29.236025, 30.41161, 20.914383, 20.904331)
C3<-c(26.322796, 25.542833, 22.460772, 19.972183, 30.409641)
T4<-c(26.441898, 25.837685, 23.158352, 20.379173, 33.81327)
C5<-c(39.750206, 19.901133, 28.180124, 22.668673, 25.748884)
T6<-c(23.004385, 28.472675, 23.81621, 26.433413, 28.851719)
T7<-c(22.239546, 28.741674, 23.754929, 26.015385, 28.16368)
T8<-c(29.590443, 30.041988, 21.323061, 24.272501, 18.099016)
C9<-c(15.856442, 22.64224, 29.629637, 25.374926, 22.356894)
C10<-c(38.137985, 24.753338, 26.986668, 24.578161, 19.223558)
data<-data.frame(miRNA, Task, C1, T2, C3, T4, C5, T6, T7, T8, C9, C10)

where C1, C3,..C10 are the control samples and T2, T4,...T8 are the treatment samples.

delta ct mirna R • 149 views
ADD COMMENTlink modified 15 days ago • written 16 days ago by myyid6830
2

Thanks for formatting the code properly. Next time please either edit your original post or reply to mine but don't add a comments. Comments are for answers.

Question: what is Task for?

edit: I think the pcr package is a good start for you. It has good documentation: https://cran.r-project.org/web/packages/pcr/vignettes/qpcr_analysis.html

But I realise you are asking HOW to calculate deltaCT and this doesn't answer your question. The issue is I'm not seeing your experimental design or rather I'm not understanding your data. If you elaborate we can help you some more.

ADD REPLYlink modified 16 days ago • written 16 days ago by Amar620

Thank you for the suggestions, Amar! I'm trying to understand the data myself since I haven't dealt with miRNA data before. Basically, I think the Task column (Target /Control) represents the target gene vs housekeeping gene? I'm just trying to clarify what is the right way to calculate delta CT and delta delta CT based on this specific dataset I have, since the various posts/articles I've read have honestly just left me even more confused..

ADD REPLYlink written 15 days ago by myyid6830
1

Can you please edit the title of your question? "Delta CT in R" is very meaningless.

Quoting from How To Ask Good Questions On Technical And Scientific Forums

Choose a good title: It should be brief and precise. A good title will help you attract more people and get answers faster. It will also help other users decide if they are likely to be able to help you without having to read the whole message. An ideal title should be a single sentence and contain all the elements needed to understand what you are going to ask. Titles can be declarative (“Looking for a tool to convert fasta sequences to EMBL”), interrogative (“What is the best way to convert a sequence from fasta to EMBL”), or compound (“Converting fasta files to EMBL: which are the best tools?”). Look at existing questions that have received multiple good responses and use their style as an example.

ADD REPLYlink modified 16 days ago • written 16 days ago by lakhujanivijay4.6k

Thank you for the suggestion, I have made the change. Hopefully, the new title is more appropriate.

ADD REPLYlink written 15 days ago by myyid6830
1

Does this help? - A: How to report and plot qPCR data

ADD REPLYlink written 16 days ago by Kevin Blighe52k

That's extremely helpful, thank you Kevin! I have asked this question in my reply to dsull as well but just to confirm, if I follow your calculation steps in the link and apply that algorithm to my dataset, I'd basically have 2 delta CTs for each gene, right? One for the C samples and one for the T sample? And then the delta delta CT for that gene would just be the difference between the two deltas, correct? And finally, if let's say I wanted to perform a Limma test to compare the C and T groups, I assume the test would have to be performed using those delta CT values, right?

ADD REPLYlink written 15 days ago by myyid6830

Replied to your comment in my answer below.

ADD REPLYlink written 14 days ago by dsull550
4
gravatar for dsull
16 days ago by
dsull550
UCLA
dsull550 wrote:

Personally, I'd just use spreadsheet software (e.g. Excel) to analyze this type of data. It might make more sense if you're just starting off.

I'll assume that Targets are your genes (miRNAs) of interest and Control is your housekeeping genes? If so, for each sample, take each Target and subtract from it the average of the Control for that sample. You'll then have the delta Ct values for gene in each sample.

In the example of sample C1:

hsa-miR-10a-4373153 delta Ct: 28.005966 - (17.341375 + 17.40666)/2 = 10.632

hsa-miR-10b-4395329 delta Ct: 30.80643 - (17.341375 + 17.40666)/2 = 13.432

hsa-miR-15a-4373123 delta Ct: 30.03944 - (17.341375 + 17.40666)/2 = 12.665

Do that for all your samples. Then compute the delta delta Ct, which is the -log2FoldChange, following Kevin's post above.

Edit: Be wary, I see that the expression of your two control (housekeeping) genes vary extremely widely so I don't think they are good internal controls.

ADD COMMENTlink modified 16 days ago • written 16 days ago by dsull550

Thank you dsull, this is really helpful.Yes, I think that the Targets are my genes of interest and Control is the housekeeping gene. Just to make sure I understand this correctly, according to Kevin's post linked above, would the calculations be as follows:

hsa-miR-10a-4373153 delta Ct in C1, C3, C5, C9, C10 (control) samples: [(28.005966+26.322796+39.750206+15.856442+38.137985)/5] - [(17.341375+22.460772+28.180124+29.629637+26.986668)/5] = 4.69

hsa-miR-10a-4373153 delta Ct in T2, T4, T6, T7, T8 (treatment) samples: [(30.973469+26.441898+23.004385+22.239546+29.590443)/5] - [(30.41161+23.158352+23.81621+23.754929+21.323061)/5] = 1.95

and so on for the other genes. This means that for each gene, I'll have two delta CT(one for the C samples and one for the T samples), correct?

Then delta delta CT for hsa-miR-10a-4373153 is: 1.95-4.69 = -2.74 (this is also -log2FC) And finally, 2 ^ (- ddCt) = 2 ^ (2.74) = 6.68

Have I understood this correctly? And finally, the calculations above are for the case when you have just one housekeeping gene but I have two. Does that mean that I have to average their values first like this:

MammU6-4395470 for C1: (17.341375+17.40666)/2 = 17.37

MammU6-4395470 for T2: (30.41161+20.914383)/2 = 25.66 and so on. And then just use these new averaged values for the delta CT calculations?

Thank you!

ADD REPLYlink modified 15 days ago • written 15 days ago by myyid6830
2

Correct, you'd have a mean delta Ct for your controls and a mean delta Ct for your treatments.

And yes, subtracting gives you the delta delta Ct.

And I'd usually say yes to averaging your housekeeping genes but in this case, your housekeeping genes are unreliable. It doesn't make sense that in one sample, both genes are around the same Ct but in another sample, one gene is way higher than the other. I'd recommend figuring out why this is, or finding better internal controls, before proceeding further.

ADD REPLYlink written 14 days ago by dsull550
1

Great, thank you again, that clears it all up!

ADD REPLYlink written 14 days ago by myyid6830
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1892 users visited in the last hour