This is a test version of Biostars. For the public version, visit https://www.biostars.org.
RnBeads Pairwise Differential Methylation Tables

I am trying to run the differential methylation portion of RnBeads with pairwise.all set. It seems to recognize the pairwise option but I can't find any trace of pairwise data/tables, the group analysis completed however.

diffmeth=rnb.execute.computeDiffMeth(rnb.set,cmp.cols,region.types=reg.types)

2016-04-01 13:30:11     1.4  STATUS             STARTED Retrieving comparison info
2016-04-01 13:30:11     1.4    INFO                 Conducting all pairwise comparisons for     columns: Sample_Group
2016-04-01 13:30:11     1.4    INFO                 All pairwise comparisons are performed on a subset of sample groupings. Caution: this could increase the runtime significantly
                                             due to combinatorial explosion.
2016-04-01 13:30:11     1.4  STATUS             COMPLETED Retrieving comparison info
2016-04-01 13:30:11     1.4  STATUS             STARTED Computing differential methylation tables
2016-04-01 13:30:11     1.4  STATUS                 STARTED Comparing: case vs. control (based on Sample_Group)
2016-04-01 13:30:11     1.4  STATUS                     STARTED Computing Differential Methylation Table (Site Level)
2016-04-01 13:30:11     1.4    INFO                         Conducting differential analysis using limma
2016-04-01 13:31:11     1.4    INFO                         2 p-values are NA. They are treated as 1 in FDR adjustment
2016-04-01 13:31:12     1.4  STATUS                     COMPLETED Computing Differential Methylation Table (Site Level)
2016-04-01 13:31:13     1.6  STATUS                     STARTED Computing Differential Methylation Tables (Region Level)
2016-04-01 13:32:07     1.4  STATUS                         Computed table for genes
2016-04-01 13:32:59     1.4  STATUS                         Computed table for promoters
2016-04-01 13:32:59     1.4  STATUS                     COMPLETED Computing Differential Methylation Tables (Region Level)
2016-04-01 13:32:59     1.4  STATUS                 COMPLETED Comparing: case vs. control (based on Sample_Group)
2016-04-01 13:32:59     1.4  STATUS             COMPLETED Computing differential methylation tables
Warning message:
Partial NA coefficients for 2 probe(s)



get.comparisons(diffmeth)
                                      cmp1
"case vs. control (based on Sample_Group)"

get.comparison.grouplabels(diffmeth)
                                         [,1]   [,2]
 case vs. control (based on Sample_Group) "case" "control"


comp = get.comparisons(diffmeth)[1]
genes = get.table(diffmeth,comp,"genes",return.data.frame=TRUE)
head(genes)

  mean.mean.g1 mean.mean.g2 mean.mean.diff mean.mean.quot.log2 comb.p.val
1    0.3319096    0.3327638  -0.0008541687         -0.04855929 0.74694255
2    0.8598768    0.8697039  -0.0098270964         -0.01620692 0.63655875
3    0.8392197    0.8507916  -0.0115719742         -0.01952629 0.62718633
4    0.8392197    0.8507916  -0.0115719742         -0.01952629 0.62718633
5    0.5970268    0.7803864  -0.1833596375         -0.38079799 0.04878414
6    0.8561410    0.8207098   0.0354311214          0.06025719 0.18745396
  comb.p.adj.fdr num.sites mean.num.na.g1 mean.num.na.g2 mean.mean.covg.g1
1      0.8191552         5              0              0              12.3
2      0.8051783         1              0              0              16.0
3      0.8051783         1              0              0              22.5
4      0.8051783         1              0              0              22.5
5      0.8051783         1              0              0              13.5
6      0.8051783         1              0              0              13.5
        mean.mean.covg.g2 mean.nsamples.covg.thresh.g1 mean.nsamples.covg.thresh.g2
 1              12.3                            2                            2
 2              12.5                            2                            2
 3              15.0                            2                            2
4              15.0                            2                            2
 5              10.5                            2                            2
6              15.0                            2                            2

I even tried running rnb.run.differential() and the same thing, just the groups difference tables are created. How can I get the pairwise data?

Marcus

pairwise methylation rnbeads

2 answers

Hi Marcus, Not sure I understand correctly. Could you clarify what you mean pairwise data? The "differential.comparison.columns.all.pairwise" option in RnBeads is to tell it to compare all pairs of groups in a given annotation column (in contrast to the default where it does one-vs-all comparisons). In your case you only seem to have two groups, so it would not make a difference.

Best, Fabian

Sorry, I should have replied directly to this. My reply is below.

I miss understood that. By pairwise I mean a pair of samples not pair of groups, so strictly 1 case vs 1 control. In my case an affected child vs an unaffected mother. When I tried to put just two samples in the sample_annotation file it does not run at all, it would not run with three samples either (1 case vs 2 controls, the two parents), when there is < 2 of either case or control at the 'Retrieving comparison info' part it fails. Ultimately, I have 3 cases and 3 controls (mothers), or 6 controls (mothers+fathers), but I am not completely sure that all 3 cases are of the same phenotype so I was trying to find a quick way of doing the 3 cases vs their 3 controls separately as pairs of samples, or separately as family trios, to supplement the original analysis of group 1 vs group 2, with the 3 cases and controls in their respective groups.

Log in to answer this question.