Subset a GAM (graph alignment) file
1
0
Entering edit mode
3 months ago
Pau • 0

I would like to subset a GAM file to contain less reads so I can visualize it with Sequence Tube Map.

I've tried

vg view -a myreads.gam | head -n1000 | vg view -G -J

but it doesn't recognize the standard input.

I was hoping that something like samtools view -s 0.1 bamfile.bam

Thanks

pangenome vg vgteam • 407 views
ADD COMMENT
2
Entering edit mode
3 months ago
glenn.hickey ▴ 550

For the first 1000 reads:

vg view -a myreads.gam | head -n1000 | vg view -a -G -J - > myreads_1000.gam

For downsampling like samtools

vg filter myreads.gam -d 0.1 > myreads_0.1.gam
ADD COMMENT

Login before adding your answer.

Traffic: 5281 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