bed

package
v5.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: AGPL-3.0, AGPL-3.0-or-later Imports: 6 Imported by: 0

Documentation

Overview

Package bed is a library for parsing and representing BED files. See https://genome.ucsc.edu/FAQ/FAQformat.html#format1

Index

Constants

This section is empty.

Variables

View Source
var (
	// Strand forward.
	SF = utils.Intern("+")
	// Strand reverse.
	SR = utils.Intern("-")
)

Symbols for optional strand field of a Region.

Functions

func AddRegion

func AddRegion(bed *Bed, region *Region)

AddRegion adds a region to the bed region map.

Types

type Bed

type Bed = utils.SmallMap

Bed represents the contents of a BED file. See https://genome.ucsc.edu/FAQ/FAQformat.html#format1 It maps chromosome names onto bed regions. utils.Symbol -> []*Region

func ParseBed

func ParseBed(filename string) Bed

ParseBed parses a BED file. See https://genome.ucsc.edu/FAQ/FAQformat.html#format1

type Region

type Region struct {
	Chrom          utils.Symbol
	Start          int32
	End            int32
	OptionalFields []interface{}
}

A Region is a struct for representing intervals as defined in a BED file. See https://genome.ucsc.edu/FAQ/FAQformat.html#format1

func NewRegion

func NewRegion(chrom utils.Symbol, start int32, end int32, fields []string) *Region

NewRegion allocates and initializes a new Region. Optional fields are given in order. If a "later" field is entered, then the "earlier" field was entered as well. See https://genome.ucsc.edu/FAQ/FAQformat.html#format1

Jump to

Keyboard shortcuts

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