drisso / zinbwave

Clone of the Bioconductor repository for the zinbwave package, see https://bioconductor.org/packages/zinbwave
43 stars 10 forks source link

How to work with duplicates? #61

Closed yeroslaviz closed 4 years ago

yeroslaviz commented 4 years ago

I would like to test the zinbwave package with my data, but not sure, what is the correct procedure for that.

We have several experimental conditions/timepoints sequenced by 10x and would like to compare them against each other. They are all in duplicates (two biological replicates for each TP).

How would one go ahead with duplicated? Do I need to merge the two biological replicates into one sample and then continue to work with it as one, or is there a way to classify them as belonging to the same condition, when doing the DE analysis?

Would it be better first to use Seurat to integrate each two conditions (so four samples) to prevent possible batch effects into one integratedData object, keeping the project.Ident in place so they can be compared?

thanks

drisso commented 4 years ago

zinbwave can account for batch effects by adding a batch variable in the design matrix.

That usually works well, so my suggestion would be, assuming you have (or can create) a SingleCellExperiment object for each of your biological replicate, to simply concatenate the objects into one large SingleCellExperiment object. You can simply use cbind() for that, making sure that the rowData are compatible.

Once you have your large dataset, you can add a couple of variables to the colData, e.g., condition and patient.

You can use Seurat's integration as an alternative, but it won't be easy to integrate zinbwave downstream of that. So my recommendation would be to stick to one or the other.

Perhaps you could also have a look at the muscat Bioconductor package (https://bioconductor.org/packages/release/bioc/html/muscat.html) which sounds like a better approach for your multi-sample design.

PS. In the future, this type of questions is more suited for the Bioconductor support forum (support.bioconductor.org) than for github issues.

Hope this helps. Davide

yeroslaviz commented 4 years ago

I'll copy my question to the Bioconductor support forum and follow up the discussion there. thanks