Question about `vg giraffe`
1
0
Entering edit mode
4 days ago
zhengluo • 0

When I use vg giraffe to align reads to a graph and generate a BAM file, is there a way to determine the positions aligned to any genome (non-reference genomes) in the graph?

vg • 378 views
ADD COMMENT
2
Entering edit mode
3 days ago
Jouni Sirén ▴ 610

The easiest way is to align the reads to the graph in GAM or GAF format. Then you select sample sample as the reference using vg gbwt:

vg gbwt --set-reference sample -g output.gbz --gbz-format -Z input.gbz

And then you convert the mappings to BAM using vg surject with the output graph. If the sample is diploid, both haplotypes will be used as references.

If you want to consider only one haplotype (e.g. 1), you can select path names for that haplotype using:

vg paths -L -S sample -x output.gbz | grep "#1#" > paths.txt

Then you can provide the path name list to vg surject using option --into-paths paths.txt.

ADD COMMENT

Login before adding your answer.

Traffic: 2248 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6