find DEG of monocle 3 object using tradeSeq
0
0
Entering edit mode
6 months ago
synat.keam ▴ 100

Dear All,

Hope you are well. I used tradeSeq for my monocle3 object to find DEG of various lineage along trajectory. Output provides gene names, waldStat, pvalue and meanLogFC. This is my first time doing tradeSeq. Therefore, I am wondering whether p-value here referred adjust-pvalue? How to know which genes are up- and down-regulated. Less than 1 is down or greater than 1 is up? because I did not see any negative meanLogFC in my tradeSeq output at all. Hope you could help review and give me some answers. Here are my tradeSeq R script! Could you help review whether my script is right. Many thanks beforehand !

BiocManager::install(c("tradeSeq", "SingleCellExperiment", "slingshot"))
library(tradeSeq)
library(SingleCellExperiment)
library(slingshot)


#pseudotime obj
# Extract pseudotime and assume uniform cell weights
pseudotime <- as.numeric(pseudotime(cds_second))
cellWeights <- matrix(1, ncol = 1, nrow = length(pseudotime))

# Create SingleCellExperiment object
sce <- SingleCellExperiment(assays = list(counts = counts(cds_second)))
colData(sce)$pseudotime <- pseudotime
colData(sce)$cellWeights <- cellWeights

# Fit the GAM
sce <- fitGAM(counts = counts(sce), pseudotime = pseudotime, cellWeights = cellWeights)

# Perform differential expression testing as a function of pseudotime! 
diffExpr <- associationTest(sce)
diffExpr_omitna<- na.omit(diffExpr)
significant_genes <- rownames(diffExpr)[which(diffExpr$pvalue < 0.05)]

#filter significant genes 
second_deg_pseudo<- diffExpr_omitna %>% filter(pvalue < 0.05)
write.csv(second_deg_pseudo, file = "second_deg_pseudo.csv")

# View significant genes
print(significant_genes)

Kind Regards,
Synat

enter image description here

tradeSeq • 507 views
ADD COMMENT
0
Entering edit mode

Use code formatting only for appropriate code, variable names, col/row names etc., not for emphasis. I've fixed your post this time.

ADD REPLY
0
Entering edit mode

Thanks, Ram. Ill follow your instruction next time. Do you have any idea with my question?

ADD REPLY
0
Entering edit mode

N I don't - it's not my area of expertise.

ADD REPLY

Login before adding your answer.

Traffic: 2039 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6