全基因组/外显子组测序分析

GATK后maftools可视化

2019-01-02  本文已影响0人  njmujjc

#####删除文件的前N行####

tail -n +N Het-158-rawGATK-indel-filter.vcf| head

#####合并所有VCF文件####(合并之后记得加上第一行)

for i in *.vcf ; do sed -i '1d' $i ; done

for i in *.vcf ; do cat $i >> 11.vcf; done

#####利用annovar转换格式#####

for i in *.vcf ; do perl /media/pc/disk2/annovar/convert2annovar.pl -format vcf4 $i > $i.avinput

#####添加样本名称#####(先把snp和indel文件合并会省事一点)

awk 'BEGIN{OFS="\t"}{print "chr"$1,$2,$3,$4,$5,"Het-158"}' Het-158-indel.vcf.avinput> Het-158-indel.tsv

#####合并所有tsv#####

for i in *.tsv ; do cat $i >> all.tsv; done

#####利用annovar注释####

perl /media/pc/disk2/annovar/table_annovar.pl all.tsv/media/pc/disk2/annovar/mousedb/ -buildver mm10 -out variants --otherinfo -remove -protocol refGene -operation g -nastring NA

####可选步骤:提取exonic上的信息#####

grep "exonic" variants.mm10_multianno.txt> exonic.mm10_multianno.txt

####Rstudio:导入到maftools###

>library(maftools)

>var.annovar.maf = annovarToMaf(annovar = "variants.mm10_multianno.txt",Center = 'CSI-NUS', refBuild = 'mm10',tsbCol = 'Tumor_Sample_Barcode', table = 'refGene')

>write.table(x=var.annovar.maf,file="var_annovar_maf",quote= F,sep="\t",row.names=F)

>var_maf = read.maf(maf="var_annovar_maf")

>plotmafSummary(maf = var_maf, rmOutlier = TRUE, addStat = 'median',showBarcodes = T)

>oncoplot(maf = var_maf, top = 10, fontSize = 12)

上一篇下一篇

猜你喜欢

热点阅读