Skip to content

Error running on Colab #21

@deebnrg

Description

@deebnrg

Hi,
I tried running riptide o colab notebook after pip install riptide and pip install symengine.

On running the following code:
import riptide
import cobra
import symengine

my_model = cobra.io.read_sbml_model('genre.sbml')

transcript_abundances_1 = riptide.read_transcription_file('transcriptome1.tsv')
transcript_abundances_2 = riptide.read_transcription_file('transcriptome2.tsv') # has replicates

riptide_object_1_a = riptide.contextualize(model=my_model, transcriptome=transcript_abundances_1)
riptide_object_1_b = riptide.contextualize(model=my_model, transcriptome=transcript_abundances_1, tasks=['rxn1'], exclude=['rxn2','rxn3'])

riptide.save_output(riptide_obj=riptide_object_1_a, path='~/Desktop/example_riptide_output')

This is the error i get:

Initializing model and integrating transcriptomic data...
Pruning zero flux subnetworks...

AttributeError Traceback (most recent call last)
/tmp/ipython-input-575827912.py in <cell line: 0>()
8 transcript_abundances_2 = riptide.read_transcription_file('transcriptome2.tsv') # has replicates
9
---> 10 riptide_object_1_a = riptide.contextualize(model=my_model, transcriptome=transcript_abundances_1)
11 riptide_object_1_b = riptide.contextualize(model=my_model, transcriptome=transcript_abundances_1, tasks=['rxn1'], exclude=['rxn2','rxn3'])
12

4 frames
/usr/local/lib/python3.12/dist-packages/optlang/glpk_interface.py in objective(self, value)
626
627 for var, coef in coef_dict.items():
--> 628 glp_set_obj_coef(self.problem, var._index, float(coef))
629
630 glp_set_obj_dir(

AttributeError: 'symengine.lib.symengine_wrapper.Symbol' object has no attribute '_index'

Can you help me run riptide on colab notebook?
Thank you
Dee

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions