-
Notifications
You must be signed in to change notification settings - Fork 66
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
Obtain per-sample expression value for a gene set #137
Comments
PatrickMaclean
changed the title
Obtain per-sample
Obtain per-sample expression value for a gene set
Jul 12, 2023
You could try to adapt the code that we are using inside of conditions <- # your conditions here or NULL
E <- t(base::scale(t(E), center=center, scale = scale))
genes <- pathway
if (!is.null(conditions)) {
if (is.character(conditions)) {
conditions <- factor(conditions, levels=unique(conditions))
}
}
pointDt <- data.table(x = seq_len(ncol(E)),
y = colSums(E[rownames(E) %in% genes, , drop=FALSE]) / sum(rownames(E) %in% genes),
condition=if (!is.null(conditions)) { conditions } else "x")
If you want to obtain information about the behavior of each gene in a gene set, take a look at how we handle it here Let me know if something is unclear |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi - thank you for your great work on the package.
I'm sorry if I've overlooked something obvious, but how do I extract the per-sample scores for each geneset obtained through geseca?
I can run geseca with:
gesecaRes <- geseca(pathways, E, minSize = 15, maxSize = 500)
and then plot the per-sample expression value for a specified geneset with:
plotCoregulationProfile(pathway=pathways[["SANA_TNF_SIGNALING_UP"]], E=E, titles = metadata$aample, conditions = metadata$cohort)
How do I just obtain the data used by plotCoregulationProfile (sample x expression value for a specified gene set) so I can plot it more flexibly?
Thanks!
The text was updated successfully, but these errors were encountered: