-
Notifications
You must be signed in to change notification settings - Fork 0
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
tascCODA to analyse compositional changes in scRNAseq between case and control (taking in account covariates as age and sex) #3
Comments
Hi @mohebg, The "formula" parameter determines, like in R's Regarding the other arguments, you can ignore the I hope that this answers your questions! |
Hi @johannesostner , Thanks alot for your prompt reply.
So, would making the formula "PATH+age+sex" regress out age/sex in the case vs control comparison? Thanks alot |
Yes, just add the covariate to the model. That's what I would do as well. As I said earlier, this does not "regress out" age/sex, but tascCODA will try to find significant impacts of age/sex and adjust for them accordingly. If age/sex don't have a significant impact on the composition, they also won't be adjusted for. |
Also, please make sure that all covariates are scaled to the same range (i.e. [0-1]), as the selection of significant associations will otherwise be biased |
@johannesostner , thanks alot for your reply, I appreciate. I have there levels of covariants:
|
Just make sure that age is also scaled to a range between 0 and 1 (i.e. via min-max scaling like we did in the microbiome application of our paper). Otherwise the effects for age (since its range is so much bigger than for the categorical covariates, which will be encoded as 0/1) will be very small numerically and thus never selected to be significantly different from 0. |
Hi, Good day, thank you for the nice package.
I have some questions on how to use tascCODA to regress covariants as age and sex in addressing the compositional changes between case and control in scRNAseq.
In your paper you state:
"More generally, however, tascCODA enables to determine how host phenotype, such as disease status, host covariates such as age, gender, or an individual’s demographics, or environmental factors jointly influence the compositional counts"
Shall the formula be written like this:
tree_mod= ana.CompositionalAnalysisTree(
datax.copy(),
reference_cell_type="automatic",
formula="PATH+age+sex",
reg="scaled_3",
pen_args={"phi": 0, "lambda_1": 1.7}
)
"reg="scaled_3"
pen_args={"phi": 0, "lambda_1": 1.7}
Thank you very much in advance.
Best
Moheb
The text was updated successfully, but these errors were encountered: