Skip to content

How to input paired design pt.2 #5

@MingL196

Description

@MingL196

(Note: I also put the question under #3 "How to input paired design", but realized that I couldn't reopen the issue)

Hi,

I am a bit confused about using adjust.var to specify a paired design experiment.

In our experiment, we have 19 case-control pairs. Each case control pair has similar ages. For example:

paired_subject sample group (case/control)
1 1001 1
1 1002 0
2 1003 1
2 1004 0

We would like to set up pairwise comparisons:

subject_1 sample_1 group_1 compare_to subject_2 sample_2 group_2
1 1001 1 <-> 1 1002 0
2 1003 1 <-> 2 1004 0

You previously recommended that I add the pair variable by using the option adjust.var="paired_subject".

In your paper https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4705678/ , you wrote that:
"In MethylAction, the first stage performs the negative binomial test from DESeq (33) for each pairwise comparison."

However, your first stage function (analysis.r, line 72) doesn't use the variable adjust.var at all, and as such wouldn't have the pair data to perform pairwise comparisons. In fact, adjust.var seems to only be used as a covariate in stage 2 testing.

  1. Is adjust.var using the "paired_subject" variable as covariate or as pairing data?
    I.e. in mixed model terms, is adjust.var specifying a fixed effect or a random effect?

  2. How does Methylaction distinguish between covariate and pairing data?


By the way, should the variable
counts
in lines 508-513 of analysis.r be
counts[rows,,drop=F]
?


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions