#请统计人类基因注释文件(gencode.v34.chr.annotation.gff3.gz)中所有基因类型的数量。不限于linux命令或者python程序,或者其他方法,请简述思路并写出具体的命令/程序代码。#
gzip -d gencode.v34.chr.annotation.gff3.gz #解压gff文件压缩包
less -S gencode.v34.chr.annotation.gff3 #查看注释gff文件
less -S gencode.v34.chr.annotation.gff3 |cut -f9 |tr ";" "n" |grep gene_type | sort |uniq |wc -l #查看基因类型总个数
less -S gencode.v34.chr.annotation.gff3 |cut -f9 |tr ";" "n" |grep gene_type |sort |uniq -c #查看每种类型及个数
#假如你已经登录系统,但不清楚当前目录在哪里,如何显示当前目录?
pwd
#如何回到student目录(/home/student)
cd /home/student
#假如你位于目录/home/student,如何查询该目录下gencode开头的文件有哪些?
ls -a gencode*
#/home/student目录下,如何查看gencode.v32lift37.annotation.gff3的内容,并单行显示。
less -S gencode.v32lift37.annotation.gff3
#/home/student目录下,如何查看gencode.v32lift37.annotation.gff3一共有多少个基因(gene、transcript、exon)
cat gencode.v32lift37.annotation.gff3 |grep -w gene |wc -l (基因)
cat gencode.v34.chr.annotation.gff3 |grep -w transcript |wc -l(转录本)
cat gencode.v34.chr.annotation.gff3 |grep -w exon |wc -l (外显子)
#/home/student目录下,如何查看gencode.v32lift37.annotation.gff3中,染色体1有多少个基因?
cat gencode.v32lift37.annotation.gff3 |grep -w chr1 | grep -w gene |wc -l
#/home/student目录下,如何查看gencode.v32lift37.annotation.gff3中有多少protein_coding基因
cat gencode.v32lift37.annotation.gff3 |grep -w protein_coding |wc -l
#/home/student目录下,如何查看gencode.v32lift37.annotation.gff3中,一共有多少基因类型?
less -S gencode.v32lift37.annotation.gff3 |cut -f9 |tr ";" "n" |grep gene_type | sort |uniq |wc -l
#/home/student目录下,如何查看gencode.v32lift37.annotation.gff3每种基因类型各有多少个?
less -S gencode.v32lift37.annotation.gff3 |cut -f9 |tr ";" "n" |grep gene_type |sort |uniq -c
#home/student目录下,如何统计gencode.v32lift37.annotation.gff3中基因转录本的数量分布(1-n个转录本基因各有多少个?),基因最多有多少个转录本?
cat gencode.v32lift37.annotation.gff3 |awk '/(genet|transcriptt)/' |cut -f3 |uniq -c |grep transcript |sort |uniq -c 最多有: 239



