美文网首页
maf2vcf maf与vcf格式之间的转换

maf2vcf maf与vcf格式之间的转换

作者: 果蝇的小翅膀 | 来源:发表于2021-05-22 10:18 被阅读0次

    背景

    突变软件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
    ~~~外完待续~~~~

    相关文章

      网友评论

          本文标题:maf2vcf maf与vcf格式之间的转换

          本文链接:https://www.haomeiwen.com/subject/leenjltx.html