drivesim

package
v0.0.0-...-e0449dc Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2025 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultHumanChrlenBp = 1e8
View Source
const DefaultHumanCmPerBp = 1.0 / 1e6

Variables

This section is empty.

Functions

func AddPosCols

func AddPosCols(inpath, outpath string) error

func BinomDistribSd

func BinomDistribSd(n, p float64) float64

func BinomDistribSdFromCoverage

func BinomDistribSdFromCoverage(cov float64) float64

func Bloodnorm

func Bloodnorm(inpath, outpath string) error

func CmToBp

func CmToBp(cmPerBp float64, cmPos float64) int64

func CombineCols

func CombineCols(inpath, outpath string) error

func CombineColsPoswin

func CombineColsPoswin(inpath, outpath string) error

func DistortDecay

func DistortDecay(strength, distPos, snpPos float64) float64

func Ftest

func Ftest(inpath, outpath string) error

func HighestDist

func HighestDist(inpath, outpath, locpath string, win int64) error

func MultiFull

func MultiFull(p GenomeParams, r *rand.Rand, wins []int64, outpre string, reps int64) error

func MultiFullDefault

func MultiFullDefault()

func NewGenome

func NewGenome(p GenomeParams, rng *rand.Rand) iter.Seq2[int, *Chr]

func Normalizer

func Normalizer(inpath, outpath string) error

func NormalizerVar

func NormalizerVar(inpath, outpath string) error

func OneFull

func OneFull(p GenomeParams, r *rand.Rand, wins []int64, outpre string) error

func PlotSd

func PlotSd(inpath, outpath, plotpath, locpath string, win int64) error

func Poswin

func Poswin(inpath, outpath string, win int64) error

func PrintChr

func PrintChr(w io.Writer, name string, c *Chr) error

func PrintChrTestable

func PrintChrTestable(w io.Writer, name string, c *Chr) error

func PrintHeaderTestable

func PrintHeaderTestable(w io.Writer) error

func RunCmd

func RunCmd(inpath, outpath, script string, args ...string) error

func RunDefault

func RunDefault()

func RunOne

func RunOne(outFile, locFile string, p GenomeParams, r *rand.Rand) error

Types

type Chr

type Chr struct {
	Params         ChrParams
	Snps           []Snp
	DistorterCmPos float64
}

func NewChr

func NewChr(p ChrParams, rng *rand.Rand) *Chr

type ChrParams

type ChrParams struct {
	NumSnps            int64
	CmLen              float64
	HasDistorter       bool
	DistortionStrength float64
	CmPerBp            float64
	Coverage           float64
}

type Flags

type Flags struct {
	Testable         bool
	DistorterPosFile string
}

type GenomeParams

type GenomeParams struct {
	NDistortingChr int
	NCleanChr      int
	ChrParams      ChrParams
}

type Snp

type Snp struct {
	CmPos          float64
	Counts         [2]float64
	DistortedHaplo int
}

func MakeSnp

func MakeSnp(c *Chr, rng *rand.Rand) Snp

Jump to

Keyboard shortcuts

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