-
Notifications
You must be signed in to change notification settings - Fork 114
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
Prerank empties out the dictionary #80
Comments
Your gene_sets input has to be dictionary.
|
Not sure how I'm just seeing this now but it's still doing it. My example above was a dictionary which is why I did |
Here's the code: import pandas as pd
import gseapy as gp #version
'0.10.1'
import numpy as np
import pickle
# Get gene rank weights
with open("data_files/gene_weights.dict.pkl", "rb") as f:
genes = pd.Series(pickle.load(f))
rnk = genes.to_frame().reset_index()
rnk.columns = [0,1]
# Make directories and containers
outdir = "prerank_output_testing"
# Get gene set
with open("data_files/ecocyc_pathways.dict.pkl", "rb") as f:
gene_sets = pickle.load(f)
print("gene_sets is a {} type".format(type(gene_sets)))
print("First 10 items:", dict(list(gene_sets.items())[:10]))
print("There are a total of {} items".format(len(gene_sets)))
pre_res = gp.prerank(
rnk=rnk,
gene_sets=gene_sets,
processes=4,
min_size=5,
permutation_num=1000,
outdir=outdir,
seed=0,
no_plot=False,
) Here's the Can I request that we reopen this? |
Following up on this issue, I am using prerank on "KEGG_2021_Human" and I realized a gene list ('Non-homologous end-joining') is constantly removed from the testable ones. It is true it only contains 13 genes, but the same odd behaviour happens when I set |
It's not working for some reason. I also don't know why it's emptying out my dictionary.
The text was updated successfully, but these errors were encountered: