I concatenated several samples in one anndata object as shown here:
S1.obs[‘sample’]=“S1”
S2.obs[‘sample’]=“S2”
S3.obs[‘sample’]=“S3”
merge into one object.
adata = S1.concatenate(S2, S3,)
Then I did the QC steps and the violin plots in order to decide how to filter the object. Since I have 3 samples I am using different parameters for each. Does the below look correct?
Thank you for replying. I am just relatively new to scanpy and I am still trying to understand how to handle the anndata object.
I tried to combine them first because when doing the QC and violin plots I could do it only on one object. Is it strange because you think I should use the same filtering criteria for all the samples?
Is the code that you included for concatenating the data just faster than what I did or does it produce different results?
I don’t think there’s anything wrong with what you did, and I see how it would make some plotting easier. I think it’s mostly that the plots I typically make for qc don’t facet by sample well.
Is the code that you included for concatenating the data just faster than what I did or does it produce different results?
It’s a little faster, but more importantly AnnData.concatenate will be deprecated in favor of the concat function.
There are slight differences, IIRC mostly when you use join="outer".