1.首先得到人类基因组注释文件并解压
wget -c ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_29/gencode.v29.annotation.gtf.gz
gunzip -f gencode.v29.annotation.gtf.gz
2.从中抓取出5号染色体的注释信息并新建一个注释文件
grep chr5 gencode.v29.annotation.gtf > gencode.v29.annotation.chr5.gtf
3.再从中抓取出来源是ENSEMBL的
grep ENSEMBL gencode.v29.annotation.chr5.gtf > gencode.v29.annotation.chr5.ensembl.gtf
PS:2、3命令可以直接通过管道命令来一行命令完成
grep chr5 gencode.v29.annotation.gtf | grep 'ENSEMBL' > gencode.v29.annotation.chr5.ensembl.gtf
这样由于命令2中得到的输出直接作为了命令3的输入,中间会少产生一个过程文件
[g19@halo Homework1]$ ls
gencode.v29.annotation.chr5.ensembl.gtf gencode.v29.annotation.chr5.gtf gencode.v29.annotation.gtf
[g19@halo Homework1]$ ls
gencode.v29.annotation.chr5.ensembl.gtf