This is a test version of Biostars. For the public version, visit https://www.biostars.org.
vg surject get unbalanced pair end result

I am using vg girrafe with parameter -M 2 for multi alignment. Then I use vg surject(-i -M) to get a bam file. My stat result(samtools) is strange:

SN      raw total sequences:    2329631157
SN      filtered sequences:     0
SN      sequences:      2329631157
SN      is sorted:      0
SN      1st fragments:  1824883533
SN      last fragments: 504747624
SN      reads mapped:   2247549801
SN      reads mapped and paired:        1008063483      # paired-end technology bit set + both mates mapped
SN      reads unmapped: 82081356
SN      reads properly paired:  718413465       # proper-pair bit set
SN      reads paired:   1008063483      # paired-end technology bit set

1st fragments and last fragments is so unbalanced so I am wondering is there something wrong with the label in the second column of the bam file. Can anyone help? Thanks!

vg

1 answer

What is the situation after each step? How many reads do you have in total? What are the alignment statistics after mapping the reads with Giraffe (vg stats -a alignments.gam graph.gbz)?

What is the graph you are mapping to? Does it contain multiple references? For example, if you are using HPRC graphs, both GRCh38 and CHM13 would be marked as reference samples. If you specify vg surject option -M, the BAM output will contain duplicate alignments to each reference the original alignment in the graph overlaps with. If there are multiple references, you may specify the one you want to use with --into-ref sample. Or you can update the reference status in the GBZ itself (vg gbwt -Z input.gbz --set-reference sample -g output.gbz; add --gbz-format in older versions of vg).

Thanks. vg stats results are as follows:

Total alignments: 3150721642
Total primary: 2329631157
Total secondary: 821090485
Total aligned: 2259591784
Total perfect: 1054518752
Total gapless (softclips allowed): 2229061573
Total paired: 2329631157
Total properly paired: 0

I am using HPRC and I will try set ref name in vg giraffe.

Log in to answer this question.