-
Notifications
You must be signed in to change notification settings - Fork 18
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
Compare multiple sample groups #34
Comments
Hi there, |
Hi, Thank you for your answer! I manually added new columns in adata.obs containing other batch information (patient groups), as you suggested. Now, I would like to include the patient groups in the graph vs. graph analysis (and later in graph vs. feature) to compare the conga clusters in the different patient groups, but I'm not sure when/in which function I should include the batch argument (I'm using jupyter notebook). |
Right now the main thing is visualizing the batch composition of the conga clusters, tcr clumping groups, and g-v-f and hotspot clustermaps. If the list of Let me know if that all works, and if there's more you want to do with the batch assignments we can talk about how to implement that. THere is some code still in development that might be of interest... |
I added the batch column names in adata.obs and in adata.uns['batch_keys'] before computing GEX and TCR neighbor sets (If I do it before, I cannot reduce to a single cell per TCR). |
Thanks for the update! The batch column names do need to be set in adata.uns['batch_keys'] before reducing to a single cell per TCR, so that the batch composition of clonotypes can be calculated (clonotypes span multiple cells so they can conceivably be in multiple batches). That's probably why the logo plot is failing. What error do you get if you try to reduce to a single cell per clone with them set? Note that the values for 'diagnostic_group' and 'patient' in adata.obs need to be integers... |
They were not integers, I corrected this and it worked! I can see the patient groups next to the dendrograms, but I cannot say which color correspond to which group. Is there a way to add the legend similarly to the clusters? |
Glad it worked! Right now the batch colors are arranged in increasing order from bottom to top, 0 = blue at the bottom, then 1 above that, etc. The 'tab10' colormap is used if there are fewer than 11 batches, otherwise the 'tab20' colormap is used: https://matplotlib.org/stable/gallery/color/colormap_reference.html Each batch_key (e.g. 'patient' or 'diagnostic_group' ) gets a bar that is divided left/right with the left, thicker part showing the batch composition of the corresponding cluster and the right, thinner part showing the batch composition of the full dataset (so you can see enrichment/depletion). Yeah, I need to figure out how to squeeze a legend for the batch colors in there. And also allow non-integer batch ids... Let me know if you have any questions! |
Hello,
I love CoNGA! Thank you for developing and making available to everyone such a great package!
I am exploring CoNGA with multiple samples, and I was wondering if it is possible to compare two or more groups (e.g., patients vs. control group).
Thank you!
The text was updated successfully, but these errors were encountered: