-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Having problems to resolve the following error in the tutorial code:
rib = Ribosome(id='rib',
name='Ribosome',
kribo=12 * 3600,
kdeg=0.001,
)
Output:
TypeError Traceback (most recent call last)
/Users/bsp/unix/etfl/tutorials/tutorial_iJO1366.ipynb Cell 17' in <cell line: 38>()
33 rpeptide_genes = pd.read_csv(pjoin(data_dir,'ribosomal_proteins_ecoli.tsv'),
34 delimiter='\t',
35 header=None)[0]
36 rpeptide_genes = rpeptide_genes.str.split(':').apply(lambda x:x[1])
---> 38 rib = Ribosome(id='rib',
39 name='Ribosome',
40
41 kribo=12 * 3600,
42 kdeg=0.001,
43 )
45 rnap = RNAPolymerase(id='rnap',
46 name='RNA Polymerase',
47 ktrans = 1000*3600,
48 composition=composition,
49 kdeg = 0.2
50 )
File ~/unix/etfl/etfl/core/enzyme.py:123, in Ribosome.__init__(self, id, kribo, kdeg, composition, rrna, *args, **kwargs)
121 def __init__(self, id=None, kribo=None, kdeg=None, composition=None, rrna=None,
122 *args, **kwargs):
--> 123 Enzyme.__init__(self, id = id, kdeg=kdeg, kcat = kribo, composition=composition,
124 *args, **kwargs)
126 self.rrna_composition = {k: 1 for k in rrna}
File ~/unix/etfl/etfl/core/enzyme.py:41, in Enzyme.__init__(self, id, kcat, kcat_fwd, kcat_bwd, kdeg, composition, *args, **kwargs)
39 self.composition = {k:1 for k in composition}
40 else:
---> 41 raise TypeError('Composition should be of type dict() or iterable')
43 self.complexation = None
TypeError: Composition should be of type dict() or iterable
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels