命令简介

1. 准备数据
Last10 16:51:56 ~
$ cd Data/
Last10 16:59:34 ~/Data
$ LS
The program 'LS' is currently not installed. To run 'LS' please ask your administrator to install the package 'sl'
Last10 16:59:36 ~/Data
$ ls
Data.tar.gz
example.fa
example.fq
example.gtf
Homo_sapiens.GRCh38.102.chromosome.Y.gff3.gz
readme.txt
Last10 16:59:40 ~/Data
$ less -S example.gtf
Last10 17:02:30 ~/Data
$

2. 结合管道 显示一列
less -S example.gtf | cut -f 1

3. 显示多列
$ less -S example.gtf | cut -f 1,3-5,7
chr1 UTR 1737 2090 +
chr1 exon 1737 2090 +
chr1 transcript 1737 4275 +
chr1 gene 1737 4275 +
chr1 exon 1873 1920 +
chr1 transcript 1873 3533 +
chr1 exon 2042 2090 +
chr1 exon 2476 2560 +
chr1 UTR 2476 2584 +
chr1 exon 2476 2584 +
4.指定分隔符
$ less -S example.gtf | cut -d 'h' -f 1
c
c
c
c
c
c
c
c
c
c
c
c
c
c
网友评论