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

[Please-fix-this] Annotation discrepancies in the <immunedeconv::cell_type_map> #156

Open
jinhys opened this issue Nov 15, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@jinhys
Copy link

jinhys commented Nov 15, 2023


Brief description of the problem

Hi, I've been using this package well for my studies. However, I found out that some of the annotations in the [cell_type] column of the embedded immunedeconv::cell_type_map data frame/tibble have minor discrepancies (as described in the Supporting details section below) - Could you please fix this? And if possible, would you be able to double-check for the rest of the annotations too?

Also, could you please update this XLSX file (which is linked to the HTML page):

Besides, since the immunedeconv::deconvolute() function seems to include the [cell_type] column for each estimation output, I was wondering whether this correction would affect the output of this function if they're linked within the package.

Please let me know if you need further details regarding the issues.
Thank you in advance for your help!


Supporting details

## load the [cell_type_map] embedded in the [immunedeconv] package
df <- as.data.frame(immunedeconv::cell_type_map)

## check the [cell_type] column
subset(df, method_dataset=="cibersort")
#   method_dataset             method_cell_type                        cell_type
# 19      cibersort           Mast cells resting              Mast cell activated
# 20      cibersort         Mast cells activated                Mast cell resting
subset(df, method_dataset=="cibersort_abs")
#   method_dataset             method_cell_type                        cell_type
# 41  cibersort_abs           Mast cells resting              Mast cell activated
# 42  cibersort_abs         Mast cells activated                Mast cell resting

Mast cells resting / Mast cell activated -> Mast cells resting / Mast cell resting
Mast cells activated / Mast cell resting -> Mast cells activated / Mast cell activated

Versions

R version 4.2.1 (2022-06-23)
immunedeconv_2.1.0
@jinhys jinhys added the bug Something isn't working label Nov 15, 2023
@LorenzoMerotto
Copy link
Collaborator

Hello @jinhys !
Thank you for your sharp eye! We will fix this bug in the next release.

In immunedeconv you can either use the deconvolute() and deconvolute_mouse() functions, or you can use the method specific ones, i.e. deconvolute_cibersort() or `deconvolute_quantiseq()´. The main difference between the two is the output. The methods specific functions always return a matrix with the cell type fractions/scores as they are returned by the method, with their oiginal annotation.
On the other hand, the general function returns the scores/fractions using the cell types in the uniform notation specified in the Excel file you linked. This is done to make the results easier to compare.

In your case, you will notice that if you compute the cell fractions with the deconvolute_cibersort function and with the deconvolute(method='cibersort') the values of mast cells resting and activated will be swapped.

@jinhys
Copy link
Author

jinhys commented Nov 16, 2023

Hi @LorenzoMerotto, thanks for your reply!

I see, I understand the unified cell type annotations are included in the output of the deconvolute() and I do appreciate them. Anyway, I should double-check whether the "Mast cells" have the right annotations as you recommended.

Thanks again for your help! And looking forward to using the next version :)

@jinhys
Copy link
Author

jinhys commented Nov 24, 2023

Hi @LorenzoMerotto,

Using immunedeconv_2.1.0, I checked the output values of the Mast cells activated from the individual run of the CIBERSORT (both relative and absolute modes). It turns out that these values are equal to the output values labelled with cell_type=="Mast cell resting" (instead of the "Mast cell activated") from the immunedeconv::deconvolute() function, and vice versa. So, it does affect the downstream analyses if we are not aware of these swapped labels.

Besides, I was having errors with using the earlier version (i.e., v1.0.2) of the CIBERSORT.R. Thankfully I could solve them with reference to #137! - Maybe you and your team would already be aware of this, but I just wanted to let you know: I think one of the main causes was that the earlier version did not have the absolute and abs_method parameters included in the CIBERSORT() function to assign the results variable in the R code:

[ from v1.0.2 ]
results <- CIBERSORT('sig_matrix_file.txt','mixture_file.txt', perm, QN)
[ from v1.0.4 ]
results <- CIBERSORT('sig_matrix_file.txt','mixture_file.txt', perm, QN, absolute, abs_method)

Hope this will be helpful in improving your package and thanks for your work!

@LorenzoMerotto
Copy link
Collaborator

Hello @jinhys

As I mentioned in my comment before the two cell types were inverted in the remapping sheet. We will fix this in the latest version which will be released shortly. In the meantime, you can access the correct CIBERSORT output with the deconvolute_cibersort function

@jinhys
Copy link
Author

jinhys commented Dec 12, 2023

Hi @LorenzoMerotto, thanks for your reply.
Yes, I did use the way you suggested - I just wanted to let you know as a follow-up!

Looking forward to seeing the next version :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants