【问题标题】:error unused argument for gene_ontology function错误未使用的参数为gene_ontology 函数
【发布时间】:2020-06-06 18:47:58
【问题描述】:

我正在尝试在 R 中执行基因本体分析,但出现此错误;

Error in get_ontology(x, name = paste("Cluster", names(df.list[i]), "Pathways_for_kmeans_cluster",  : 
  unused argument (name = paste("Cluster", names(df.list[i]), "Pathways_for_kmeans_cluster", j, sep = "_"))

在我运行这个脚本之后:

numclus <- sort(unique(df.list[[i]]$kmeans.cluster))
subdirname <- paste("D:/Master jaar 1/RP1/RP1 projects/Aged macrophage characterisation/Single cell sequencing/nieuwe stuff", "/top100_genes_from_", names(df.list[i]), "_pathways_from_kmeans_clusters", sep = " ")
dir.create(subdirname, showWarnings = FALSE)
install.packages("ontologyPlot")


for (j in numclus){
   x <- data.frame(gene = rownames(df.list[[i]][which(df.list[[i]]$kmeans.cluster == j),]), avg_logFC = 0)}
   if(nrow(x)>10){
     get_ontology(x, name = paste("Cluster", names(df.list[i]), "Pathways_for_kmeans_cluster", j, sep = "_"), return.data = F, outdir = subdirname, full_GSEA = F)
   }
 }

get_ontology 行后出现错误

【问题讨论】:

  • 函数get_ontology的第一个参数是file,描述为“OBO格式文件的文件路径。”。请阅读您正在使用的功能的帮助页面,help('get_ontology')

标签: r


【解决方案1】:

它告诉你get_ontology 没有名为name 的参数。您还没有告诉我们您正在使用哪些软件包,所以我无法为您提供更多帮助,但您可能会通过查看在线帮助获得一些帮助。

【讨论】:

  • 我使用的包是ontologyIndex
  • 那么你应该知道get_ontology 有调用参数filepropogate_relationshipsextract_tags。不是名字。您需要的所有信息都在在线软件包文档中。使用library() 加载包后,输入?get_ontology
猜你喜欢
  • 1970-01-01
  • 2019-11-15
  • 1970-01-01
  • 2014-03-31
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多