maf2vcf maf与vcf格式之间的转换

背景

突变软件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 = "	")

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 = "	")

#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
~~~外完待续~~~~

© 版权声明
THE END
如果内容对您有所帮助,就支持一下吧!
点赞0 分享
评论 共1条

请登录后发表评论