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

TypeError #1

Open
surqing opened this issue Dec 11, 2024 · 0 comments
Open

TypeError #1

surqing opened this issue Dec 11, 2024 · 0 comments

Comments

@surqing
Copy link

surqing commented Dec 11, 2024

{
	"name": "TypeError",
	"message": "'NoneType' object is not iterable",
	"stack": "---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[8], line 1
----> 1 gene_level_graph, num2gene, gen2num = pre.construct_genelevel_graph(grns, celllevel_adj, node_type=\"int\")
      3 len(gene_level_graph.nodes())

File ~/sur/GRN/clarify/src/preprocessing.py:261, in construct_genelevel_graph(disjoint_grns, celllevel_adj_list, node_type, lrgenes)
    258 num2gene = {}   #dictionary that maps the supergraph integer nodes to the gene name (Cell#_gene#)
    259 gene2num = {}   #dictionary that maps the gene name (Cell#_gene#) to the supergraph integer node
--> 261 assert max(lrgenes) <= numgenes
    263 grn_graph_list = []
    264 for cellnum, grn in enumerate(track(disjoint_grns, description=f\"[cyan]3a. Combining individual GRNs\")):

TypeError: 'NoneType' object is not iterable"
}

In your preprocessing.ipynb file, you call the pre.construct_genelevel_graph function without passing lrgenes. lrgenes defaults to None, but you use lrgenes later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant