igor

package
v0.0.0-...-d78363a Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: BSD-3-Clause, BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cluster

func Cluster(piles []*pals.Pile, cfg ClusterConfig) (int, [][]*pals.Pile)

Cluster performs sub-pile clustering according to the config provided. The number of sub-piles and a collection of piles broken into sub-piles is returned.

func Group

func Group(clust [][]*pals.Pile, cfg GroupConfig) []graph.Nodes

Group clusters the input pile collection based on the existence of satisfactory image alignments according to the provided config. Piles with nil locations are ignored. Checks are performed to ensure that the produced clusters can be unambiguously assigned to a DNA strand.

func Piles

func Piles(in *gff.Reader, overlap int, pf pals.PairFilter) ([]*pals.Pile, error)

Piles reads the features in the input gff.Reader and applies pals.Piler analysis using the specified overlap and pair filter function. The features in the input must satisfy pals.ExpandFeature restrictions.

func WriteJSON

func WriteJSON(cc []graph.Nodes, w io.Writer) error

Types

type ClusterConfig

type ClusterConfig struct {
	// BandWidth specifies the maximum fractional distance between
	// endpoints of images being clustered into sub-piles. See
	// turner.Cluster for details.
	BandWidth float64

	// RequiredCover specifies the target coverage fraction for
	// each input pile. If RequiredCover is greater than 1, all
	// all sub-piles are retained depending on the values of
	// KeepOverlaps and OverlapThresh.
	RequiredCover float64

	// OverlapStrictness specifies the clustering behaviour.
	// If OverlapStrictness is zero, all clusters are passed
	// returned. If set to one, clusters containing clusters
	// with greater depth are rejected. If set to two, contained
	// features overlapping by more than OverlapThresh fraction
	// of the smaller pile are are discarded.
	OverlapStrictness byte
	OverlapThresh     float64

	// Procs specifies the number of independent clustering
	// instances to run in parallel. If zero, only single threaded
	// operation is performed.
	Procs int
}

ClusterConfig specifies Cluster behaviour.

type GroupConfig

type GroupConfig struct {
	// PileDiff specifies the acceptable fractional difference between
	// piles for assignment to the same group.
	PileDiff float64
	// ImageDiff specifies the acceptable fractional difference between
	// an image and its containing pile when considering a pile for
	// assignment based on that image.
	ImageDiff float64

	// When Classic is true, Group will run a reasonable approximation
	// of the original C PILER family grouping.
	Classic bool
}

GroupConfig specifies Group behaviour

Jump to

Keyboard shortcuts

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