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

add_cor_scores #286

Open
TingTingShao opened this issue Apr 2, 2024 · 3 comments
Open

add_cor_scores #286

TingTingShao opened this issue Apr 2, 2024 · 3 comments

Comments

@TingTingShao
Copy link

Hi,

I ran into error when running

net = snap.tl.init_network_from_annotation(regions, 
    anno_file =snap.genome.hg38,  
    upstream = 250000,  
    downstream= 250000,  
    id_type = 'gene_name',  
    coding_gene_only = True)
net = snap.tl.add_cor_scores(net, gene_mat=gene_mat, peak_mat=peak_mat, select=None, overwrite=False)

error shows:

net = snap.tl.add_cor_scores(net, gene_mat=gene_mat, peak_mat=peak_mat, select=None, overwrite=False)
if sp.issparse(y):
    y = y.todense()
scores = np.ravel(spearman(X.T, y.reshape((1, -1))))
for nd, sc in zip(nd_X, scores):
    setattr(network.get_edge_data(nd, nd_y), key, sc)

Looking forward to your reply!

Thanks
tingting

@kaizhang
Copy link
Owner

kaizhang commented Apr 6, 2024

what was the error message?

@TingTingShao
Copy link
Author

Sorry, miss the error line, this is the error:

PanicException: Cannot compute correlation for type uint32

@thecatsmilk
Copy link

I am having this same issue. Is there any update on this?

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

3 participants