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

about the param of clusterprofiler #1

Open
donglianglxz opened this issue Feb 24, 2021 · 0 comments
Open

about the param of clusterprofiler #1

donglianglxz opened this issue Feb 24, 2021 · 0 comments

Comments

@donglianglxz
Copy link

donglianglxz commented Feb 24, 2021

organism = "org.Mm.eg.db"

#1.I choose all the genes
original_gene_list <- deg_2v1$log2FC
names(original_gene_list) <- rownames(deg_2v1)
gene_list = na.omit(original_gene_list)

gene_list = sort(gene_list, decreasing = TRUE)

#2.I choose the significent differential genes
sig_genes_df = genedif_2V1
genes = deg_2v1[genedif_2V1,1]
names(genes) = sig_genes_df
genes = sort(genes, decreasing = T)

genes = names(genes)

#3.enrichment analysis
go_enrich <- enrichGO(gene = genes,
universe = names(gene_list),
OrgDb = organism,
keyType = 'SYMBOL',
readable = T,
ont = "BP",
pvalueCutoff = 0.05,
qvalueCutoff = 0.10)

#the results of enrichment analysis showed below:
Error in names(x) <- value :
'names' attribute [2] must be the same length as the vector [1]

if I use the "genes" to replace the "names(gene_list)" at the parameter "universe", the result is the same.
could you give me some help? I don't know how to deal with the problem.

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