![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
R语言
小羊小羊,遇事不难
这个作者很懒,什么都没留下…
展开
-
【无标题】Error: The input GRanges (your vcf data) and the ref_genome do not have the same genome
【代码】【无标题】Error: The input GRanges (your vcf data) and the ref_genome do not have the same genome。原创 2023-05-17 22:25:08 · 74 阅读 · 0 评论 -
FPKM转为TPM时报错Error in log(fpkm) : non-numeric argument to mathematical function
报错原因log(fpkm)中fpkm值不能为0,如果M_NM_ftkm数据框中有值为0,则会报错。log(fpkm)中的值需要时数值型的,将数据转为数值型即可。报错原因:需要先将list转为unlist,原创 2023-04-29 21:23:20 · 885 阅读 · 0 评论 -
ggsave保存图片报错Error in x$theme : $ operator not defined for this S4 class
解决方法:用png()保存即可。原创 2023-03-18 09:42:09 · 1792 阅读 · 1 评论 -
R中报错Error: Continuous value supplied to discrete scale
报错原因:画图的对象可能是factor,导致了报错。改为character即可。原创 2023-03-06 22:50:32 · 1212 阅读 · 0 评论 -
plot_pseudotime_heatmap报错Error in intI(i, n = x@Dim[1], dn[[1]], give.dn = FALSE) : invalid chara
原因a向量中有部分基因不在HSMM的行名中。解决办法,删除这部分基因即可。原创 2023-02-25 15:01:38 · 1012 阅读 · 1 评论 -
Error in plot_genes_branched_heatmap(HSMM[row.names(subset(BEAM_res_1, : non-numeric argument to
试试将 plot_genes_branched_heatmap中的参数num_clusters 改变。R中用monocle画图plot_genes_branched_heatmap报错。原创 2022-12-21 15:10:57 · 338 阅读 · 0 评论 -
R中报错Error in mut[, pos] - 1 : non-numeric argument to binary operator
数据不是数值型,转换成数值型即可解决问题。原创 2022-11-28 20:02:44 · 1396 阅读 · 0 评论 -
monocle画热图报错Error in if (isSparseMatrix(exprs(X))) { : the condition has length > 1In addition: War
monocle中画图plot_genes_branched_heatmap报错,将cores数改为2即可正常运行。原创 2022-11-11 21:24:10 · 3222 阅读 · 3 评论 -
R中报错Error in idx[i, ] <- res[[i]][[1]] : number of items to replace is not a multiple of
运行predictions.assay原创 2022-10-19 16:31:47 · 2399 阅读 · 0 评论 -
DotPlot中画图指定横坐标
画出来的图的纵坐标是按照字母顺序排序的,也可以设置想要的顺序。原创 2022-10-10 12:55:57 · 1669 阅读 · 0 评论 -
ggplot画图去除背景
ggplot(data = Cell_Num, mapping = aes(x = Cell_type, y = Number, fill = Cell_type)) + geom_bar(stat = 'identity', position = 'identity') + xlab('Cell_type')+geom_text(mapping = aes(label = Number))+ theme_bw() + #去除背景色。原创 2022-09-25 22:19:31 · 1024 阅读 · 0 评论 -
R中ggsave画图变成了透明的背景,之前是白色的
透明色的背景不好看,于是在ggsave中改参数bg='white',即可。原创 2022-09-07 11:10:43 · 1324 阅读 · 0 评论 -
Seurat提取子集Warning message : longer object length is not a multiple
报错:Warning message : longer object length is not a multiple。#seurat对象为pancreas.integrated,想根据cells向量提取部分细胞。原创 2022-08-13 20:25:21 · 436 阅读 · 0 评论 -
R中报错ERROR: configuration failed for package ‘magick’
R中安装SpatialExperiment包报错。报错内容似乎是缺少imagemagick。解决方法:尝试用conda安装。原创 2022-08-09 21:26:03 · 1038 阅读 · 0 评论 -
R中使用filter函数过滤数据时报错Error in filter(test, test$integrated_snn_res.1.1 == 0) : ‘filter‘里有遺漏值
告诉R需要用哪个包里的filter函数。'filter'里有遺漏值。原创 2022-08-04 21:56:01 · 1169 阅读 · 0 评论 -
DimPlot画图报错Error: Must request at least one colour from a hue palette.
发现meta.data信息中行名已经不是barcode名了,修改回barcodes名。前提:在seurat对象的meta.data中加了一列信息,想用这列信息画图。DimPlot画图时报错。原创 2022-08-04 10:43:26 · 5126 阅读 · 2 评论 -
infercnv报错Error in readRDS error reading from connection
解决办法:删除原来跑的过程中自动生成的文件夹,再重新跑一次。infercnv报错Error in readRDS。原创 2022-08-03 14:44:28 · 2364 阅读 · 0 评论 -
R中修改列的顺序
将原来的1-12列变成了1,7,2,8,5,11,6,12,3,9,4,10。原创 2022-07-27 14:35:59 · 4335 阅读 · 0 评论 -
R中pheatmap画图一直报错Error in if (!(names(annotation)[i] %in% names(annotation_colors))) { : argument
查看annotation_row类型,发现不是data.frame,改后成功。原创 2022-07-27 13:44:11 · 2109 阅读 · 0 评论 -
R中安装一些难安装的包
最后尝试找到MERINGUE包的在github上的网址,搜索MERINGUEgithub,发现开发这个包的作者提供了安装的代码。以后安装包找不到好的解决方法,特别是一些小众的包,可以尝试直接在github上搜索,也许作者已经给了安装的代码。之前安装MERINGUE包,各种方法尝试了,仍然不行。...原创 2022-07-20 20:34:32 · 464 阅读 · 0 评论 -
seurat中报错Error: Cannot add a different number of cells than already present
对整合分析后的seurat对象想取出其中的某个cluster进行再聚类分析,但报错参考解决办法,即Integrated后的对象不需要再进行NormalizeData() 和 FindVariableFeatures(), 直接跑 ScaleData()即可 参考Normalization Error: Cannot add different number of cells than already present · Issue #4228 · satijalab/seurat · GitHub...原创 2022-07-04 14:14:21 · 3036 阅读 · 0 评论 -
infercnv报错Error in base::rowMeans(x, na.rm = na.rm, dims = dims, ...) : ‘x‘ must be an array of a
跑infercnv的过程中报错Error in base::rowMeans(x, na.rm = na.rm, dims = dims, ...) : 'x' must be an array of at least two dimensionsinfercnv::run函数跑到第三步骤就进行不下去了,网上搜索解决办法,发现github上有人给出建议参考Error in base::rowMeans(x, na.rm = na.rm, dims = dims, ...) : 'x' must be原创 2022-06-27 23:45:39 · 1934 阅读 · 0 评论 -
【无标题】 barplot(reactome,showCategory=15)画图报错Error in ans[ypos] <- rep(yes, length.out = len)[ypos]
报错内容:解决方法:有可能是因为根据既有的过滤标准没有被富集到的通路,放宽限定的阈值即可。例如, 此外可通过设置参数,设置轴标签文字的每行字符数长度,过长则会自动换行。参考[富集分析] 3、clusterprofile富集分析--下游可视化 - 简书 (jianshu.com)...原创 2022-06-27 23:36:35 · 1344 阅读 · 1 评论 -
R中运行函数enrichPathway报错character(0)Failed with error: ‘‘package‘的长度必需为一’?
R中运行函数enrichPathway时报错如下解决方法,查看help文档,将organism参数值改为mouse原创 2022-06-10 20:58:02 · 2344 阅读 · 1 评论 -
R中函数enrichKEGG报错Error in download.KEGG.Path(species) :‘species‘ should be one of organisms listed in
在R中用enrichKEGG函数进行富集分析时,发现一直报错,尝试修改网络,导入library(DO.db)等网上的解决方法时都没有用,还是出现如下报错,偶然间看到jimmy老师的博客,尝试了下,解决了问题。运行下面代码即可 参考KEGG数据库倒闭了吗 (360doc.com)...原创 2022-06-10 19:41:57 · 13806 阅读 · 8 评论