edikedik / eBoruta

Flexible and transparent Python Boruta implementation
https://eboruta.readthedocs.io/en/latest/
MIT License
8 stars 1 forks source link

Demo section in the Docs throw a Typeerror #4

Closed BlackArbsCEO closed 1 month ago

BlackArbsCEO commented 1 month ago

TypeError                                 Traceback (most recent call last)
Cell In[8], line 1
----> 1 chains = ChainList(
      2     wrap_into_chain_seq(r) for _, r in df_up.iterrows()
      3 )
      4 Counter(c.meta['Family'] for c in chains)

File ~/Projects/lXtractor/lXtractor/core/chain/list.py:131, in ChainList.__init__(self, chains, categories)
    124 """
    125 :param chains: An iterable over ``Chain*``-type objects.
    126 :param categories: An optional list of categories.
    127     If provided, they will be assigned to inputs' `meta` attributes.
    128 """
    130 if not isinstance(chains, list):
--> 131     chains = list(chains)
    133 _check_chain_types(chains)
    135 if categories is not None:

Cell In[8], line 2, in <genexpr>(.0)
      1 chains = ChainList(
----> 2     wrap_into_chain_seq(r) for _, r in df_up.iterrows()
      3 )
      4 Counter(c.meta['Family'] for c in chains)

Cell In[7], line 9, in wrap_into_chain_seq(row)
      7 fam_df = row['Protein families']
      8 family = 'other'
----> 9 if 'protein kinase family' in fam_df:
     10     if 'Ser/Thr' in fam_df:
     11         family = 'STk'

TypeError: argument of type 'float' is not iterable```
edikedik commented 1 month ago

Thanks, I've updated the notebook. For a correct compiled version, see https://eboruta.readthedocs.io/en/latest/notebooks/sequence_determinants_tutorial.html

Please reinstall the dependencies, especially lXtractor if there are plans to execute it.

Cheers