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

Fix bugs in assign_ligands_to_celltype #275

Merged
merged 4 commits into from
May 29, 2024
Merged

Fix bugs in assign_ligands_to_celltype #275

merged 4 commits into from
May 29, 2024

Conversation

csangara
Copy link
Member

@csangara csangara commented May 29, 2024

  • Addition of the if statement and removal of set_rownames proposed by cannot complete assign_ligands_to_celltype #268
  • Changed the slot parameter to ... to accommodate both slot/layer terminology
  • Also fixed mistake in hardcoding of celltype column name in two places

Example code:

seuratObj <- readRDS(url("https://zenodo.org/records/5840787/files/seurat_obj_subset_integrated_zonation.rds")) 
seuratObj <- UpdateSeuratObject(seuratObj)

seuratObj <- PrepSCTFindMarkers(seuratObj)
nichenet_output <- nichenet_seuratobj_cluster_de(
  seurat_obj = seuratObj, 
  sender = c("LSECs_portal", "Hepatocytes_portal", "Stellate cells_portal") , 
  receiver_affected = "KCs", 
  receiver_reference = c("MoMac1", "MoMac2"),
  ligand_target_matrix = ligand_target_matrix,
  lr_network = lr_network,
  weighted_networks = weighted_networks
)

assign_ligands_to_celltype(seuratObj, nichenet_output$top_ligands, celltype_col = "celltype", slot = "data")

This no longer produces an error.

@csangara csangara linked an issue May 29, 2024 that may be closed by this pull request
@csangara csangara linked an issue May 29, 2024 that may be closed by this pull request
@csangara csangara merged commit a8bade9 into master May 29, 2024
@csangara csangara deleted the issue-268-fix branch May 30, 2024 08:07
@csangara csangara restored the issue-268-fix branch May 30, 2024 13:12
@csangara csangara deleted the issue-268-fix branch May 30, 2024 13:13
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.

cannot complete assign_ligands_to_celltype
1 participant