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

Wrh.dev #90

Draft
wants to merge 25 commits into
base: bioconductor
Choose a base branch
from
Draft

Wrh.dev #90

wants to merge 25 commits into from

Conversation

weshorton
Copy link
Collaborator

Testing draft pull request

(1) Start an attempt to subset the ligands output in incoming signaling heatmap. Having trouble getting color scale for the subset.
(2) Add option to signaling_network to adjust offset for labels that end up on the left and right sides of the plot
(3) Also changed label distance in signaling_network - can this be an option?
(4) Add circle.margin to circos plot generation in order to have space for legend and title. Can this either be supplied using ... as is, or is there a better way to not hard-code this?
(5) Update circos plot to be able to make a plot using only a subset of the populations.
…ts (don't work rn b/c that bit is commented out)
…coming_signaling_heatmap man sections.

Updates to feat_heatmap:
(1) New 'clust' argument to provide a vector of clusters for display (instead of all clusters)
(2) Add cell names to cl as names in order to sort table appropriately
(3) remove  because the above does the sort now (and this didn't work)
(4) Updated to provide a warning if data has a cluster that isn't provided in the cols argument and then creates a randomly generated color for it
…ut of and turns it into a function. Replace loop in create_domino with new function
…uction out of and turns it into a function. Replace loop in create_domino with new function"

This reverts commit 0f34cf1.
… expression by cluster and makes a ligand-receptor map
1. Added markdown to resolve_names and resolve_complexes
2. Updated resolve_names to resolve receptors or ligands
3. get_all_reclig is a function made from first bit of original outgoing_network. Returns all ligands or all receptors in the domino object
1. add markdown to avg_exp_for_complexes
2. Extract receptor/ligand average expression loop from outgoing_network and put in own function - avg_reclig_expr
3. New function invert_rec_lig_linkages that adds dom@linkages, which is inverse of dom@linkages
4. New function invert_rec_lig_expr that adds dom@cr_signaling_matrices and dom@rec_signaling
5. Add sushma's outgoing_network function, with markdown and all these new functions included. Extend functionality to include the receptor in the receiving cluster's expression.
…the ligand one, keep the original receptor one but deprecated
…ts messed up in the for loop. Also subset the input clusters in case they're not expressed in the object. Also added a new title option
#' @return vector of length(genes) with applicable values replaced using dom@misc$rl_map information
#' @export
#'
resolve_names <- function(dom, genes, rec_lig = "lig") {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sushma function, updated it to take either receptor or ligand

#' @return list of length(genes), with names(list) == genes. List values are the same as the names if not in a complex and are the complex genes if they are in a complex.
#' @export
#'
resolve_complexes <- function(dom, genes) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sushma function

#' @param expressed_only logical indicating whether to subset ligands based on expression in dom@z_scores
#' @details Get all unique ligands in a domino object, expanding all ligand complexes as well. Optionally subset by expression.
#' @return vector of ligands if expressed_only = T, list if F
get_all_reclig <- function(dom, expressed_only = T, rec_lig = "rec") {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code originally in Sushma's outgoing_network. Extracted here

#' @return list
#' @export
#'
avg_exp_for_complexes <- function(exp_mat, complexes_list) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sushma function

return(gene_exp_list)
}

avg_reclig_expr <- function(dom, cluster = NULL, genes, complexes) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code taken from Sushma's outgoing_network and turned into function

#' @return table
#' @export
#'
outgoing_network <- function(dom, outgoing_cluster = NULL, rec_clusters = NULL, plot_ligands = NULL, verbose = T) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sushma's function. Small update to include the receptor expression that's paired with the ligand.

…rcos_ligand_receptor_general in a loop without it breaking.Added a which_v option to indicate whether receptor or ligand should be used (so that you can subset the pair). Example, if plotting a receptor with 5 ligands, you can now specify which of those 5 ligands you want to include in the plot, instead of all 5.
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

Successfully merging this pull request may close these issues.

1 participant