In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "how to install table2itol". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Introduction to table2itol
Table2itol is a R language package exposed on GitHup, and its function is to generate the required comment files for iTOL. As long as you prepare the tabular data, the annotation files including the color scheme will be generated automatically, which greatly improves the efficiency of preparing the annotation files.
Download and install table2itol
For students who are used to using the Linux system, you can install it as follows:
Wget https://github.com/mgoeker/table2itol/archive/master.zip unzip master.zip # # Test cd table2itol-masterRscript table2itol.R chmod + x table2itol.R. / table2itol.R
Students who are accustomed to using the Windows system can install it as follows:
Download the table2itol package directly from GitHup, decompress it and put it in the F:\ software folder. Import table2itol.R in R or Rstudio.
Setwd ("F:/software/table2itol-master") source ("table2itol.R") table2itol dependency package installation
In R or Rstudio, the installation method is as follows:
# installation dependency package site= "https://mirrors.tuna.tsinghua.edu.cn/CRAN" # dependency package list: parameter parsing, data transformation, drawing and development package installation, installation dependency, ggplot theme package_list = c (" grid "," ggplot2 "," gridExtra "," vegan "," reshape2 ") "readODS") # determine whether the R package is loaded successfully to decide whether to load 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))}} # install the missing R package source ("http://bioconductor.org/biocLite.R") biocLite (c (" optparse "," plotrix "," readODS "," readxl "," yaml ")) input file preparation
There are many input file formats for table2itol, taking the most commonly used tables as an example
Option settin
There are many options for table2itol.R. Different options can generate different comment files. The list of options is as follows:
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 0go 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]
You can also unzip the table2itol_help.txt file in the installation directory or call the help information directly to view it. You can choose the options you use flexibly.
Generate comment file
After the file is ready, you need to generate a comment file, which can be generated in two ways: one is to run on the command line under linux, and the other is to run in R or Rstudio.
Run on the command line under linux:
. / table2itol.R-na-strings X-identifier Tip-label Name ann1.tsv ann2.tsv
Run in R or Rstudio:
Source ("table2itol.R") create_itol_files (infiles = c ("ann1.tsv", "ann2.tsv"), identifier = "Tip", label = "Name", na.strings = "X") "how to install settings for table2itol" ends here. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.