-
Notifications
You must be signed in to change notification settings - Fork 16
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
Extracting Gene-Gene distance matrix from DegPatterns #47
Comments
Hey, sorry for the late reply. I think the best way is to do it by yourself since you know the genes.
I could try to add the output package but not sure when I could do that. Let me know. |
Hello,
When I run the code, I'm getting the following error message: Error in
summarize_scale(cluster_rlog_inf, infected_coldata_10E7_Null[[summarize]],
:
unused argument (FALSE). Any ideas why this could be happening? Thank you!
…On Wed, Sep 1, 2021 at 4:28 PM Lorena Pantano ***@***.***> wrote:
Hey, sorry for the late reply. I think the best way is to do it by
yourself since you know the genes.
.summarize_scale <- function(ma, group, scale = TRUE){
counts_group = t(sapply(rownames(ma), function(g){
sapply(levels(group), function(i){
idx = which(group == i)
mean(ma[g, idx], na.rm = TRUE)
})
}))
colnames(counts_group) = levels(group)
.logger(head(counts_group), "summarize_scale::counts_group")
.logger(head(group), "summarize_scale::group")
if (scale) {
norm_sign <- t(apply(counts_group, 1, .scale))
}else{
norm_sign <- counts_group
}
colnames(norm_sign) = colnames(counts_group)
norm_sign
}
# ma is the matrix only with your genes of interest
# metadata[[summarize]] is the vector with the time or group information matching the samples order in ma
counts_group <- .summarize_scale(ma,
metadata[[summarize]],
FALSE)
m <- (1 - cor(t(counts_group), method = "kendall"))
d <- as.dist(m^2)
I could try to add the output package but not sure when I could do that.
Let me know.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#47 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOY6HF2UZNZC4L46JMNY3NLT72EHBANCNFSM5DGR6ZFQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
--
Catherine Kagemann
PhD Candidate, Aquadro Lab | Genetics, Genomics, and Development
Dept. of Molecular Biology and Genetics
Cornell University | Ithaca, NY
|
mm, not sure what is happening. are you using the function as |
Hello,
I used DegPatterns to cluster my genes which worked, but for upstream analysis I require the gene-gene distance matrix that was used to create these clusters. Is there any way to extract this matrix? Thanks!
The text was updated successfully, but these errors were encountered: