Giter Club home page Giter Club logo

microguilds's Issues

Comparing several genes or guilds at the same time

It would be nice that every implementation of several functions can be visualized at the same time. Things to consider:

  • there's an obvious limitation of how many bars and colors fill in a radial plot...
  • Are radial plots the best way to compare not a single guild pattern, but different guilds?

Add a column with Normalized abundance per Sample.

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.

Error in guild_tensor_generate.py when using 4 contexts

I rewrite the modify_mastertable.py module to generate a master_tab with 4 context (instead of depth, latitude). I'm getting this error in guild_tensor_generate.py:

Found 4 contexts in gene subtable.
z1
z2
z3
z4

100%|██████████| 2064/2064 [00:01<00:00, 1746.92it/s]
Bivariate loglog regression results:
gamma = 0.6510109031387529
c = 0.2594626316691924
R2 = 0.8597118038702496

Gene: potF with R2=0.86
Data saved in kvalues_potF_Species_GTDB.tsv.
0%| | 0/2064 [00:00<?, ?it/s]
Traceback (most recent call last):

File "/Users/juanrivassantisteban/miniconda3/lib/python3.10/site-packages/spyder_kernels/py3compat.py", line 356, in compat_exec
exec(code, globals, locals)

File "/Users/juanrivassantisteban/Desktop/uGuilds-main/guild_tensors/guild_tensor_generate.py", line 129, in
gtutils.export_legacy(adu_table, _filepath, column="Diversity")

File "/Users/juanrivassantisteban/Desktop/uGuilds-main/guild_tensors/guild_tensor_utils.py", line 91, in export_legacy
assert sum(idx) == 1

AssertionError

mastertab with only GTDB assignments: guild_tensor_generate.py is not running

When trying to run a master_tab with only GTDB taxonomic assigments, guild_tensor_generate.py is displaying this error:

   File "/Users/juanrivassantisteban/Desktop/uGuilds-main/guild_tensors/guild_tensor_utils.py", line 132, in check_mastertable
    idc_null = np.argwhere(df['Species_SQM'].isnull().values)[:, 0]

  File "/Users/juanrivassantisteban/miniconda3/lib/python3.10/site-packages/pandas/core/frame.py", line 3807, in __getitem__
    indexer = self.columns.get_loc(key)

  File "/Users/juanrivassantisteban/miniconda3/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3804, in get_loc
    raise KeyError(key) from err

KeyError: 'Species_SQM''

And if you add an empty column called "Species_SQM", the error changes to this one:


  File "/Users/juanrivassantisteban/Desktop/uGuilds-main/guild_tensors/guild_tensor_utils.py", line 144, in check_mastertable
    df.at[jj, "Genus_SQM"] = "GTDB:"+df.loc[jj, "Genus_GTDB"]

TypeError: can only concatenate str (not "float") to str

Computing diversity in coassembled mastertables

We need to compute diversity as the number of unique identifiers (rows) matching a value over 0 in the abundance column for any position in the k-tensor. Otherwise, diversity will always be the same (while abundance, of course, not) for every taxonomic level, regardless of the context.

Using less contexts than provided in master_tab

If anyone wants to screen guilds in reduced contexts, this is, that not every single row the my master_tab.tsv will be classified in a context to visualize or to generate k-values, it would be useful to not getting this error in modify_mastertable.py:

ValueError: Length of values (2375) does not match length of index (91159)

New functionality: multi-guild visualization

It would be freaking good to compare distinct guild_tensors in the same plot.

Some concerns:

i) the k-values of different guilds can be in different magnitude orders. We should build a smart visualization!
ii) the resulting plot can represent an understanding-challenge. We should keep the things "easy".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.