背景
突变软件call出突变之后,一般是VCF的格式,通常要把不同的病人的VCF文件整合成一个maf文件,其中maf文件的格式可以参考TCGA给出的maf格式【1】.
方法
利用vcf2maf【2】 进行maf和vcf之间的转换。
实例
1、maf转成vcf文件
#Running in R
library(tidyverse)
file = "Three.imputed_raw.maf"
maf = read.delim(file = file, header = T, sep = "\t")
maf.new = maf %>%
mutate( t_depth = Ref_allele_depth + Alt_allele_depth ,
n_depth = n_alt_count+ n_ref_count ) %>%
rename(t_ref_count = Ref_allele_depth,
t_alt_count = Alt_allele_depth )
write.table(maf.new, file = "Three.imputed_raw.maf.1", row.names = F, quote = F, sep = "\t")
#Running in shell
#write
index=~/.vep/homo_sapiens/101_GRCh37/Homo_sapiens.GRCh37.dna.primary_assembly.fa.gz
maf2vcf.pl --input-maf Three.imputed_raw.maf.1 \
--output-dir split.vcfs --ref-fasta $index \
--per-tn-vcfs
参考文献:
【1】maf格式说明:https://docs.gdc.cancer.gov/Data/File_Formats/MAF_Format/?tdsourcetag=s_pcqq_aiomsg
【2】 vcf2maf:https://github.com/mskcc/vcf2maf
~~~外完待续~~~~
网友评论