lmweber / diffcyt

R package for differential discovery analyses in high-dimensional cytometry data
MIT License
19 stars 12 forks source link

design & constrast matrix #41

Open cr2106 opened 2 years ago

cr2106 commented 2 years ago

Hi,

I'm running diffcyt via catalyst and I have some problems in setting up the design and contrast matrix. I have 144 samples divided into 4 conditions. I set up the code like this:

design <- createDesignMatrix(ei(sce), cols_design = "cond1") contrast <- createContrast(c(0,0,0,1 ))

since I would like to compare to the last condition/group. However, even after reading the tutorials, I'm not sure I understood it correctly:

Thank you very much in advance!!

Pancreatologist commented 10 months ago

Hi,

I'm running diffcyt via catalyst and I have some problems in setting up the design and contrast matrix. I have 144 samples divided into 4 conditions. I set up the code like this:我正在通过催化剂运行 diffcyt,但在设置设计和对比度矩阵时遇到了一些问题。我有 144 个样本,分为 4 个条件。我设置了这样的代码:

design <- createDesignMatrix(ei(sce), cols_design = "cond1") contrast <- createContrast(c(0,0,0,1 ))

since I would like to compare to the last condition/group. However, even after reading the tutorials, I'm not sure I understood it correctly:因为我想与最后一个条件/组进行比较。但是,即使阅读了教程,我也不确定我是否正确理解了它:

  • What determines the length of the contrast matrix?
  • Does it make sense to highlight the condition I want to compare?

Thank you very much in advance!!

Hi, have you solved this issue? I also face it.

SamGG commented 10 months ago

Hi,

The design and contrast matrix are quite generic as diffcyt is calling edgeR. Maybe you would get more audience on Bioconductor support forum. Concerning the original question, it's unclear to what conditions the 4th condition will be compared to.

You would find a complete information in designmatrices.html. Thanks to your question, I have just noticed ExploreModelMatrix package and its vignette.

Best.

Pancreatologist commented 10 months ago

Hi,

The design and contrast matrix are quite generic as diffcyt is calling edgeR. Maybe you would get more audience on Bioconductor support forum. Concerning the original question, it's unclear to what conditions the 4th condition will be compared to.设计和对比度矩阵非常通用,因为 diffcyt 调用 edgeR。也许你会在Bioconductor支持论坛上获得更多的观众。关于最初的问题,目前尚不清楚第四个条件将与什么条件进行比较。

You would find a complete information in designmatrices.html. Thanks to your question, I have just noticed ExploreModelMatrix package and its vignette.

Best.

Hi Sam, thank you so much. As you said, if there are 4 groups (1,2,3,4), and we contrast 1 and 2, should I use the following code: contrast <- createContrast(c(1,-1,0,0)) to make the contrast which is suitable for diffcyt function? Thanks again.

SamGG commented 10 months ago

It sounds good.