转化格式
vg convert merge.combined.giraffe.gbz -x merge.combined.giraffe.xg
vg convert merge.combined.giraffe.gbz -p merge.combined.giraffe.vg
vg convert -f path_vg.find.vg > path_vg.find.gfa
vg index arenosa_pg.gbz -j arenosa_pg.dist
vg minimizer arenosa_pg.gbz -d arenosa_pg.dist -o arenosa_pg.min
# call VCF
vg autoindex -t 10 -T temp/ --workflow giraffe --workflow map --prefix pg/var --ref-fasta r.fa --vcf var.vcf
vg gbwt --num-threads 50 -o pg/var.gbwt -g pg/var.gg -Z pg/var.giraffe.gbz
vg snarls -t 50 pg/var.giraffe.gbz > pg/var.giraffe.snarls
vg giraffe -Z pg/var.giraffe.gbz -f mut_read.fq > mut_read.gam
vg view -A mut_read.gam -d pg/var.giraffe.gbz | dot -Tpdf -o mut_read.aln.pdf
vg pack -t 50 -Q 0 -x pg/var.giraffe.gbz -g mut_read.gam -o mut_read.pack
vg call -t 50 -m 1,1 -k mut_read.pack pg/var.giraffe.gbz -a -g pg/var.gbwt -s sample -r pg/var.giraffe.snarls > mut_read.vcf
提取子图
# 120:1207 起始Node和终止Node
vg find -x Chr10.mod.vg -r 120:1207 -c 0 > subgraph.vg
vg find -x Srufi.combined.giraffe.vg -N nodes.list -c 0 > path_vg.find.vg
call vcf 文件
# graph called 1262 variants
~/tools/vg pack -x ebv.d2.xg -g mapped.gam -Q 5 -s 5 -o mapped.pack
~/tools/vg call ebv.d2.xg -k mapped.pack -a > graph_calls.vcf
# Deepvariant called 571 variants
~/tools/vg surject -t 4 -b -x ebv.d2.xg mapped.gam > ebv_mapped.bam &
samtools sort -@ 4 ebv_mapped.bam -o ebv_mapped_sorted.bam &
samtools index -@ 4 ebv_mapped_sorted.bam &
samtools view ebv_mapped_sorted.bam -h |sed -e 's/NC007605#0#//g' |samtools view -b - > ebv_mapped_sorted_modref.bam
gatk MarkDuplicates -I ebv_mapped_sorted_modref.bam -O ebv_mapped_sorted_modref.removedup.bam -M ebv_mapped_sorted_modref.metrics.txt
samtools index -@ 4 ebv_mapped_sorted_modref.removedup.bam
# graph called 2238 variants
~/tools/vg call ebv-aug.pg -r ebv-aug.snarls -k ebv-aug.pack -s CHS178 > ebv-aug-calls.vcf
第三种可能是错误的方法,来源于github 讨论
https://github.com/vgteam/vg/issues/4088
网友评论