GreenleafLab / ChrAccR

Analyzing chromatin accessibility data in R
https://GreenleafLab.github.io/ChrAccR/
18 stars 7 forks source link

What is the comparison order in Differential Analysis? A vs B...? #8

Closed c2b2pss closed 1 year ago

c2b2pss commented 2 years ago

Hi,

In the vignette it is difficult to determine the sample order in the differential analysis. For example, if A is untreated and B is treated, and if I wanted to compare what is upregulted in treated compared to untreated or B/A, do I specifiy c(A, B) or c(B, A)?

I the T cells example

diffCompNames <- [c](https://rdrr.io/r/base/c.html)(
  "TeffNaive_U vs TeffMem_U [sampleGroup]",
  "TCD8naive_U vs TCD8EM_U [sampleGroup]"
)
[setConfigElement](https://greenleaflab.github.io/ChrAccR/reference/setConfigElement.html)("differentialCompNames", diffCompNames)

...shows the naive is first, so is naive the control ?

Similarly, in the "Differential Analysis" it is somewhat obscure what order "stimulus" is compared....

# differential analysis option settings
[setConfigElement](https://greenleaflab.github.io/ChrAccR/reference/setConfigElement.html)("differentialColumns", [c](https://rdrr.io/r/base/c.html)("stimulus", "cellType"))
# adjust for the donor annotation in the differential test
[setConfigElement](https://greenleaflab.github.io/ChrAccR/reference/setConfigElement.html)("differentialAdjColumns", [c](https://rdrr.io/r/base/c.html)("donor"))
# create the report (takes ~18 min on the example dataset)
[createReport_differential](https://greenleaflab.github.io/ChrAccR/reference/createReport_differential,DsATAC-method.html)(dsa, reportDir)

....what is 'differntial columns' and where is it derived from?

Thannks!

demuellae commented 1 year ago

the first mentioned group will be the test group (numerator in the fold-change) and the second mentioned will be the control (denominator). I.e. in the vignette example TeffNaive_U is the test and TeffMem_U is the control group