CARVIEW |
Select Language
HTTP/2 200
date: Wed, 23 Jul 2025 15:05:51 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"b9d96e6bfe1accad6e45d7193f274ce1"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=IIoAwOkuWCVWwF2x4rrJ0yBe0X3MY2ND1HMkQt4vJZPtDXpkLO%2Bo2WrmlJ4gon7%2B4dVEmUypD2rScSicMrDjZcd19ZRNFQXCpBksdMThR1BgS8LK3KNgFW8ubAZtXFwBBYGrBGt6HpihFz0CATJYB5y3OF3ALanhz1Dd1b6lrzdZWDgTFoI7mrXvCXygWD0gsu7R%2BM%2FtdykvyEiyXEmzUPsYrLInddarXPPB646iZ%2BuP9mdpfSiju2GUJSUn4VvcQtUAqV5ygu9JMI3XlqwFyw%3D%3D--VRv%2FGOM8P6L%2Bp3yN--xqIX7aEe%2BCOd%2BxoSYg26cQ%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1569676808.1753283150; Path=/; Domain=github.com; Expires=Thu, 23 Jul 2026 15:05:50 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Thu, 23 Jul 2026 15:05:50 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 899E:26221E:DA9150:1027ECC:6880FA4E
Path Metadata Model · vgteam/vg Wiki · GitHub
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 211
Path Metadata Model
Jouni Siren edited this page Nov 9, 2023
·
7 revisions
There is a PathMetadata
interface which all PathHandleGraph
s, and consequently all of the graph types and files used in vg, implement. This page explains the way in which we model path metadata, how that model is implemented in different graph implementations and formats, and how this affects end users of vg tools trying to do analyses.
See also: Changing References
You can see an example of path metadata by running, from the repository's test
directory:
vg paths --metadata -x test/graphs/rgfa_with_reference.rgfa
This will produce TSV data:
#NAME SENSE SAMPLE HAPLOTYPE LOCUS PHASE_BLOCK SUBRANGE
sample1#2#chr1#0 HAPLOTYPE sample1 2 chr1 0 NO_SUBRANGE
CHM13#0#chr1#0 HAPLOTYPE CHM13 0 chr1 0 NO_SUBRANGE
coolgene[1] GENERIC NO_SAMPLE_NAME NO_HAPLOTYPE coolgene NO_PHASE_BLOCK 1
GRCh38#0#chr1 REFERENCE GRCh38 0 chr1 NO_PHASE_BLOCK NO_SUBRANGE
GRCh37#0#chr1#0 HAPLOTYPE GRCh37 0 chr1 0 NO_SUBRANGE
sample1#1#chr1#0 HAPLOTYPE sample1 1 chr1 0 NO_SUBRANGE
coolgene[7] GENERIC NO_SAMPLE_NAME NO_HAPLOTYPE coolgene NO_PHASE_BLOCK 7
Formatted as a table, that is:
#NAME | SENSE | SAMPLE | HAPLOTYPE | LOCUS | PHASE_BLOCK | SUBRANGE |
---|---|---|---|---|---|---|
sample1#2#chr1#0 | HAPLOTYPE | sample1 | 2 | chr1 | 0 | NO_SUBRANGE |
CHM13#0#chr1#0 | HAPLOTYPE | CHM13 | 0 | chr1 | 0 | NO_SUBRANGE |
coolgene[1] | GENERIC | NO_SAMPLE_NAME | NO_HAPLOTYPE | coolgene | NO_PHASE_BLOCK | 1 |
GRCh38#0#chr1 | REFERENCE | GRCh38 | 0 | chr1 | NO_PHASE_BLOCK | NO_SUBRANGE |
GRCh37#0#chr1#0 | HAPLOTYPE | GRCh37 | 0 | chr1 | 0 | NO_SUBRANGE |
sample1#1#chr1#0 | HAPLOTYPE | sample1 | 1 | chr1 | 0 | NO_SUBRANGE |
coolgene[7] | GENERIC | NO_SAMPLE_NAME | NO_HAPLOTYPE | coolgene | NO_PHASE_BLOCK | 7 |
From this, we can see that every path has:
- A name, which is a string that uniquely identifies the path. This can be in PanSN format, and may have an additional trailing
#
-delimited or[]
-enclosed field. - A sense. A pathc can be exactly one of haplotype sense (representing a haplotype that a particular individual has for part of a contig), reference sense (representing a path taken as part of a haploid or diploid linear reference like
GRCh38
orCHM13
), or generic sense (representing something else, like a gene or an aligned read). - A sample. For haplotypes, this is the identifier for the sampled individual, like
NA19239
orHG003
. For references, this is the name of the reference assembly, likeGRCh38
. For generic paths, this is unset. - A haplotype number, identifying which haplotype of a sample the path belongs to. For haplotype paths, this would be
0
or1
in a diploid organism. For reference paths, this is meant to be0
in a haploid reference, and1
or2
as appropriate in a diploid reference. For generic paths, this is unset. - A locus name. This indicates the chromosome or contig, within an assembly, which the path relates to. For a haplotype path derived from a VCF, this would be the VCF contig name that the haplotype is on, like
chr1
. For a haplotype path derived from an assembly, this would be the assembly contig name, likeJAHALY010000007.1
. For a reference path, this is the name of the contig within the reference assembly being expressed. For a generic path, this is the name of the thing that the generic path represents, such as a gene name or user-provided string. - A phase block. For haplotype paths, this is used when a contig is not phased through end to end. In that case, there willb e multiple haplotype paths on the contig with different phase block values, with the paths cut apart where phasing is unknown. For reference and generic paths, this is unset; for those paths, you should instead use subrange when multiple pieces of some longer path are present.
- A subrange, which has a start and an optional end coordinate. Positions are 0-based, start-inclusive, and end-exclusive. When this field is used, the path in the graph is part of some larger path that is not entirely in the graph. Multiple paths in the graph can have the same values for all the other metadata fields, as long as their subranges do not overlap. This field is only used for reference and generic paths; it is always unset for haplotype paths. For haplotype paths, the phase block field does much the same thing and should be used instead.
Clone this wiki locally
You can’t perform that action at this time.