经过WGS上游分析之后,会产生类似于样本对应的*_hg38_multianno.txt文件:
然后通过合并txt文件,调整数据,生成一个多样本融合txt文件:
一、通过脚本合并txt文件
for id in *hg38_multianno.txt
do
add=${id##*/};add=${add%%.*};awk '{if (NR==1) {print $0, "Tumor_Sample_Barcode"}; if (NR>1) {print $0,"'"$add"'"}}' $id >> merged.hg38_multianno.txt
done
二、调整数据
1、取出行名:
cat merged.hg38_multianno.txt |head -1 > merg.head.txt
2、调整merge文件
cat merged.hg38_multianno.txt|head-1>merg.head.txt
cat merged.hg38_multianno.txt|grep-v"Tumor_Sample_Barcode">merged.hg38_multianno.txt2
cat merg.head.txt merged.hg38_multianno.txt2>merged.hg38_multianno.txt3
awk '{print$1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$NF}' merged.hg38_multianno.txt3>merged.hg38_multianno.txt.final
三、在R中进行下游分析
1、生成maf文件
annovarToMaf(annovar = "Annovar/merged.hg38_multianno.txt.final",Center = NULL,refBuild = "hg38",tsbCol = 'Tumor_Sample_Barcode',sep = " ",MAFobj = T,basename = "merged.hg38_multianno.fianl")
2、读入maf文件
merged.hg38_multianno_maf <- read.maf(maf = "merged.hg38_multianno.fianl.maf")
3、作maf文件统计概要图
plotmafSummary(maf = merged.hg38_multianno_maf , rmOutlier = T , addStat = "median" , dashboard = T , titvRaw = F)
4、绘制初版瀑布图
oncoplot(maf = merged.hg38_multianno_maf,draw_titv = T)
5、参考文章
https://www.haomeiwen.com/subject/kjqtmhtx.html
https://blog.csdn.net/qq_27390023/article/details/122307143
https://www.jianshu.com/p/90ddc0da1954