Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no H cmponenet after running the "zlm" function #109

Open
kristinazuza opened this issue Mar 19, 2019 · 3 comments
Open

no H cmponenet after running the "zlm" function #109

kristinazuza opened this issue Mar 19, 2019 · 3 comments

Comments

@kristinazuza
Copy link

Hi,
I have been running MAST on scRNAdata set, containing 96 samples.
After running the zlm on sca object, I run summary, and only get coefficient "c", "D", "S" and "logFC" but no "H" coefficient. I am not sure why is that and was wondering if you could help me with it or give some input.
Here is the code I run:

sca <- SceToSingleCellAssay(sce = sce, class = "SingleCellAssay", check_sanity = FALSE)

cdr2 <-colSums(assay(sca)>0)
colData(sca)$cngeneson <- scale(cdr2)
colnames(colData(sca))

cond <- factor(colData(sca)$category)
cond<-relevel(cond,"NR")
colData(sca)$condition<-cond
cond
zlmCond <- zlm(~ cond + cngeneson,  sca)


summaryCond <- MAST::summary(zlmCond)
summaryDt <- summaryCond$datatable


print(summaryCond, n=4, by='D')
print(summaryCond, n=4, by='C')
print(summaryCond, n=4, by='S')


fcHurdle <- merge(summaryDt[contrast =='condall3' & component=='H', .(primerid, 'Pr(>Chisq)' )] , summaryDt[contrast=='condall3' & component=='logFC', .(primerid, coef, ci.hi, ci.lo)], by='primerid') 

fcHurdle[,fdr:=p.adjust('Pr(>Chisq)', 'fdr')]

Hope you will have time to check it and give some input.
Thank you in advance.

Regards,
Kristina

@gfinak
Copy link
Member

gfinak commented Mar 19, 2019

Where does the data for sce come from?

@kristinazuza
Copy link
Author

Hi,

it comes fromscater and normalize function.

@gfinak
Copy link
Member

gfinak commented Mar 19, 2019

That's great. But I can't reproduce your issue without some data.
Please see the reprex package for how to build a minimal reproducible example, and provide some minimal data to reproduce your error so that I can investigate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants