Skip to content
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

Add a column with Normalized abundance per Sample. #6

Closed
JuanRivasSantisteban opened this issue May 16, 2023 · 2 comments
Closed

Add a column with Normalized abundance per Sample. #6

JuanRivasSantisteban opened this issue May 16, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@JuanRivasSantisteban
Copy link
Collaborator

It would be interesting to compare the sum of abundance values with the k-values. In order to do that in contexts with very different number of samples, we should add another column with Abudance / n samples.

@JuanRivasSantisteban JuanRivasSantisteban added the enhancement New feature or request label May 16, 2023
@pyubero pyubero self-assigned this May 17, 2023
@pyubero
Copy link
Owner

pyubero commented May 17, 2023

Currently the available columns in the final adu_table (kvalues_gene.tsv) are:

  • Gene
  • Taxon
  • Context
  • Cluster
  • Abundance
  • Diversity
  • Univocity
  • delta (=Diversity/d_expected)
  • normalization (=n_samples)
  • k-value (=Abundance*delta/normalization)

Thus if you create the corresponding table with a NORMALIZE_NSAMPLES = True you can easily compute what you want as table["Abundance"]/table["normalization"], if you want to un-do the normalization on k-values simply compute table["k-value"]*table["normalization"].

@pyubero pyubero closed this as completed May 17, 2023
@pyubero
Copy link
Owner

pyubero commented May 18, 2023

In the most recent commit of guild tensors visualize.py, we explicitly extract different columns from the adu table (kvals, nsamp, abund and delta) so that by defining K you can choose what to display in your plots.

For example set:
K = kvals (default)
K = kvals*nsamp (de-normalize)
K = abund/nsamp (normalized sum of abundances)
etcetera

@JuanRivasSantisteban JuanRivasSantisteban added this to the go public! milestone Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants