EDePasquale / DoubletDecon

A tool for removing doublets from single-cell RNA-seq data
69 stars 19 forks source link

Error in paste0(location, filename, "_groups") : cannot coerce type 'closure' to vector of type 'character' #30

Open DirtyHarry80 opened 4 years ago

DirtyHarry80 commented 4 years ago

Hi, I followed your example starting from per-existing Seurat Object. Function "Improved_Seurat_Pre_Process" executed without any problems. However there is something wrong with the next step (which by the way there is no explanation in the Documentation why we need that in the first place???): filename="PBMC_example" write.table(newFiles$newExpressionFile, paste0(location, filename, "_expression"), sep="\t") write.table(newFiles$newFullExpressionFile, paste0(location, filename, "_fullExpression"), sep="\t") write.table(newFiles$newGroupsFile, paste0(location, filename , "_groups"), sep="\t", col.names = F) The error reads: Error in paste0(location, filename = filename, "_groups") : cannot coerce type 'closure' to vector of type 'character'

Same happens when one directly executes "Main_Doublet_Decon" function. The error is: Error in paste0(location, filename, ".log") : cannot coerce type 'closure' to vector of type 'character'

What is going on, any idea?

EDePasquale commented 4 years ago

Hi,

Could you please let me know what is being stored as "location" in your code? I have a feeling it is not a character, which is what paste0 is expecting, but I wouldn't know exactly what the problem is without seeing the object and type.

Best, Erica

DirtyHarry80 commented 4 years ago

Dear Erica,

Thank you very much for reaching out. I managed to correct some things and finally the script worked. It was the path folder that was not well defined. As a result I got a heat map that I honestly do not know how to interpret and also have no hint how to do it (not really described neither in the GitHub nor in the paper). Can you help me understand it (I am attaching it)?

Second point, how can we (as you did in the paper) visualize the doublet cells on the original TSNE plot that we got with Seurat tool. I guess this is the point of this tool?

Best regards, Andrei

-- Dr. Andrei Turtoi Institut de Recherche en Cancérologie de Montpellier Inserm U1194 – Université Montpellier Tumor Microenvironment and Resistance to Treatment Lab 208 Avenue des Apothicaires F-34298 Montpellier Cedex 5, France Tél: +33.(0)4.67.61.37.46 Fax: +33.(0)4.67.61.23.37 https://ircm.fr/index.php?pagendx=1146

On Apr 21, 2020, at 7:19 PM, EDePasquale notifications@github.com wrote:

Hi,

Could you please let me know what is being stored as "location" in your code? I have a feeling it is not a character, which is what paste0 is expecting, but I wouldn't know exactly what the problem is without seeing the object and type.

Best, Erica

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/EDePasquale/DoubletDecon/issues/30#issuecomment-617297905, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM5ZOXZTUPYLLB4ZDDOKGMLRNXIQNANCNFSM4MG6G4ZQ.

EDePasquale commented 4 years ago

Hi Andrei,

I'm glad you were able to get the script working. I'll be happy to help you with the interpretation of the heatmap but I'm not seeing it attached.

There are 2 types of heatmaps that can be generated in DoubletDecon: the cluster merging heatmap and the expression heatmap. Interpretation of the expression heatmap is easier to explain, as if you have heatmap=TRUE you will generate gene by cell heatmaps in the following order: original heatmap of all cells, heatmap of cells called as doublets, then heatmap of cells called as singlets (the last would be missing any genes removed as cell cycle gene clusters if that option was selected).

The second heatmap is the cluster merging heatmap, and I agree that it is not well defined in the original paper. I am in the process of publishing a protocol which has a lot more detail on the selection of these parameters and interpretation. If you would like I can send you the latest draft in an email, just let me know. Please see the following issues in this github for more information on choosing the rhop value (which is what this second heatmap is for):

For your second point, one of our lab members did this and I can check with him to make sure I am giving you the correct answer. I can see doing this by either by using the coordinates from Seurat and regenerating with those or by replacing the cluster calls within the Seurat object. Alternatively, you can use the DoubletDeconUI to create the doublet/singlet UMAPs but they will not be on the original Seurat layout and may be less helpful for you.

Best, Erica

DirtyHarry80 commented 4 years ago

Dear Erica,

Thank you for your answer. Indeed without having your email it will be very difficult to send you the image, but yes I was referring to the second heat map that is called “Cluster Merge”.

I would be very grateful if you could send me the draft of the protocol, especially to understand how to make use of the results from your pipeline.

Best regards, Andrei

-- Dr. Andrei Turtoi Institut de Recherche en Cancérologie de Montpellier Inserm U1194 – Université Montpellier Tumor Microenvironment and Resistance to Treatment Lab 208 Avenue des Apothicaires F-34298 Montpellier Cedex 5, France Tél: +33.(0)4.67.61.37.46 Fax: +33.(0)4.67.61.23.37 https://ircm.fr/index.php?pagendx=1146

On Apr 22, 2020, at 4:47 PM, EDePasquale notifications@github.com wrote:

Hi Andrei,

I'm glad you were able to get the script working. I'll be happy to help you with the interpretation of the heatmap but I'm not seeing it attached.

There are 2 types of heatmaps that can be generated in DoubletDecon: the cluster merging heatmap and the expression heatmap. Interpretation of the expression heatmap is easier to explain, as if you have heatmap=TRUE you will generate gene by cell heatmaps in the following order: original heatmap of all cells, heatmap of cells called as doublets, then heatmap of cells called as singlets (the last would be missing any genes removed as cell cycle gene clusters if that option was selected).

The second heatmap is the cluster merging heatmap, and I agree that it is not well defined in the original paper. I am in the process of publishing a protocol which has a lot more detail on the selection of these parameters and interpretation. If you would like I can send you the latest draft in an email, just let me know. Please see the following issues in this github for more information on choosing the rhop value (which is what this second heatmap is for):

"Unable to perform mcl function for blacklist clustering" while using GUI #28 https://github.com/EDePasquale/DoubletDecon/issues/28 DoubletDecon - Main_Doublet_Decon - no locations are finite error. #26 https://github.com/EDePasquale/DoubletDecon/issues/26 "Unable to perform mcl function for blacklist clustering, please try a different rhop." from black lists #11 https://github.com/EDePasquale/DoubletDecon/issues/11 For your second point, one of our lab members did this and I can check with him to make sure I am giving you the correct answer. I can see doing this by either by using the coordinates from Seurat and regenerating with those or by replacing the cluster calls within the Seurat object. Alternatively, you can use the DoubletDeconUI to create the doublet/singlet UMAPs but they will not be on the original Seurat layout and may be less helpful for you.

Best, Erica

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/EDePasquale/DoubletDecon/issues/30#issuecomment-617824816, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM5ZOX2YAIU2CWGLH464YQLRN37OZANCNFSM4MG6G4ZQ.

EDePasquale commented 4 years ago

I have sent it via email to a professional email address you have listed. Please let me know if you didn't receive it. I'll be happy to get it out in the public soon!

Edit: The email was rejected. If you could email me at careyea@mail.uc.edu I will respond with the attachment ASAP.

DirtyHarry80 commented 4 years ago

Dear Erica,

I have read the threads that you sent me and if fact I agree with the “kmshort”, simply we have no clue what to do with the output files. I mean the whole idea is that one starts with some kind of pre-analysis (be it Seurat) and wants to figure out if some clusters that he/she is seeing are enriched in doublets or even eliminate those cells. However the result of the pipeline is very difficult to understand, especially because even cluster annotations that one does before on its own data are lost during the processing. Heatmaps have no legends.

I am really looking forward to your Manual file (did not get it yet).

Best regards, Andrei

-- Dr. Andrei Turtoi Institut de Recherche en Cancérologie de Montpellier Inserm U1194 – Université Montpellier Tumor Microenvironment and Resistance to Treatment Lab 208 Avenue des Apothicaires F-34298 Montpellier Cedex 5, France Tél: +33.(0)4.67.61.37.46 Fax: +33.(0)4.67.61.23.37 https://ircm.fr/index.php?pagendx=1146

On Apr 22, 2020, at 5:22 PM, EDePasquale notifications@github.com wrote:

I have sent it via email to a professional email address you have listed. Please let me know if you didn't receive it. I'll be happy to get it out in the public soon!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/EDePasquale/DoubletDecon/issues/30#issuecomment-617845915, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM5ZOXY3ORHH2FZSWUOWV73RN4DSFANCNFSM4MG6G4ZQ.