1 图片生成报错
> convertSVG("chromosome.svg",device = "png")
Warning message:
In checkValidSVG(doc, warn = warn) :
This picture may not have been generated by Cairo graphics; errors may result
哦,我亲爱的朋友们,这个报错看起来好像很严重,去看看工作路径,其实图已经出来了,这个报错可以忽略跳过啦。
2 ideogram导入数据报错
> ideogram(karyotype = dng_karyotype)
Error in `$<-.data.frame`(`*tmp*`, "y2", value = numeric(0)) :
替换数据里有0行,但数据有17
In addition: Warning message:
In max(karyotype$End) : no non-missing arguments to max; returning -Inf
或者这个报错
Error in round(rescale(mydata$Value, to = c(1, cnum))) :
non-numeric argument to mathematical function
其实都是细节问题,列名设置和RIdeogram不一致。仔细看,karyotype$End,mydata$Value
end,value都是大写开头,包括需要准备的其他文件,文件名格式和列名一定要与RIdeogram示范文件一模一样!
3 随便改名
> convertSVG("chromosome11.svg",device = "png")
Error in read_data(svg) :
Argument 'svg' or 'css' must be a file path, url, or raw vector.
这个"chromosome11.svg"
看起来是不是很像输出文件名?不是的哦,这个名称取决于上条命令设置的输入名称👇,默认是"chromosome.svg"
,如果要改输出名称,可以在convertSVG输出加参数file = “xxx”,或者在运行RIdeogram更改output= ,或者直接去工作路径手动改运行出来的文件名吧。