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

BUG | do_EnrichmentHeatmap | Undefined columns selected when providing named lists with dashes on the names. #53

Closed
AlexisFon opened this issue Feb 7, 2024 · 2 comments

Comments

@AlexisFon
Copy link

Hi,

I encountered n issue when running "SCpubr::do_EnrichmentHeatmap".

Here is the code :

Macro_Subtypes = list(
  "IFN-TAMs" = c("CCL2", "CCL8", "CXCL9", "CXCL10", "CXCL11", "IFITM1", "ISG15"),
  "Infla-TAMs" = c("CCL3", "CCL4", "CCL20", "CCL3L1", "CCL4L2", "CXCL1", "CXCL2", "CXCL3", "CXCL5", "CXCL8", "GOS2"))

SCpubr::do_EnrichmentHeatmap(AllMacroClean, input_gene_list = Macro_Subtypes, use_viridis = T, viridis.palette = "C", legend.position = "right", flip = F)
AllMacroClean being a Seurat Object
![image](https://github.com/enblacar/SCpubr/assets/141238205/22268def-9e30-43bb-82d2-9085102fd7cd)

I have the following error :
Error in [.data.frame(sample@meta.data, , col_name) :
undefined columns selected
In addition: Warning message:
! Found dashes (-) in the name of the gene sets provided. Replacing them with dots (.) to avoid conflicts when generating the Seurat assay.

It worked before, but not anymore, and I don't understand what I have to change. Does anyone could help me ?

Alexis

@enblacar
Copy link
Owner

enblacar commented Feb 8, 2024

Hi @AlexisFon,

Thanks for using my package!

It seems a problem with the names of the list. Dashes are particularly problematic as they transform into dots when computing enrichment scores. To try to fix it, I also change them to retrieve the enrichment score columns from the metadata afterwards, but apparently, something went wrong along the way.

  • Which version of SCpubr are you using?
  • Can you try to remove any special characters from your names. I.E: INF-TAMs --> INFTAMs and Infla-TAMs --> InflaTAMs.

Let me know if the issue still persists after trying that!

Best,
Enrique

@enblacar enblacar changed the title BUG | FUNCTION NAME | BRIEF DESCRIPTION BUG | do_EnrichmentHeatmap | Undefined columns selected when providing named lists with dashes on the names. Feb 8, 2024
@enblacar
Copy link
Owner

Hi @AlexisFon,

Closing this issue for now. Feel free to reopen it in case the tips above did not help!

Best,
Enrique

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

No branches or pull requests

2 participants