statOmics/tradeSeq

associationTest for multiple conditions

Closed this issue · 2 comments

flde commented

Dear TradeSeq Team,

many thanks for the great tool! I was wondering about the best practice for using the associationTest with multiple conditions? I have only one lineage and two conditions. When I run associationTest with lineage=FALSE the results have no condition information attached. When I run associationTest with lineage=TRUE the results are split by condition.

However, using lineage=TRUE only yields one log2FC for both conditions but I thought the log2FC should also be per condition/smoother.

Highly appreciate your help!

Best,
Florian

Hi @flde,

You should indeed set lineages=TRUE. The log2FC is just a median log2FC across all points being compared in the trajectory. We do not provide one per condition separately.

flde commented

Dear @koenvandenberge,

Now I see it. With lineages=TRUE and global=FALSE there is still an log2FC column attached but that is just the log2FC from the global test.

Many thanks for taking the time helping me out with that.

# return output
if (global == TRUE & lineages == FALSE) return(cbind(waldResults, meanLogFC = fcMean))
if (global == FALSE & lineages == TRUE){
df <- data.frame(cbind(waldResAllLineages, meanLogFC = fcMean))
colnames(df)[ncol(df)] <- "meanLogFC"
return(df)
}
if (global == TRUE & lineages == TRUE) {
waldAll <- cbind(waldResults, waldResAllLineages, meanLogFC = fcMean)
return(waldAll)