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
List of Tools #15
Comments
In GitLab by @szabogtamas on Jan 30, 2020, 15:27 changed the description |
In GitLab by @grst on Jan 30, 2020, 15:52
A common pattern how this is handled with scanpy/anndata is to add another column to obs like this:
So I don't think we need a |
In GitLab by @szabogtamas on Jan 31, 2020, 10:03 The reason I was thinking about a separate tool was that diversity (and also convergence) could be calculated at the same time a group is created. The information what columns in the |
In GitLab by @grst on Jan 31, 2020, 10:11 changed the description |
In GitLab by @grst on Jan 31, 2020, 10:18 I'm not a big fan of implicitly computing stuff that might not even be needed by the user. Also, in such a case you can simply do for group in ["TRA_1_cdr3_len", "TRB_1_cdr3_len", "TRA_1_v_gene", ...]:
st.pl.cdr3_length(adata, group=group) Or, we might want to support an API that supports multiple groups, as st.pl.cdr3_length(adata, group=["TRA_1_cdr3_len", "TRB_1_cdr3_len", "TRA_1_v_gene", ...]) But we can discuss that in more detail the next time we meet |
In GitLab by @szabogtamas on Jan 31, 2020, 10:34 It definitively makes sense to have a tool function that precomputes data and a plotting function to visualize. My only concern was that in our case, much of that information is never reused by anything other the actual plot. What I would see a great saving here, however, is to write the computed values into a table (or json) so that the plot can be generated (and the more important point here: modified to match a given visual style, or remove groups, add p-values, etc.) by just parsing a small file and not having to load the whole big table of So let us stick to the canonical way and make tool functions, even if it seems duplicate. Since they will mostly compute group-level statistics, I would suggest adding the result to Should this be a nested dictionary in Or should we go for objects stored in the |
In GitLab by @grst on Jan 31, 2020, 10:40
This is not a good idea, since it cannot be stored by AnnData (yet). See the discussion at scverse/anndata#115.
That's probably the way to go. |
In GitLab by @szabogtamas on Jan 31, 2020, 10:46 Well, I am not against dictionaries, and it usually comes to this for me in python: objects are nice, but let's just stay with a dictionary... We only have to agree on a structure for the dictionary then. But I guess this will be flexible in the beginning and evolve as more tool functions are implemented. |
In GitLab by @grst on Jan 31, 2020, 10:50 I would go for one entry for each tool. What's done within this entry is flexible and can be decided on a tool-by-tool basis. Example adata.uns["tcr_alpha_diversity"] = { ... }
adata.uns["tcr_sequence_logos"] = { ... } Alternatively, we could go for another sub-dictionary: adata.uns["sctcrpy"]["alpha_diversity"] = { ... }
adata.uns["sctcrpy"]["sequence_logos"] = { ... } |
In GitLab by @szabogtamas on Jan 31, 2020, 10:54 Yes, we can discuss this later, we don't need to deal with this right now. It is probably also the matter of what level of users we want to support - this idea was something towards automatically generating an exploratory report that can be refined by the user but points out right away some issues that are worth investigating. At this point, we should just leave it. |
In GitLab by @szabogtamas on Jan 31, 2020, 10:57 I would prefer the subdirectory just because it saves us the prefix. But this is not crucial. |
In GitLab by @grst on Feb 2, 2020, 19:48 marked the task |
In GitLab by @grst on Feb 4, 2020, 14:14 changed the description |
In GitLab by @szabogtamas on Feb 12, 2020, 13:47 marked the task |
In GitLab by @szabogtamas on Feb 12, 2020, 13:47 marked the task |
In GitLab by @szabogtamas on Feb 12, 2020, 13:47 marked the task |
In GitLab by @szabogtamas on Feb 12, 2020, 13:47 closed |
In GitLab by @grst on Jan 30, 2020, 12:59
Tools are functions that work with the data parsed from 10x/tracer and add either
obs
obsm
(e.g. distance matrices)uns
.They are usually required as an additional processing step before running certain plotting functions.
Here's a list of tools we want to implement.
@szabogtamas, feel free to add to/edit the list.
List of tools
st.tl.define_clonotypes(adata)
assignes clonotypes to cells based on their CDR3 sequencesst.tl.tcr_dist(adata, chains=["TRA_1, "TRB_1"], combination=np.min)
adds TCR dist toobsm
(TCR dist #11)st.tl.kidera_dist
adds Kidera distances toobsm
st.tl.chain_convergence(adata, groupby)
adds column toobs
that contains the number of nucleotide versions for each CDR3 AA sequencest.tl.alpha_diversity(adata, groupby, diversityforgroup)
Now we were only thinking about calculating diversity of clonotypes in different groups. But the diversity of any group could just as well be calculated.st.tl.sequence_logos(adata, ?forgroup?)
Precompute MSAs and sequence logos for plotting withst.pl.sequence_logos
.st.tl.dendrogram(adata, groupby)
Compute a dendrogram on an arbitrary distance matrix (e.g. from tcr_dist).Needs discussion
st.tl.create_group(group_membership={Group1: ['barcode1', barcode2']}
adds a group membership to each cell by adding a column toobsm
and the name of the grouping to a list inuns
(by default, groups based on samples, V gene usage and even clonotypes could be created at initial run); might call chain_convergence and alpha_diversity functions to calculate these measures right when creating a groupIdeas, might be implemented at later stage
tcellmatch
(Fischer, Theis et al. )The text was updated successfully, but these errors were encountered: