bed

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package bed handles BED I/O.

Format

This package uses the format described in: https://en.wikipedia.org/wiki/BED_(file_format)

Index

Constants

View Source
const (
	PlusStrand  = "+"
	MinusStrand = "-"
	NoStrand    = "."
)

Valid values for the strand field.

Variables

This section is empty.

Functions

This section is empty.

Types

type BED added in v0.1.2

type BED struct {
	Chrom       string
	ChromStart  int // 0-based
	ChromEnd    int // 0-based exclusive
	Name        string
	Score       int
	Strand      string
	ThickStart  int
	ThickEnd    int
	ItemRGB     [3]byte
	BlockCount  int
	BlockSizes  []int // Length should match BlockCount
	BlockStarts []int // Length should match BlockCount
}

BED is a single line in a BED file.

type Reader added in v0.1.3

type Reader struct {
	// contains filtered or unexported fields
}

A Reader reads and parses BED lines.

func NewReader added in v0.1.3

func NewReader(r io.Reader) *Reader

NewReader returns a new BED reader that reads from r.

func (*Reader) Next added in v0.1.3

func (r *Reader) Next() (*BED, int, error)

Next returns the next BED line, and the number of fields that were found. That number of fields will be populated in the result BED, by order of appearance. The rest will have zero values.

Jump to

Keyboard shortcuts

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