Comments (7)
I encountered this issue today trying to use vg to align to the HGVM bake-off graphs.
From looking at the SAM spec, it seems that it may be legal to set RNEXT to the next read's name while leaving PNEXT as 0 ("unavailable"), since it's potentially expensive to find the other alignment and work out where it mapped.
from vg.
That seems reasonable. We may need to make a second pass to resolve things.
This could possibly be done with
https://github.com/pezmaster31/bamtools/blob/master/src/toolkit/bamtools_resolve.cpp
On Fri, Aug 7, 2015 at 8:01 PM, adamnovak [email protected] wrote:
I encountered this issue today trying to use vg to align to the HGVM
bake-off graphs.From looking at the SAM spec, it seems that it may be legal to set RNEXT
to the next read's name while leaving PNEXT as 0 ("unavailable"), since
it's potentially expensive to find the other alignment and work out where
it mapped.—
Reply to this email directly or view it on GitHub
#25 (comment).
from vg.
Sorry, what I proposed is completely wrong, because I don't understand SAM.
In SAM, the QNAME field specifies the name of the fragment, not of the read. So the two ends of a paired end read are linked together by sharing a QNAME, and there's no need to actually fill in the RNEXT and PNEXT fields unless you want to be efficient.
RNEXT doesn't hold the name of the next read on the fragment, but rather the reference contig against which the next read on the fragment was aligned. If it's the same as the reference for the current fragment it can be "=".
It looks like what really needs to happen is that vg surject
needs to strip off the "/1" and "/2" that get added to the ends of fragment names when paired end reads are imported from FASTQ. You would still need another pass for the RNEXT/PNEXT fields and the flags.
Interestingly, right now paired-end information isn't read from BAM, and the "/1" and "/2" aren't added, so if you throw in a paired-end BAM you get multiple VG alignments with the same name.
from vg.
@adamnovak you haven't addressed this have you? Is it still a problem on your end?
from vg.
I don't think I actually need to surject paired reads for anything I am doing. @glennhickey may want it if he wants to run a read-pair-aware BAM-based variant caller as a control.
I haven't checked recently, but I think the handling of the BAM fragment names (not giving paired reads the same fragment name) is still wrong. With the right fragment names you can go through and reconstruct the mate-finding fields, but without it you have a BAM file that doesn't express pairing at all.
from vg.
I think the problem is how the reads are pulled out of the bam. The
converter I've used in samtools generates suffixes for the reads depending
on which part of the fragment they represent. vg needs to know to trim the
/1 or /2 from the fragment ends.
On Nov 16, 2015 7:47 PM, "adamnovak" [email protected] wrote:
I don't think I actually need to surject paired reads for anything I am
doing. @glennhickey https://github.com/glennhickey may want it if he
wants to run a read-pair-aware BAM-based variant caller as a control.I haven't checked recently, but I think the handling of the BAM fragment
names (not giving paired reads the same fragment name) is still wrong. With
the right fragment names you can go through and reconstruct the
mate-finding fields, but without it you have a BAM file that doesn't
express pairing at all.—
Reply to this email directly or view it on GitHub
#25 (comment).
from vg.
We now do this.
from vg.
Related Issues (20)
- `vg giraffe` for long reads HOT 1
- Missing '--alt-prefix' option in recent versions of vg deconstruct.
- Problem with vg autoindex with phased VCF HOT 2
- No sample & read group field in BAM output with vg map HOT 5
- I cant get .vg file using vg construct HOT 2
- `vg autoindex` fails on GFA file containing 20k SARS-CoV-2 sequences. HOT 1
- vg giraffe mapping HiFi HOT 1
- error vg autoindex: Input is not sufficient to create indexes HOT 2
- Oddly high mapping quality when aligning reads with Ns HOT 6
- Release vg v1.56.0
- I have a question about gam file. HOT 2
- vg surject: incorrect behavior near polymorphic {repetitive} insertions HOT 4
- Can vg construct a trans-chromosomal graph ? HOT 5
- ERROR: Signal 6 occurred. VG has crashed. HOT 8
- vg construct will let you create a graph without reference paths, with different path names than Cactus
- VG convert to gfa and back will drop path data. HOT 7
- ERROR: Signal 6 occurred. VG has crashed. Terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc HOT 1
- VG has crashed
- vg giraffe - Signal 6 occurred. VG has crashed HOT 1
- vg giraffe output file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vg.