千家信息网

table2itol怎么安装设置

发表于:2026-11-03 作者:千家信息网编辑
千家信息网最后更新 2026年11月03日,本篇内容介绍了"table2itol怎么安装设置"的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!tab
千家信息网最后更新 2026年11月03日table2itol怎么安装设置

本篇内容介绍了"table2itol怎么安装设置"的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!

table2itol简介

table2itol是在GitHup上公开的R语言包,其作用是专门为iTOL生成所需的注释文件,只需准备表格形式的数据,包含配色方案的注释文件就会自动生成,极大提高了准备注释文件的效率。

table2itol下载安装

对于习惯使用Linux系统的同学,可以这样安装:

wget https://github.com/mgoeker/table2itol/archive/master.zip unzip master.zip ## 测试 cd table2itol-masterRscript table2itol.R  chmod +x table2itol.R  ./table2itol.R

习惯使用Windows系统的同学,可以这样安装:

GitHup上直接下载table2itol压缩包,解压后放在 F:\software 文件夹下。在R或Rstudio中导入table2itol.R。

setwd("F:/software/table2itol-master")source("table2itol.R")

table2itol依赖包安装

在R或Rstudio中,安装方法如下:

### 安装依赖包 site="https://mirrors.tuna.tsinghua.edu.cn/CRAN" # 依赖包列表:参数解析、数据变换、绘图和开发包安装、安装依赖、ggplot主题 package_list = c("grid","ggplot2","gridExtra","vegan","reshape2","readODS") # 判断R包加载是否成功来决定是否安装后再加载 for(p in package_list){      if(!suppressWarnings(suppressMessages(require(p, character.only = TRUE, quietly = TRUE, warn.conflicts = FALSE)))){           install.packages(p, repos=site)           suppressWarnings(suppressMessages(library(p, character.only = TRUE, quietly = TRUE, warn.conflicts = FALSE)))       } }  #### 安装缺少的R包 source("http://bioconductor.org/biocLite.R") biocLite(c("optparse", "plotrix", "readODS", "readxl", "yaml"))

输入文件准备

table2itol的输入文件格式很多,以最常用的表格为例

选项设置

table2itol.R的选项有很多,不同选项可生成不同的注释文件,选项列表如下:

Options:        -a, --abort                Abort if a requested column cannot be found instead of just skipping the data set [default: FALSE]        -b NAME, --background=NAME                Column to define the background colours of the tip labels; empty means no background colours [default: ]        -c NAME, --conversion=NAME                Convert integer columns to factors ('factor') or numbers with decimal points ('double') or just not 0/1 to logical vectors ('keep') [default: none]        -C FILE, --colour-file=FILE                File in YAML format defining alternative colour vectors for domain output [default: ]        -d, --double-to-bars                Create bar charts, not gradients, from numbers with decimal points ('double') [default: FALSE]        -D DIR, --directory=DIR                Place output files in this directory ('.' means working directory, empty means input file directory) [default: .]        -e NAME, --emblems=NAME                Column to define symbol assignments; ignored if empty [default: ]        -f NUMBER, --favour=NUMBER                Numeric factor for favouring colours over symbols (higher => more colours relative to symbols) [default: 1]        -G FILE, --gradient-file=FILE                File in YAML format defining alternative colours for gradient and binary output [default: ]        -h, --help                Show this help message, then exit [default: FALSE]        -i NAME, --identifier=NAME                Mandatory identifier column; after modification as defined by --template this column must yield the tip labels of the tree [default: ID]        -j NAME, --identifier2=NAME                Optional 2nd identifier column, causing output of branchsymbols; together with -i this identifies a node [default: ]        -l NAME, --label=NAME                Column to define the tip labels displayed in the picture in place of the tip labels found in the tree [default: Label]        -m INTEGER, --max-size=INTEGER                Exceeding this threshold causes fewer colours and more symbols to be selected (see also --favour); also determines size of branch symbols [default: 20]        -n TEXT, --na-strings=TEXT                Sentinels for missing input values; several can be provided, separated by the value of --separator [default:    (null)  NA]        -o NUMBER, --opacity=NUMBER                Numeric factor for the transparency of the colours (0 => transparent, 1 => fully opaque) [default: 1]        -p INTEGER, --precision=INTEGER                Number of decimal points used in the gradient legends [default: 1]        -r TEXT/NUMBER, --restrict=TEXT/NUMBER                How to select from numeric values that yield branch symbols [default: ]        -s CHARACTER, --separator=CHARACTER                Input column separator for CSV-like files [default:     ]        -t PATTERN, --template=PATTERN                Template for sprintf function to convert ID column when deviating from tip labels [default: %s]        -w NUMBER, --width=NUMBER                Border with used for domains, colour strips etc. [default: 0.5]

也可在解压安装目录下的 table2itol_help.txt 文件或者直接调用帮助信息查看。大家灵活选择使用的选项即可。

生成注释文件

文件准备完成后就需要生成注释文件了,有两种方式生成:一种为linux下命令行运行方式,另一种是在R或Rstudio中运行。

linux下命令行运行:

./table2itol.R --na-strings X --identifier Tip --label Name ann1.tsv ann2.tsv

R或Rstudio中运行:

source("table2itol.R") create_itol_files(infiles = c("ann1.tsv", "ann2.tsv"),   identifier = "Tip", label = "Name", na.strings = "X")

"table2itol怎么安装设置"的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注网站,小编将为大家输出更多高质量的实用文章!

文件 注释 生成 准备 运行 不同 内容 同学 命令 数据 方式 是在 更多 知识 系统 表格 输入 实用 学有所成 接下来 数据库的安全要保护哪些东西 数据库安全各自的含义是什么 生产安全数据库录入 数据库的安全性及管理 数据库安全策略包含哪些 海淀数据库安全审计系统 建立农村房屋安全信息数据库 易用的数据库客户端支持安全管理 连接数据库失败ssl安全错误 数据库的锁怎样保障安全 互联网科技产业 科技金融是不是互联网金融 科技股互联网 互联网科技财经 互联网金融 金融科技 浩特互联网科技 远拓互联网科技 卫星互联网科技股票 湖南诚度互联网科技有限公司 互联网金融中的现代科技 南平创想时代互联网科技有限公司 互联网科技产业特征 民营互联网公司国防科技 启辰互联网科技 宁波跨境商互联网科技有限公司 互联网科技企业商标注意事项 安徽零酒互联网科技有限公司 河南商务圈互联网科技有限公司 互联网领先科技成果宣传视频 互联网科技自媒体灵感 互联网中国科技 深圳卡尔迅互联网科技有限公司怎么样 互联网科技创新企业排名 开启互联网科技时代小说 互联网科技的全部知识 长沙茂晟互联网科技有限公司 互联网科技大赛获奖感言 互联网科技如何创业 上海同邻互联网科技有限公司规模 福仕德教育科技互联网
0