liftover

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2024 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package liftover provides utilities for lifting genomic coordinates from one reference genome to another, a process known as "lifting over". It leverages a database to store and retrieve the necessary chain and alignment information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lift

func Lift(ctx context.Context, src ChainSource, from types.Reference, chromosome types.Chromosome, position int64) (int64, error)

Lift returns the position in the query genome for the given position in the reference genome.

func StoreChainFile

func StoreChainFile(ctx context.Context, db *genobase.DB, from types.Reference, cf *chainfile.ChainFile, showProgress bool) error

StoreChainFile stores the chain file in the database in a queryable format.

Types

type ChainSource

type ChainSource interface {
	// GetChain returns the chain for the given chromosome and position.
	GetChain(ctx context.Context, from types.Reference, chromosome types.Chromosome, position int64) (*types.Chain, error)
	// GetAlignment returns the alignment for the given chain and offset from the
	// start of the chain.
	GetAlignment(ctx context.Context, chainID int64, offset int64) (*types.Alignment, error)
}

ChainSource is a source of chain and alignment information.

Directories

Path Synopsis
Package chainfile provides utilities for reading chain files.
Package chainfile provides utilities for reading chain files.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL