Showing preview only (5,042K chars total). Download the full file or copy to clipboard to get everything.
Repository: brentp/goleft
Branch: master
Commit: c9e31f241285
Files: 86
Total size: 4.8 MB
Directory structure:
gitextract_3n5h5hp9/
├── .gitignore
├── .nojekyll
├── .travis.yml
├── HISTORY.md
├── LICENSE
├── README.md
├── cmd/
│ └── goleft/
│ └── goleft.go
├── cnveval/
│ ├── cmd/
│ │ └── cnveval/
│ │ └── cnveval.go
│ └── cnveval.go
├── covstats/
│ ├── README.md
│ └── covstats.go
├── dcnv/
│ ├── dcnv.go
│ ├── debiaser/
│ │ ├── debiaser.go
│ │ └── debiaser_test.go
│ └── scalers/
│ ├── scalers.go
│ └── scalers_test.go
├── depth/
│ ├── README.md
│ ├── depth.go
│ ├── functional-test.sh
│ ├── intervals.go
│ └── test/
│ ├── cmp.py
│ ├── fake.fa
│ ├── fake.fa.fai
│ ├── hg19.fa
│ ├── hg19.fa.fai
│ ├── hla.bam
│ ├── hla.bam.bai
│ ├── run.sh
│ ├── t-empty.bam
│ ├── t-empty.bam.bai
│ ├── t.bam
│ └── t.bam.bai
├── depthwed/
│ └── depthwed.go
├── docs/
│ ├── index.html
│ └── indexcov/
│ ├── ex-indexcov-depth-15.html
│ ├── ex-indexcov-depth-X.html
│ ├── ex-indexcov-depth-Y.html
│ ├── ex-indexcov-roc.html
│ ├── ex-indexcov-sex.html
│ ├── help-bin.md
│ ├── help-counts.md
│ ├── help-depth.md
│ ├── help-pca.md
│ ├── help-sex.md
│ └── index.html
├── emdepth/
│ ├── README.md
│ ├── emdepth.go
│ ├── emdepth_test.go
│ ├── mops/
│ │ ├── mops.go
│ │ └── mops_test.go
│ └── stats.go
├── go.mod
├── go.sum
├── goleft.go
├── indexcov/
│ ├── README.md
│ ├── anonymize/
│ │ ├── README.md
│ │ └── main.go
│ ├── crai/
│ │ ├── README.md
│ │ ├── crai.go
│ │ ├── crai_test.go
│ │ ├── plot-vs-with-st-depth.py
│ │ └── st-depth-to-bins.py
│ ├── functional-tests.sh
│ ├── indexcov.go
│ ├── indexcov_test.go
│ ├── paper/
│ │ ├── cmp.py
│ │ ├── cmp.sh
│ │ ├── plot-bins.py
│ │ ├── plot-eiee-15.py
│ │ ├── plot-simons-sex.py
│ │ └── scripts/
│ │ ├── cmp.py
│ │ └── cmp.sh
│ ├── plot.go
│ ├── template.go
│ ├── test-data/
│ │ ├── sample_issue_27_0001.bam
│ │ ├── sample_issue_27_0001.bam.bai
│ │ ├── viral.crai
│ │ └── viral.fa.fai
│ └── types.go
├── indexsplit/
│ ├── README.md
│ ├── functional-tests.sh
│ └── indexsplit.go
├── multidepth/
│ └── multidepth.go
└── samplename/
├── README.md
├── functional-tests.sh
└── samplename.go
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
*.png
_test.cov
*.bed
*_linux64
*_osx
*_darwin
*pprof*
*.gz
indexcov/*.bam
indexcov/*.cram
indexcov/*.bai
indexcov/*.crai
ssshtest
goleft_test
================================================
FILE: .nojekyll
================================================
#
================================================
FILE: .travis.yml
================================================
language: go
os:
- linux
go:
- 1.16.x
before_install:
- cd indexcov && go get ./... ; cd ..
- cd depth && go get ./... ; cd ..
- sudo apt-get -qq update
- sudo apt-get install -y bedtools samtools
script:
- cd indexcov && travis_wait 30 bash functional-tests.sh ; cd ..
- cd depth && travis_wait 30 bash functional-test.sh ; cd ..
- cd indexsplit && travis_wait 30 bash functional-tests.sh; cd ..
- cd samplename && travis_wait 30 bash functional-tests.sh; cd ..
================================================
FILE: HISTORY.md
================================================
v0.2.6
======
+ covstats: fix denominator in unmapped
v0.2.4
======
+ `indexcov`: protect against empty chroms
v0.2.3
======
+ `indexcov`: fix bug in text output header.
v0.2.2
======
+ `indexcov`: better message on empty crai
+ `indexcov`: allow sending indexes as globs (to avoid argument length limit)
+ `indexcov`: if expected sex chroms are X,Y also find chrX,chrY (and use sorted order for output)
v0.2.1
======
+ `indexcov`:more defense for bad crai's
+ `indexcov`: now works on just `*.bai` if a .fai is also given with -f.
v0.2.0
======
+ `indexcov`: better error message and handling of excluded chromosomes.
+ `indexcov`: if given crais and no fai, indexcov will try to read the cram header using `samtools view`.
+ `indexsplit`: fix rare panic in CRAI files due to an off-by-one error.
v0.1.19
=======
+ `indexcov`: fix for long reads with cram. (#43)
v0.1.18
=======
+ `indexsplit`: fix off-by-one that resulted in double-counting some regions.
+ `indexcov`: cram edge-cases.
+ `indexcov`: better normalization to 1 for all cases. Fixes bug for bams with
many (e.g. > 10K) chromosomes of which many have very low or normalization
coverage. (#36)
v0.1.17
=======
+ `indexcov`: dont error when no sex chromosomes are found (#27).
+ `indexcov`: dont error when some chromosomes have a single region and others have 0.
+ `indexcov`: better checking on short sex chroms and other CRAI fixes.
v0.1.16
=======
+ `indexcov`: report and plot number of mapped and unmapped reads as reported by the index.
+ `covmed`: rename to `covstats`
+ `covstats`: report samplename(s) from read groups as well as bam path.
+ `covstats`: skip first 100K reads to give better estimates of depth.
+ `covstats`: report percent of bad (QC-Fail|Duplicate) and of umapped reads.
+ `indexcov`: automatically exclude chromosomes that match pattern: `^chrEBV$|^NC|_random$|Un_|^HLA\-|_alt$|hap\d$`.
this can be adjust from the command-line.
v0.1.15
=======
+ `indexsplit`: more closely match request number of regions.
+ `indexsplit`: allow specifying "problematic" regions which are split more finely.
+ `samplename`: **new tool** report the sample name of a bam from the read-group in its header.
v0.1.14
=======
+ `indexcov`: speed and memory improvements.
+ `indexcov`: support crai.
+ `indexcov`: prettier plot and labels for pngs.
+ `indexcov`: bin plot shows proportions rather than total numbers.
+ `indexcov`: better messages and docs for `--sex` argument.
+ `indexsplit`: new tool to generate regions for parallelization (from bam/cram indexes)
v0.1.13
=======
+ `covmed`: better coverage estimate by scaling by dup|qcfail|secondary.
+ `covmed`: report 5th and 95th percentile of insert size.
+ `indexcov`: make index.html even when no sex chromosomes are present.
+ `depth:` quote reference and chromosome name.
v0.1.12
=======
+ `indexcov`: --sex is now specified as a comma-delimited string
+ `indexcov`: handle a single sample (see #16)
+ `indexcov`: functional tests.
+ `indexcov`: add "slope" output which indicates the slope of the coverage plot between ~0.85 and ~1.15.
this matches bins.out fairly well, but it is another metric to look at.
v0.1.11
=======
+ `indexcov`: make plots a saner size.
+ `indexcov`: output an index.html page that summarizes findings and links to other pages.
the index contains static pngs for coverage and depth that link to the interactive
HTML pages for each chromosome.
+ `indexcov`: remove --prefix argument in favor of -d/--directory and write the overview page index
index.html
v0.1.10
=======
+ report correct version # (v0.1.9 reported 0.1.8 from CLI)
+ `indexcov`: bigger hit radius in plots == easier to mouse-over points
+ `indexcov`: use vOffset for better resolution of (estimated) depth.
+ `indexcov`: ~2X faster due to optimizations in biogo/hts and buffered IO.
+ `indexcov`: PCA and dosage bias plots (values also reported in .ped file).
v0.1.9
======
+ `indexcov`: fix for sparse bams and other edge-cases.
+ `indexcov`: performance improvements.
+ `indexcov`: output html with plot of coverage.
+ `indexcov`: plot and report sex inferred from coverage on allosomes.
v0.1.8
======
+ `indexcov`: output header with sample names.
+ `indexcov`: limit reported CN.
v0.1.7
======
+ fix bug in goleft depth where some lines were output multiple times.
+ add covmed subprogram to calculate median coverage, mean and sd of insert size quickly.
+ add depthwed to make a matrix file from multiple .depth files from `goleft depth`.
+ goleft depth will always output windows of the exact size requested, previously
if 10MB was not a multiple of windowsize, we'd get smaller windows at the edge.
+ new tool: **indexcov**: very fast calculation of relative coverage using the bam index.
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2016 Brent Pedersen - Bioinformatics
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
<!--
#CGO_ENABLED=0 GOARCH=amd64 go build -o goleft_linux64 --ldflags '-extldflags "-static"' cmd/goleft/goleft.go
#GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -o goleft_osx --ldflags '-extldflags "-static"' cmd/goleft/goleft.go
#GOOS=linux CGO_ENABLED=0 GOARCH=arm64 go build -o goleft_aarch64 --ldflags '-extldflags "-static"' cmd/goleft/goleft.go
-->
# goleft
[](https://travis-ci.org/brentp/goleft)
goleft is a collection of bioinformatics tools written in
[go](https://github.com/golang/go) distributed together
as a single binary under a liberal (MIT) license.
Running the binary `goleft` will give a list of subcommands
with a short description. Running any subcommand without
arguments will give a full help for that command.
# Installation
The easiest way to install goleft is to download the latest binary from
the [releases](https://github.com/brentp/goleft/releases) and make sure to chmod +x the resulting binary.
If you are using [go](https://github.com/golang/go), you can build from source with:
```
go get -u github.com/brentp/goleft/...
go install github.com/brentp/goleft/cmd/goleft
```
`goleft` is also available in [bioconda](https://bioconda.github.io)
# Commands
+ [covstats](https://github.com/brentp/goleft/tree/master/covstats#covstats) : estimate coverage and insert-size statistics on bams by sampling
+ [depth](https://github.com/brentp/goleft/tree/master/depth#depth) : parallelize calls to samtools in user-defined windows
+ depthwed : matricize output from depth to n-sites * n-samples
+ [indexcov](https://github.com/brentp/goleft/tree/master/indexcov#indexcov) : quick coverage estimate using only the bam index
+ [indexsplit](https://github.com/brentp/goleft/tree/master/indexsplit#indexsplit) : generate regions of even data across a cohort (for parallelization)
+ [samplename](https://github.com/brentp/goleft/tree/master/samplename#samplename): report samplename(s) from a bam's SM tag
================================================
FILE: cmd/goleft/goleft.go
================================================
package main
import (
"fmt"
"io"
"os"
"sort"
"strconv"
"github.com/brentp/goleft"
"github.com/brentp/goleft/covstats"
"github.com/brentp/goleft/depth"
"github.com/brentp/goleft/depthwed"
"github.com/brentp/goleft/indexcov"
"github.com/brentp/goleft/indexsplit"
"github.com/brentp/goleft/samplename"
)
type progPair struct {
help string
main func()
}
var progs = map[string]progPair{
"depth": progPair{"parallelize calls to samtools in user-defined windows", depth.Main},
"depthwed": progPair{"matricize output from depth to n-sites * n-samples", depthwed.Main},
"covstats": progPair{"coverage stats across bams by sampling", covstats.Main},
"indexcov": progPair{"quick coverage estimate using only the bam index", indexcov.Main},
"indexsplit": progPair{"create regions of even coverage across bams/crams", indexsplit.Main},
"samplename": progPair{"report samplename(s) from a bam's SM tag", samplename.Main},
}
func printProgs(ret int) {
var wtr io.Writer = os.Stdout
fmt.Fprintf(wtr, "goleft Version: %s\n\n", goleft.Version)
var keys []string
l := 5
for k := range progs {
keys = append(keys, k)
if len(k) > l {
l = len(k)
}
}
fmtr := "%-" + strconv.Itoa(l) + "s : %s\n"
sort.Strings(keys)
for _, k := range keys {
fmt.Fprintf(wtr, fmtr, k, progs[k].help)
}
os.Exit(ret)
}
func main() {
if len(os.Args) < 2 {
printProgs(0)
}
var p progPair
var ok bool
if p, ok = progs[os.Args[1]]; !ok {
printProgs(1)
}
// remove the prog name from the call
os.Args = append(os.Args[:1], os.Args[2:]...)
p.main()
}
================================================
FILE: cnveval/cmd/cnveval/cnveval.go
================================================
package main
import (
"fmt"
"io"
"log"
"os"
"runtime/pprof"
"strconv"
"strings"
arg "github.com/alexflint/go-arg"
"github.com/brentp/goleft/cnveval"
"github.com/brentp/xopen"
)
type cliargs struct {
MinOverlap float64 `arg:"-m,help:minimum overlap proportion for intervals to be considered as overlapping"`
LimitSamples bool `arg:"-s,help:only included sites in the truth-set that have matching samples in the test-set"`
Truth string `arg:"positional,required,help:bed file of truth-set"`
Test string `arg:"positional,required,help:bed file of test-set"`
}
func main() {
cli := cliargs{MinOverlap: 0.4}
if p := arg.MustParse(&cli); cli.MinOverlap > 1 || cli.MinOverlap <= 0 {
p.Fail("minoverlap must be between 0 and 1")
}
tcnvs := parseTruth(cli.Test, false, nil)
var samples map[string]bool
if cli.LimitSamples {
samples = make(map[string]bool)
for _, t := range tcnvs {
samples[t.Samples[0]] = true
}
}
truths := parseTruth(cli.Truth, true, samples)
cnvs := asCNV(tcnvs)
f, err := os.Create("x.cpu.pprof")
if err != nil {
panic(err)
}
pprof.StartCPUProfile(f)
defer pprof.StopCPUProfile()
ch := cnveval.Evaluate(cnvs, truths, cli.MinOverlap)
tabs := ch.Tabulate()
for _, cl := range []cnveval.SC{cnveval.Small, cnveval.Medium, cnveval.Large, cnveval.Any} {
t := tabs[cl.Order()]
fmt.Printf("size-class: %-12s | %s\n", cl, t)
}
}
func asCNV(ts []cnveval.Truth) []cnveval.CNV {
cnvs := make([]cnveval.CNV, len(ts))
for i, t := range ts {
cnvs[i] = cnveval.CNV{Chrom: t.Chrom, Start: t.Start, End: t.End,
CN: t.CN, Sample: t.Samples[0]}
}
return cnvs
}
func parseTruth(p string, cnt bool, samples map[string]bool) []cnveval.Truth {
truths := make([]cnveval.Truth, 0, 1000)
fh, err := xopen.Ropen(p)
if err != nil {
panic(err)
}
n := 0
for {
line, err := fh.ReadString('\n')
if err == io.EOF {
break
}
if err != nil {
panic(err)
}
if line[0] == '#' {
continue
}
t := parseLine(line)
if samples != nil {
found := false
for _, s := range t.Samples {
if _, ok := samples[s]; ok {
found = true
break
}
}
if !found {
continue
}
}
truths = append(truths, parseLine(line))
if cnt {
n += len(truths[len(truths)-1].Samples)
}
}
if cnt {
log.Printf("%d total cnvs in truth-set (%d)", n, len(truths))
} else {
log.Printf("cnvs in test-set (%d)", len(truths))
}
return truths
}
func mustAtoi(s string) int {
i, err := strconv.Atoi(s)
if err != nil {
panic(err)
}
return i
}
func parseLine(l string) cnveval.Truth {
toks := strings.Split(strings.TrimRight(l, "\r\n"), "\t")
if len(toks) < 5 {
panic("expected five fields for CNVs")
}
return cnveval.Truth{Chrom: toks[0], Start: mustAtoi(toks[1]), End: mustAtoi(toks[2]),
Samples: strings.Split(toks[4], ","), CN: mustAtoi(toks[3])}
}
================================================
FILE: cnveval/cnveval.go
================================================
// Package cnveval provides a way to evalute CNVs based on a truth-set.
package cnveval
import (
"fmt"
"math"
"sort"
)
// CNV indicates the region, sample and copy-number of a region.
type CNV struct {
Chrom string
Start int
End int
Sample string
CN int
counted bool
}
// Truth indicates the region, samples and copy-number for a truth-set.
type Truth struct {
Chrom string
Start int
End int
Samples []string
CN int
used map[string]bool
}
func (t Truth) String() string {
return fmt.Sprintf("%s:%d-%d[%d]", t.Chrom, t.Start, t.End, t.CN)
}
func (c CNV) String() string {
return fmt.Sprintf("%s:%d-%d[%d] in %s", c.Chrom, c.Start, c.End, c.CN, c.Sample)
}
func (t Truth) equals(o Truth) bool {
return t.Start == o.Start && t.End == o.End
}
// SC is a size-class
type SC int
var (
// Any is used to avoid any size-class designation when reporting results.
Any SC
Small SC = 20000
Medium SC = 100000
Large SC = math.MaxInt64
)
func (s SC) Order() int {
switch s {
case Small:
return 0
case Medium:
return 1
case Large:
return 2
case Any:
return 3
default:
panic(fmt.Sprintf("unknown size class: %d", s))
}
}
func (s SC) String() string {
switch s {
case Any:
return "all"
case Small:
return fmt.Sprintf("0-%d", Small)
case Medium:
return fmt.Sprintf("%d-%d", Small, Medium)
case Large:
return fmt.Sprintf(">=%d", Medium)
default:
panic(fmt.Sprintf("unknown size class: %d", s))
}
}
// TS indicates a sample and SizeClass
type TS struct {
SizeClass SC
Sample string
}
type Stat struct {
FP, FN, TP, TN int
}
func (s Stat) String() string {
return fmt.Sprintf("precision: %.4f (%-04d / (%-04d + %-04d)) recall: %.4f (%-04d / (%-04d + %-04d))", s.Precision(), s.TP, s.TP, s.FP,
s.Recall(), s.TP, s.TP, s.FN)
}
func (s Stat) Recall() float64 {
return float64(s.TP) / float64(s.TP+s.FN)
}
func (s Stat) Precision() float64 {
return float64(s.TP) / float64(s.TP+s.FP)
}
type CohortStats map[TS]*Stat
func (c CohortStats) TP(class SC) int {
var TP int
for cls, st := range c {
if class != Any && cls.SizeClass != class {
continue
}
TP += st.TP
}
return TP
}
func (c CohortStats) Tabulate() [4]Stat {
var stats [4]Stat
for cls, st := range c {
stats[cls.SizeClass.Order()].TP += st.TP
stats[cls.SizeClass.Order()].FP += st.FP
stats[cls.SizeClass.Order()].TN += st.TN
stats[cls.SizeClass.Order()].FN += st.FN
}
for _, cl := range []SC{Small, Medium, Large} {
stats[Any.Order()].TP += stats[cl.Order()].TP
stats[Any.Order()].FP += stats[cl.Order()].FP
stats[Any.Order()].TN += stats[cl.Order()].TN
stats[Any.Order()].FN += stats[cl.Order()].FN
}
return stats
}
func (c CohortStats) Precision(class SC) float64 {
var TP, FP float64
for cls, st := range c {
if class != Any && cls.SizeClass != class {
continue
}
TP += float64(st.TP)
FP += float64(st.FP)
}
//log.Println("TP, FP:", TP, FP)
return TP / (TP + FP)
}
func (c CohortStats) Recall(class SC) float64 {
var TP, FN, FP, TN float64
for cls, st := range c {
if class != Any && cls.SizeClass != class {
continue
}
TP += float64(st.TP)
FN += float64(st.FN)
FP += float64(st.FP)
TN += float64(st.TN)
}
//log.Println("TP, FN, FP, TN:", TP, FN, FP, TN)
return TP / (TP + FN)
}
func Evaluate(cnvs []CNV, truths []Truth, po float64) CohortStats {
stat := make(map[TS]*Stat, 200)
allSamples := make(map[string]bool)
for _, t := range truths {
for _, s := range t.Samples {
allSamples[s] = true
}
}
for _, c := range cnvs {
allSamples[c.Sample] = true
}
sampleList := fromMap(allSamples)
truthBySample := make(map[string][]Truth)
truthWithoutSample := make(map[string][]Truth)
for _, t := range truths {
for _, s := range t.Samples {
truthBySample[s] = append(truthBySample[s], t)
}
for _, s := range sampleList {
if notin(s, t.Samples) {
truthWithoutSample[s] = append(truthWithoutSample[s], t)
}
}
}
cnvBySample := make(map[string][]CNV)
for _, c := range cnvs {
cnvBySample[c.Sample] = append(cnvBySample[c.Sample], c)
}
for _, sample := range sampleList {
truths, _ := truthBySample[sample]
sort.Slice(truths, func(i, j int) bool {
return truths[i].Chrom < truths[j].Chrom || (truths[i].Chrom == truths[j].Chrom && truths[i].Start < truths[j].Start)
})
cnvs, _ := cnvBySample[sample]
sort.Slice(cnvs, func(i, j int) bool {
return cnvs[i].Chrom < cnvs[j].Chrom || (cnvs[i].Chrom == cnvs[j].Chrom && cnvs[i].Start < cnvs[j].Start)
})
updatePositive(stat, truths, cnvs, po)
others, _ := truthWithoutSample[sample]
sort.Slice(others, func(i, j int) bool {
return others[i].Chrom < others[j].Chrom || (others[i].Chrom == others[j].Chrom && others[i].Start < others[j].Start)
})
updateFP(stat, others, cnvs, truths, po)
}
return stat
}
func notin(a string, bs []string) bool {
for _, b := range bs {
if a == b {
return false
}
}
return true
}
func fromMap(samples map[string]bool) []string {
m := make([]string, 0, len(samples))
for k := range samples {
m = append(m, k)
}
return m
}
func updateFP(stat map[TS]*Stat, others []Truth, cnvs []CNV, truths []Truth, po float64) {
if len(cnvs) == 0 || len(others) == 0 {
return
}
var i int
// others should not include CNVs from this sample.
for _, o := range others {
ts := TS{Sample: cnvs[0].Sample, SizeClass: sizeClass(o)}
val := stat[ts]
if val == nil {
val = &Stat{}
stat[ts] = val
}
// don't need to reset i because others is sorted.
for ; i < len(cnvs) && (cnvs[i].Chrom < o.Chrom || (cnvs[i].Chrom == o.Chrom && cnvs[i].End < o.Start)); i++ {
}
if i > 0 {
i--
}
tpfound := false
fpfound := false
found := false
// TODO: flip this cnvs loop with the others loop above because we need to have a value for every cnv.
for k, cnv := range cnvs[i:] {
if cnv.Chrom > o.Chrom || (o.Chrom == cnv.Chrom && cnv.Start > o.End) {
break
}
if poverlap(cnv, o) >= po && sameCN(cnv.CN, o.CN) {
fpfound = true
// we have a putative FP, but need to check if there's something else in the truth something
// that also fits this criteria to avoid incorrectly calling an FP.
for _, t := range truths {
if t.Chrom != cnv.Chrom {
continue
}
if poverlap(cnv, t) >= po && sameCN(cnv.CN, t.CN) {
tpfound = true
break
}
}
}
// if here, then cnv didn't overlap something in the truth set.
if fpfound && !tpfound {
val.FP++
found = true
cnvs[i+k].counted = true
}
}
if !(found || tpfound) {
val.TN++
}
}
}
// given a set of truths and cnvs from a sample, update the FPs.
// truths and cnvs are sorted by chrom, then by start
func updatePositive(stat map[TS]*Stat, truths []Truth, cnvs []CNV, po float64) {
if len(cnvs) == 0 {
return
}
var i int
for _, t := range truths {
ts := TS{Sample: cnvs[0].Sample, SizeClass: sizeClass(t)}
found := false
val := stat[ts]
if val == nil {
val = &Stat{}
stat[ts] = val
}
// since truths are sorted as well, we don't need to reset i.
for ; i < len(cnvs) && (cnvs[i].Chrom < t.Chrom || (cnvs[i].Chrom == t.Chrom && cnvs[i].End < t.Start)); i++ {
}
if i > 0 {
i--
}
for k, cnv := range cnvs[i:] {
if cnv.Chrom > t.Chrom || (t.Chrom == cnv.Chrom && cnv.Start > t.End) {
break
}
if poverlap(cnv, t) >= po && sameCN(cnv.CN, t.CN) {
// used map make sure we don't double count cnvs from the sameCN
// sample that are subsets of the full truth interval.
if _, ok := t.used[cnv.Sample]; !ok {
val.TP++
cnvs[i+k].counted = true
found = true
if t.used == nil {
t.used = make(map[string]bool)
}
t.used[cnv.Sample] = true
}
}
}
if !found {
val.FN++
}
}
for _, cnv := range cnvs {
if !cnv.counted {
ts := TS{Sample: cnv.Sample, SizeClass: sizeClass(Truth{Start: cnv.Start, End: cnv.End})}
val := stat[ts]
if val == nil {
val = &Stat{}
stat[ts] = val
}
val.FP++
}
}
}
func sizeClass(t Truth) SC {
l := t.End - t.Start
if l < int(Small) {
return Small
}
if l < int(Medium) {
return Medium
}
return Large
}
func sameCN(a, b int) bool {
if a > 2 {
a = 3
}
if b > 2 {
b = 3
}
return a == b
}
func imin(a, b int) int {
if a < b {
return a
}
return b
}
func imax(a, b int) int {
if a > b {
return a
}
return b
}
func poverlap(a CNV, b Truth) float64 {
if a.Chrom != b.Chrom {
return 0
}
total := math.Min(float64(a.End-a.Start), float64(b.End-b.Start))
//total := float64(b.End - b.Start)
ovl := imin(a.End, b.End) - imax(a.Start, b.Start)
if ovl < 0 {
return 0
}
return float64(ovl) / total
}
================================================
FILE: covstats/README.md
================================================
## covstats
get estimates for coverage, instert size, duplicate, from a bam file by sampling read-length and looking at the index.
================================================
FILE: covstats/covstats.go
================================================
package covstats
import (
"fmt"
"io"
"log"
"math"
"os"
"sort"
"strconv"
"strings"
arg "github.com/alexflint/go-arg"
"github.com/biogo/hts/bam"
"github.com/biogo/hts/sam"
"github.com/brentp/goleft/samplename"
"github.com/brentp/smoove/shared"
"github.com/brentp/xopen"
)
var cli = struct {
N int `arg:"-n,help:number of reads to sample for length"`
Regions string `arg:"-r,help:optional bed file to specify target regions"`
Fasta string `arg:"-f,help:fasta file. required for cram format"`
Bams []string `arg:"positional,required,help:bams/crams for which to estimate coverage"`
}{N: 1000000}
func pcheck(e error) {
if e != nil {
panic(e)
}
}
const N_MADS = 10
func readCoverage(path string) int {
fh, err := xopen.Ropen(path)
pcheck(err)
cov := 0
for {
line, err := fh.ReadString('\n')
if err == io.EOF {
break
}
line = strings.TrimSuffix(line, "\n")
toks := strings.SplitN(line, "\t", 5)
s, err := strconv.Atoi(toks[1])
pcheck(err)
e, err := strconv.Atoi(toks[2])
pcheck(err)
cov += e - s
}
return cov
}
func madFilter(arr []int, nmads int) []int {
if !sort.IntsAreSorted(arr) {
sort.Ints(arr)
}
med := arr[len(arr)/2]
upper_mads := make([]int, 0, len(arr))
for _, a := range arr[len(arr)/2+1:] {
upper_mads = append(upper_mads, a-med)
}
sort.Ints(upper_mads)
umad := upper_mads[len(upper_mads)/2]
upper := med + nmads*umad
var i, a int
for i, a = range arr {
if a > upper {
break
}
}
return arr[:i]
}
func meanStd(arr []int) (mean, std float64) {
// first remove things that are more than 10 mads above the median.
l := float64(len(arr))
for _, a := range arr {
mean += float64(a) / l
}
for _, a := range arr {
std += math.Pow(float64(a)-mean, 2) / l
}
return mean, math.Sqrt(std)
}
// Stats hold info about a bam returned from `BamStats`
type Stats struct {
InsertMean float64
InsertSD float64
// 5th percentile of insert size
InsertPct5 int
// 95th percentile of insert size
InsertPct95 int
TemplateMean float64
TemplateSD float64
ReadLengthMean float64
ReadLengthMedian float64
// ProportionBad is the proportion of reads that were Dup|QCFail
ProportionBad float64
ProportionUnmapped float64
ProportionProperlyPaired float64
ProportionDuplicate float64
MaxReadLength int
H []float64
}
func (s Stats) String() string {
return fmt.Sprintf("%.2f\t%.2f\t%d\t%d\t%.2f\t%.2f", s.InsertMean, s.InsertSD, s.InsertPct5, s.InsertPct95, s.TemplateMean, s.TemplateSD)
}
// number of reads to skip to avoid crap at start of chrom
const skipReads = 100000
// BamStats takes bam reader sample N well-behaved sites and return the coverage and insert-size info
func BamStats(br *bam.Reader, n int, skipReads int) Stats {
br.Omit(bam.AllVariableLengthData)
sizes := make([]int, 0, 2*n)
insertSizes := make([]int, 0, n)
templateLengths := make([]int, 0, n)
var nBad, nUnmapped int
for i := 0; i < skipReads; i++ {
_, err := br.Read()
if err == io.EOF {
log.Println("covmed: not enough reads to sample for bam stats")
break
}
}
s := Stats{}
var k int
for len(insertSizes) < n {
rec, err := br.Read()
if err == io.EOF {
break
}
pcheck(err)
if rec.Flags&sam.Unmapped != 0 {
nUnmapped++
continue
}
k++
if rec.Flags&(sam.Duplicate|sam.QCFail) != 0 {
if rec.Flags&sam.Duplicate != 0 {
s.ProportionDuplicate++
}
nBad++
continue
}
if rec.Flags&sam.ProperPair != 0 {
s.ProportionProperlyPaired++
}
if len(sizes) < 2*n {
_, read := rec.Cigar.Lengths()
sizes = append(sizes, read)
} else {
// single end reads have no pairs so we have to skip.
if len(insertSizes) == 0 {
break
}
}
if rec.Pos < rec.MatePos && rec.Flags&sam.ProperPair == sam.ProperPair && len(rec.Cigar) == 1 && rec.Cigar[0].Type() == sam.CigarMatch {
insertSizes = append(insertSizes, rec.MatePos-rec.End())
templateLengths = append(templateLengths, rec.TempLen)
}
}
sort.Ints(sizes)
if len(sizes) > 0 {
s.ProportionBad = float64(nBad) / float64(k+nUnmapped)
s.ProportionDuplicate = s.ProportionDuplicate / float64(k+nUnmapped)
s.ProportionProperlyPaired = s.ProportionProperlyPaired / float64(k+nUnmapped)
s.ProportionUnmapped = float64(nUnmapped) / float64(k+nUnmapped)
s.ReadLengthMedian = float64(sizes[(len(sizes)-1)/2]) - 1
s.ReadLengthMean, _ = meanStd(sizes)
sort.Ints(sizes)
s.MaxReadLength = sizes[len(sizes)-1]
}
if len(insertSizes) > 0 {
sort.Ints(insertSizes)
l := float64(len(insertSizes) - 1)
s.InsertPct5 = insertSizes[int(0.05*l+0.5)]
s.InsertPct95 = insertSizes[int(0.95*l+0.5)]
insertSizes = madFilter(insertSizes, N_MADS)
s.InsertMean, s.InsertSD = meanStd(insertSizes)
templateLengths = madFilter(templateLengths, N_MADS)
s.TemplateMean, s.TemplateSD = meanStd(templateLengths)
// taken from lumpy/scripts/pairend_distro.py
start := float64(s.MaxReadLength)
stop := float64(s.TemplateMean + s.TemplateSD*4)
s.H = make([]float64, int(stop-start+1))
cnt := float64(0)
for _, t := range templateLengths {
x := float64(t)
if x < start || x > stop {
continue
}
j := int(x - start)
s.H[j] += 1
cnt += 1
}
for i := range s.H {
s.H[i] /= cnt
}
}
return s
}
// Main is called from the dispatcher
func Main() {
fmt.Fprintln(os.Stdout, "coverage\tinsert_mean\tinsert_sd\tinsert_5th\tinsert_95th\ttemplate_mean\ttemplate_sd\tpct_unmapped\tpct_bad_reads\tpct_duplicate\tpct_proper_pair\tread_length\tbam\tsample")
arg.MustParse(&cli)
for _, bamPath := range cli.Bams {
brdr, err := shared.NewReader(bamPath, 2, cli.Fasta)
pcheck(err)
names := strings.Join(samplename.Names(brdr.Header()), ",")
if names == "" {
names = "<no-read-groups>"
}
var idx *bam.Index
if strings.HasSuffix(bamPath, ".bam") {
ifh, ierr := os.Open(bamPath + ".bai")
if ierr != nil {
// if .bam.bai didn't exist, check .bai
ifh, err = os.Open(bamPath[:len(bamPath)-4] + ".bai")
}
pcheck(err)
idx, err = bam.ReadIndex(ifh)
pcheck(err)
}
genomeBases := 0
mapped := uint64(0)
sizes := BamStats(brdr, cli.N, skipReads)
var notFound []string
for _, ref := range brdr.Header().Refs() {
genomeBases += ref.Len()
if idx != nil {
stats, ok := idx.ReferenceStats(ref.ID())
if !ok {
if !strings.Contains(ref.Name(), "random") && ref.Len() > 10000 {
notFound = append(notFound, ref.Name())
}
continue
}
mapped += stats.Mapped
}
}
if len(notFound) > 0 {
fmt.Fprintf(os.Stderr, "chromosomes: %s not found in %s\n", strings.Join(notFound, ","), bamPath)
}
if cli.Regions != "" {
genomeBases = readCoverage(cli.Regions)
}
// TODO: check that reads are from coverage regions.
coverage := (1 - sizes.ProportionBad) * float64(mapped) * sizes.ReadLengthMean / float64(genomeBases)
fmt.Fprintf(os.Stdout, "%.2f\t%s\t%.2f\t%.1f\t%.1f\t%.1f\t%d\t%s\t%s\n", coverage, sizes.String(), 100*sizes.ProportionUnmapped,
100*sizes.ProportionBad,
100*sizes.ProportionDuplicate,
100*sizes.ProportionProperlyPaired,
sizes.MaxReadLength, bamPath, names)
}
}
================================================
FILE: dcnv/dcnv.go
================================================
package main
import (
"fmt"
"html/template"
"io"
"math"
"math/rand"
"os"
"strconv"
"strings"
"gonum.org/v1/gonum/floats"
"gonum.org/v1/gonum/mat"
"github.com/brentp/faidx"
chartjs "github.com/brentp/go-chartjs"
"github.com/brentp/go-chartjs/types"
"github.com/brentp/goleft/dcnv/debiaser"
"github.com/brentp/xopen"
"go4.org/sort"
)
// Intervals is the wrapper for a slice of intervals.
type Intervals struct {
Chrom string
// 0-based starts
Starts []uint32
// 1-based ends
GCs []float64
SeqComplexity []float64
Ends []uint32
// shape is n-sites * n-samples
Depths *mat.Dense
_depths []float64
GCB *GcBounds
sampleMedians []float64
sampleScalars []float64
Samples []string
}
func (ivs Intervals) NSamples() int {
_, c := ivs.Depths.Dims()
return c
}
func mustAtoi(a string) uint32 {
v, err := strconv.Atoi(a)
if err != nil {
panic(err)
}
return uint32(v)
}
func mustAtof(a string) float64 {
v, err := strconv.ParseFloat(a, 64)
if err != nil {
panic(err)
}
return v
}
func imin(a, b int) int {
if a < b {
return a
}
return b
}
type GcBounds struct {
Min float64
Max float64
}
func (ivs *Intervals) addFromLine(l string, fa *faidx.Faidx, fp *faidx.FaPos) {
toks := strings.Split(l, "\t")
toks[len(toks)-1] = strings.TrimSpace(toks[len(toks)-1])
// subtract $n bases since GC before will afffect reads here.
s, e := mustAtoi(toks[1]), mustAtoi(toks[2])
if s < 250 {
s = 250
}
st, err := fa.Stats(toks[0], int(s-250), int(e))
if err != nil {
fmt.Fprintln(os.Stderr, err)
}
if ivs.GCB != nil && (st.GC > ivs.GCB.Max || st.GC < ivs.GCB.Min) {
return
}
ivs.Starts = append(ivs.Starts, s)
ivs.Ends = append(ivs.Ends, e)
for c := 3; c < len(toks); c++ {
d := mustAtof(toks[c])
//d /= float64(iv.End - iv.Start)
ivs._depths = append(ivs._depths, d)
}
ivs.GCs = append(ivs.GCs, st.GC)
}
// SampleMedians gets the Median log2 values for each sample.
func (ivs *Intervals) SampleMedians() []float64 {
r, _ := ivs.Depths.Dims()
depths := make([]float64, r)
ivs.sampleMedians = make([]float64, ivs.NSamples())
for sampleI := 0; sampleI < ivs.NSamples(); sampleI++ {
// sorting the extracted array is much faster.
mat.Col(depths, sampleI, ivs.Depths)
// lop off the lower depths (for exome).
// and then normalized on the median above that lower bound.
sort.Slice(depths, func(i, j int) bool { return depths[i] < depths[j] })
var k int
for k = 0; k < len(depths) && depths[k] == 0; k++ {
}
ivs.sampleMedians[sampleI] = depths[k:][int(0.65*float64(len(depths)-k))]
}
return ivs.sampleMedians
}
// NormalizeBySampleMedian divides each depth by the sample median.
func (ivs *Intervals) NormalizeBySampleMedian() {
meds := ivs.SampleMedians()
r, _ := ivs.Depths.Dims()
mat := ivs.Depths
for i := 0; i < r; i++ {
row := mat.RawRowView(i)
floats.Div(row, meds)
}
}
func median(b []float64) float64 {
a := make([]float64, len(b))
copy(a, b)
sort.Slice(a, func(i, j int) bool { return a[i] < a[j] })
if len(a)%2 == 0 {
am := a[len(a)/2]
bm := a[len(a)/2+1]
return (am + bm) / 2
}
return a[len(a)/2]
}
type MatFn func(*mat.Dense)
func (ivs *Intervals) ReadRegions(path string, fasta string) {
fai, err := faidx.New(fasta)
if err != nil {
panic(err)
}
fp := &faidx.FaPos{}
rdr, err := xopen.Ropen(path)
if err != nil {
panic(err)
}
i := 0
for {
line, err := rdr.ReadString('\n')
if err == io.EOF {
break
}
if err != nil {
panic(err)
}
if i == 0 && (line[0] == '#' || strings.HasPrefix(line, "chrom")) {
ivs.Samples = strings.Split(strings.TrimSpace(line), "\t")[3:]
continue
}
if i == 0 || i == 1 {
ivs.Chrom = string(line[:strings.Index(line, "\t")])
fp.Chrom = ivs.Chrom
}
i++
ivs.addFromLine(line, fai, fp)
}
ns := len(ivs.Samples)
ivs.Depths = mat.NewDense(len(ivs._depths)/ns, ns, ivs._depths)
}
func (ivs *Intervals) Write(n int) {
meds := ivs.SampleMedians()
r, c := ivs.Depths.Dims()
lmeds := make([]float64, c)
for i, v := range meds {
lmeds[i] = math.Log2(v)
}
_s := make([]string, ivs.NSamples())
formatIV := func(depths []float64) string {
for k := 0; k < len(_s); k++ {
_s[k] = fmt.Sprintf("%.1f", depths[k])
}
return strings.Join(_s, "\t")
}
for i := 0; i < r; i++ {
if i == n {
break
}
fmt.Printf("%s:%d-%d\t%s\n", ivs.Chrom, ivs.Starts[i], ivs.Ends[i], formatIV(ivs.Depths.RawRowView(i)))
}
}
func Pipeliner(mat *mat.Dense, fns ...MatFn) {
for _, fn := range fns {
fn(mat)
}
}
// truncate depth values above this to cnMax
const cnMax = 2.5
type vs struct {
xs []float64
ys []float64
}
func (v *vs) Xs() []float64 {
return v.xs
}
func (v *vs) Ys() []float64 {
return v.ys
}
func (v *vs) Rs() []float64 {
return nil
}
func (v *vs) Len() int {
return len(v.xs)
}
// make it meet gonum/plot plotter.XYer
func (v *vs) XY(i int) (x, y float64) {
return v.xs[i], v.ys[i]
}
func asValues(vals []float64, multiplier float64) chartjs.Values {
// skip until we find non-zero.
v := vs{xs: make([]float64, 0, len(vals)), ys: make([]float64, 0, len(vals))}
seenNonZero := false
for i, r := range vals {
if r == 0 && !seenNonZero {
continue
}
seenNonZero = true
v.xs = append(v.xs, float64(i)*multiplier)
if r > cnMax {
r = cnMax
}
v.ys = append(v.ys, float64(r))
}
return &v
}
func randomColor(s int) *types.RGBA {
rand.Seed(int64(s))
return &types.RGBA{
R: uint8(26 + rand.Intn(230)),
G: uint8(26 + rand.Intn(230)),
B: uint8(26 + rand.Intn(230)),
A: 240}
}
func plotDepths(depths *mat.Dense, samples []string, chrom string, base string) error {
chart := chartjs.Chart{Label: chrom}
xa, err := chart.AddXAxis(chartjs.Axis{Type: chartjs.Linear, Position: chartjs.Bottom, ScaleLabel: &chartjs.ScaleLabel{FontSize: 16, LabelString: "position on " + chrom, Display: chartjs.True}})
if err != nil {
return err
}
ya, err := chart.AddYAxis(chartjs.Axis{Type: chartjs.Linear, Position: chartjs.Left,
Tick: &chartjs.Tick{Min: 0, Max: 2.5},
ScaleLabel: &chartjs.ScaleLabel{FontSize: 16, LabelString: "scaled coverage", Display: chartjs.True}})
if err != nil {
return err
}
w := 0.4
r, nsamples := depths.Dims()
if nsamples > 30 {
w = 0.3
}
if nsamples > 50 {
w = 0.2
}
depth := make([]float64, r)
for i := 0; i < nsamples; i++ {
mat.Col(depth, i, depths)
xys := asValues(depth, 16384)
//log.Println(chrom, samples[i], len(xys.Xs()))
c := randomColor(i)
dataset := chartjs.Dataset{Data: xys, Label: samples[i], Fill: chartjs.False, PointRadius: 0, BorderWidth: w,
BorderColor: c, BackgroundColor: c, SteppedLine: chartjs.True, PointHitRadius: 6}
dataset.XAxisID = xa
dataset.YAxisID = ya
chart.AddDataset(dataset)
}
chart.Options.Responsive = chartjs.False
chart.Options.Tooltip = &chartjs.Tooltip{Mode: "nearest"}
wtr, err := os.Create(fmt.Sprintf("%s-depth-%s.html", base, chrom))
if err != nil {
return err
}
link := template.HTML(`<a href="index.html">back to index</a>`)
if err := chart.SaveHTML(wtr, map[string]interface{}{"width": 850, "height": 550, "customHTML": link}); err != nil {
return err
}
if err := wtr.Close(); err != nil {
return err
}
return nil
}
func main() {
bed := os.Args[1]
fasta := os.Args[2]
ivs := &Intervals{}
ivs.ReadRegions(bed, fasta)
db := debiaser.GeneralDebiaser{}
db.Window = 9
db.Vals = make([]float64, len(ivs.GCs))
copy(db.Vals, ivs.GCs)
Pipeliner(ivs.Depths, db.Sort, db.Debias, db.Unsort)
ivs.NormalizeBySampleMedian()
nsites, nsamples := ivs.Depths.Dims()
dps := make([]string, nsamples)
fdp, err := os.Create("depth.bed")
if err != nil {
panic(err)
}
plotDepths(ivs.Depths, ivs.Samples, ivs.Chrom, "dd")
fmt.Fprintf(fdp, "#chrom\tstart\tend\t%s\n", strings.Join(ivs.Samples, "\t"))
for i := 0; i < nsites; i++ {
iv := ivs.Depths.RawRowView(i)
for si := range dps {
dps[si] = fmt.Sprintf("%.2f", iv[si])
}
fmt.Fprintf(fdp, "%s\t%d\t%d\t%s\n", ivs.Chrom, ivs.Starts[i], ivs.Ends[i], strings.Join(dps, "\t"))
}
}
================================================
FILE: dcnv/debiaser/debiaser.go
================================================
package debiaser
import (
"fmt"
"log"
"math"
"sort"
"gonum.org/v1/gonum/floats"
"gonum.org/v1/gonum/mat"
"github.com/JaderDias/movingmedian"
)
// Debiaser implements inplace removal of bias from a mat64 of (scaled) values.
type Debiaser interface {
Debias(*mat.Dense)
}
// Sorter provides method to sort and then unsort a mat64
type Sorter interface {
Sort(*mat.Dense)
Unsort(*mat.Dense)
}
// SortedDebiaser is useful when we need to: sort, then unbias based on that sort order, then unsort.
// An example of this is for GC bias.
type SortedDebiaser interface {
Sorter
Debiaser
}
// GeneralDebiaser is an implementation of a SortedDebiaser that can be used simply by setting attributes.int
// Window is the size of the moving window for correction.
// Usage is to Call GeneralDebiaser.Sort() then Debias(), then Unsort(). Presumbly, Those calls will be flanked
// by a scaler call such as to scaler.ZScore.
type GeneralDebiaser struct {
Vals []float64
Window int
inds []int
tmp *mat.Dense
}
func (g *GeneralDebiaser) setTmp(r, c int) {
if g.tmp == nil {
g.tmp = mat.NewDense(r, c, nil)
} else {
gr, gc := g.tmp.Dims()
if gr != r || gc != c {
g.tmp = mat.NewDense(r, c, nil)
}
}
}
// Sort sorts the rows in mat according the order in g.Vals.
func (g *GeneralDebiaser) Sort(mat *mat.Dense) {
if g.inds == nil {
g.inds = make([]int, len(g.Vals))
}
floats.Argsort(g.Vals, g.inds)
r, c := mat.Dims()
g.setTmp(r, c)
changed := false
for ai, bi := range g.inds {
if ai != bi {
changed = true
}
g.tmp.SetRow(ai, mat.RawRowView(bi))
}
if !changed {
log.Println("WARNING: no change after sorting. This usually means .Vals is unset or same as previous run")
}
// copy g.tmp into mat
mat.Copy(g.tmp)
}
// Unsort reverts the values to be position sorted.
func (g *GeneralDebiaser) Unsort(mat *mat.Dense) {
if g.inds == nil {
panic("unsort: must call sort first")
}
r, c := mat.Dims()
g.setTmp(r, c)
// copy mat into g.tmp
g.tmp.Copy(mat)
tmp := make([]float64, len(g.Vals))
for ai, bi := range g.inds {
mat.SetRow(bi, g.tmp.RawRowView(ai))
tmp[bi] = g.Vals[ai]
}
g.Vals = tmp
}
// Debias by subtracting moving median in each sample.
// It's assumed that g.Sort() has been called before this and that g.Unsort() will be called after.
// It's also assumed that the values in mat have been scaled, for example by a `scaler.ZScore`.
func (g *GeneralDebiaser) Debias(imat *mat.Dense) {
r, c := imat.Dims()
col := make([]float64, r)
for sampleI := 0; sampleI < c; sampleI++ {
mat.Col(col, sampleI, imat)
mm := movingmedian.NewMovingMedian(g.Window)
mid := (g.Window-1)/2 + 1
for i := 0; i < mid; i++ {
mm.Push(col[i])
}
for i := 0; i < mid; i++ {
col[i] /= math.Max(mm.Median(), 1)
}
var i int
for i = mid; i < len(col)-mid; i++ {
mm.Push(col[i+mid])
col[i] /= math.Max(mm.Median(), 1)
}
for ; i < len(col); i++ {
col[i] /= math.Max(mm.Median(), 1)
}
imat.SetCol(sampleI, col)
}
}
type ChunkDebiaser struct {
GeneralDebiaser
// ScoreWindow defines the range of Vals used per window.
// E.g. if this is 0.1 then all values from 0.25-0.35 will be normalized to the median of
// Depths occuring in that range.
ScoreWindow float64
}
func (cd *ChunkDebiaser) Debias(imat *mat.Dense) {
if cd.ScoreWindow == 0 {
panic("must set ChunkDebiaser.ScoreWindow")
}
r, c := imat.Dims()
col := make([]float64, r)
slices := make([]int, 1, 100)
v0 := cd.Vals[0]
for i := 0; i < len(cd.Vals); i++ {
if cd.Vals[i]-v0 > cd.ScoreWindow {
v0 = cd.Vals[i]
slices = append(slices, i)
}
}
slices = append(slices, len(cd.Vals))
dpSubset := make([]float64, 0, len(cd.Vals))
for sampleI := 0; sampleI < c; sampleI++ {
mat.Col(col, sampleI, imat)
for i := 1; i < len(slices); i++ {
si, ei := slices[i-1], slices[i]
dpSubset = dpSubset[:(ei - si)]
copy(dpSubset, col[si:ei])
sort.Float64s(dpSubset)
var k int
for ; k < len(dpSubset) && dpSubset[k] == 0; k++ {
}
median := dpSubset[(ei-si-k)/2]
if median > 0 {
for j := si; j < ei; j++ {
col[j] /= median
}
}
}
imat.SetCol(sampleI, col)
}
}
type SVD struct {
MinVariancePct float64
}
func (isvd *SVD) Debias(imat *mat.Dense) {
var svd mat.SVD
if ok := svd.Factorize(imat, mat.SVDThin); !ok {
panic("error with SVD")
}
// get svd and zero out first n components.
s, u, v := extractSVD(&svd)
sum := floats.Sum(s)
str := "variance:"
var n int
for n = 0; n < 15 && 100*s[n]/sum > isvd.MinVariancePct; n++ {
str += fmt.Sprintf(" %.2f", 100*s[n]/sum)
}
log.Println(str)
sigma := mat.NewDense(len(s), len(s), nil)
// leave the first n as 0 and set the rest.
for i := n; i < len(s); i++ {
sigma.Set(i, i, s[i])
}
imat.Product(u, sigma, v.T())
}
func extractSVD(svd *mat.SVD) (s []float64, u, v *mat.Dense) {
var um *mat.Dense
var vm *mat.Dense
svd.UTo(um)
svd.VTo(vm)
s = svd.Values(nil)
return s, um, vm
}
================================================
FILE: dcnv/debiaser/debiaser_test.go
================================================
package debiaser_test
import (
"fmt"
"math/rand"
"reflect"
"testing"
"gonum.org/v1/gonum/mat"
"github.com/brentp/goleft/dcnv/debiaser"
"github.com/brentp/goleft/dcnv/scalers"
)
func fillMatrix(mat *mat.Dense) {
r, c := imat.Dims()
for i := 0; i < r; i++ {
for j := 0; j < c; j++ {
imat.Set(i, j, 100+float64(i)*100+10*float64(j)+float64(j)/10+10*rand.Float64())
}
}
}
func printMatrix(imat *mat.Dense) {
r, c := imat.Dims()
for i := 0; i < r; i++ {
fmt.Printf("[")
row := imat.RawRowView(i)
for j := 0; j < c; j++ {
if j < c-1 {
fmt.Printf("%.2f, ", row[j])
} else {
fmt.Printf("%.2f", row[j])
}
}
fmt.Printf("]\n")
}
}
func TestGeneralDebiasSort(t *testing.T) {
g := debiaser.GeneralDebiaser{Vals: []float64{0, 1, 2, 3, 10, 9, 8, 6}}
imat := mat.NewDense(len(g.Vals), 4, nil)
cpy := mat.NewDense(len(g.Vals), 4, nil)
fillMatrix(imat)
cpy.Copy(imat)
g.Sort(imat)
/*
for i := 0; i < r; i++ {
fmt.Printf("%v\n", mat.RawRowView(i))
}
*/
/*
if !reflect.DeepEqual(g.Posns, []uint32{0, 1, 2, 3, 7, 6, 5, 4}) {
t.Fatalf("got %s", g.Posns)
}
*/
if !reflect.DeepEqual(g.Vals, []float64{0, 1, 2, 3, 6, 8, 9, 10}) {
t.Fatalf("got %s", g.Vals)
}
if reflect.DeepEqual(cpy, mat) {
t.Fatalf("expected different matrix after sort")
}
g.Unsort(imat)
/*
if !reflect.DeepEqual(g.Posns, []uint32{0, 1, 2, 3, 4, 5, 6, 7}) {
t.Fatalf("got %s", g.Posns)
}
*/
if !reflect.DeepEqual(g.Vals, []float64{0, 1, 2, 3, 10, 9, 8, 6}) {
t.Fatalf("got %s", g.Vals)
}
/*
fmt.Println("\nafter unsort")
for i := 0; i < r; i++ {
fmt.Printf("%v -- %v\n", mat.RawRowView(i), cpy.RawRowView(i))
}
*/
if !reflect.DeepEqual(cpy, imat) {
t.Fatalf("expected indentical matrix after unsort")
}
}
func TestGeneralDebias(t *testing.T) {
g := debiaser.GeneralDebiaser{Vals: []float64{0, 1, 2, 3, 10, 9, 8, 6, 5, 4, 3, 2, 1, 0.5},
Window: 1,
//Posns: []uint32{0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14},
}
imat := mat.NewDense(len(g.Vals), 7, nil)
fillMatrix(imat)
var zscore scalers.ZScore
zscore.Scale(imat)
zscore.UnScale(imat)
// check z-scaling
//fmt.Println("after")
//printMatrix(mat)
zscore.Scale(imat)
g.Sort(imat)
g.Debias(imat)
zscore.UnScale(imat)
//fmt.Println("after")
//printMatrix(mat)
/*
if reflect.DeepEqual(g.Posns, []uint32{0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14}) {
t.Fatal("expected unsorted posns")
}
*/
g.Unsort(imat)
/*
if !reflect.DeepEqual(g.Posns, []uint32{0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14}) {
t.Fatal("expected sorted posns")
}
*/
}
================================================
FILE: dcnv/scalers/scalers.go
================================================
// Package scalers holds the interface for scaling depths to standardized scores.
package scalers
import (
"math"
"sort"
"gonum.org/v1/gonum/mat"
"gonum.org/v1/gonum/stat"
)
// Scaler allows transformation and back of the depths.
// As an example, see the `ZScore` struct. Usually, these
// will be 0-centered
type Scaler interface {
// Scale Converts from AdjustedDepth to a scaled value
Scale(*mat.Dense)
UnScale(*mat.Dense)
}
var _ Scaler = &ZScore{}
var _ Scaler = &Log2{}
// ZScore implements the Scaler interface for StdScore (z-score)
type ZScore struct {
means []float64
sds []float64
}
// UnScale converts back to depths.
func (z *ZScore) UnScale(a *mat.Dense) {
r, _ := a.Dims()
for i := 0; i < r; i++ {
row := a.RawRowView(i)
for c, v := range row {
row[c] = math.Max(0, v*z.sds[i]+z.means[i])
}
}
}
// Scale converts from depths to z-scores.
func (z *ZScore) Scale(a *mat.Dense) {
r, _ := a.Dims()
z.means = make([]float64, r)
z.sds = make([]float64, r)
// convert to z-score
for i := 0; i < r; i++ {
row := a.RawRowView(i)
m, sd := stat.MeanStdDev(row, nil)
for c, d := range row {
row[c] = (d - m) / sd
}
z.means[i] = m
z.sds[i] = sd
}
}
type RowCentered struct {
Centerer func([]float64) float64
centers []float64
}
type ColCentered struct {
Centerer func([]float64) float64
centers []float64
}
func (rc *RowCentered) Scale(a *mat.Dense) {
r, _ := a.Dims()
if rc.centers == nil {
rc.centers = make([]float64, 0, r)
}
rc.centers = rc.centers[:0]
for i := 0; i < r; i++ {
row := a.RawRowView(i)
rc.centers = append(rc.centers, rc.Centerer(row))
for c := range row {
row[c] -= rc.centers[i]
}
}
}
func (cc *ColCentered) Scale(a *mat.Dense) {
r, c := a.Dims()
if cc.centers == nil {
cc.centers = make([]float64, 0, c)
}
cc.centers = cc.centers[:0]
col := make([]float64, r)
for i := 0; i < c; i++ {
mat.Col(col, i, a)
cc.centers = append(cc.centers, cc.Centerer(col))
for c := range col {
col[c] -= cc.centers[i]
}
a.SetCol(i, col)
}
}
func (rc *RowCentered) UnScale(a *mat.Dense) {
r, _ := a.Dims()
for i := 0; i < r; i++ {
row := a.RawRowView(i)
cnt := rc.centers[i]
for j := range row {
row[j] += cnt
}
}
}
func (cc *ColCentered) UnScale(a *mat.Dense) {
r, c := a.Dims()
col := make([]float64, r)
for i := 0; i < c; i++ {
mat.Col(col, i, a)
cnt := cc.centers[i]
for j := range col {
col[j] += cnt
}
a.SetCol(i, col)
}
}
func gmean(vs []float64) float64 {
os := make([]float64, len(vs))
copy(os, vs)
sort.Float64s(os)
return os[len(os)/2]
return stat.Mean(vs, nil)
}
// Log2 implements Scaler interface to perform log2 transformation on depths.
type Log2 struct {
CC *ColCentered
}
// Scale converts from depths to log2s
func (l *Log2) Scale(a *mat.Dense) {
r, _ := a.Dims()
if l.CC == nil {
l.CC = &ColCentered{Centerer: gmean}
}
for i := 0; i < r; i++ {
row := a.RawRowView(i)
for c, d := range row {
row[c] = math.Log2(1 + d)
}
}
l.CC.Scale(a)
}
// UnScale converts from log2s to depths
func (l *Log2) UnScale(a *mat.Dense) {
r, _ := a.Dims()
l.CC.UnScale(a)
for i := 0; i < r; i++ {
row := a.RawRowView(i)
for c, d := range row {
row[c] = math.Pow(2, d)
}
}
}
================================================
FILE: dcnv/scalers/scalers_test.go
================================================
package scalers_test
import (
"log"
"math"
"testing"
"gonum.org/v1/gonum/floats"
"gonum.org/v1/gonum/mat"
"gonum.org/v1/gonum/stat"
"github.com/brentp/goleft/dcnv/scalers"
)
const eps = 0.001
func TestZScoreRoundTrip(t *testing.T) {
zsc := &scalers.ZScore{}
imat := mat.NewDense(10, 10, nil)
r, c := imat.Dims()
if r != 10 || c != 10 {
t.Fatal("unexpected size")
}
for i := 0; i < r; i++ {
for j := 0; j < c; j++ {
imat.Set(i, j, float64((i+1)*(j+1)))
}
}
zsc.Scale(imat)
for i := 0; i < r; i++ {
if math.Abs(stat.Mean(mat.RawRowView(i), nil)) > eps {
t.Fatalf("expected 0, got %f", stat.Mean(mat.RawRowView(i), nil))
}
}
zsc.UnScale(mat)
for i := 0; i < r; i++ {
row := mat.RawRowView(i)
for j := 0; j < c; j++ {
if math.Abs(row[j]-float64((i+1)*(j+1))) > eps {
log.Fatalf("expected: %f, got %f", float64((i+1)*(j+1)), row[j])
}
}
}
}
func TestLog2RoundTrip(t *testing.T) {
zsc := &scalers.Log2{}
imat := mat.NewDense(10, 10, nil)
r, c := imat.Dims()
if r != 10 || c != 10 {
t.Fatal("unexpected size")
}
for i := 0; i < r; i++ {
for j := 0; j < c; j++ {
imat.Set(i, j, float64((i+1)*(j+1)))
}
}
zsc.Scale(imat)
for i := 0; i < r; i++ {
if floats.Min(imat.RawRowView(i)) < 0 {
t.Fatalf("log2:expected >0, got %f", stat.Mean(imat.RawRowView(i), nil))
}
}
zsc.UnScale(imat)
for i := 0; i < r; i++ {
row := imat.RawRowView(i)
for j := 0; j < c; j++ {
if math.Abs(row[j]-float64((i+1)*(j+1))) > eps {
log.Fatalf("expected: %f, got %f", float64((i+1)*(j+1)), row[j])
}
}
}
}
================================================
FILE: depth/README.md
================================================
depth
=====
depth parallelizes calls to [samtools](https://samtools.github.io) in user-defined windows.
It outputs a bed file of callable regions (determined by mincov) and of depth (only windows
with <= `maxmeandepth` are reported.
```
usage: goleft depth [--windowsize WINDOWSIZE] [--maxmeandepth MAXMEANDEPTH] [--q Q] [--chrom CHROM] [--mincov MINCOV] [--stats] --reference REFERENCE [--processes PROCESSES] [--bed BED] [--prefix PREFIX] BAM
positional arguments:
bam bam for which to calculate depth
options:
--windowsize WINDOWSIZE, -w WINDOWSIZE
window size in which to calculate high-depth regions [default: 250]
--maxmeandepth MAXMEANDEPTH, -m MAXMEANDEPTH
windows with depth > than this are high-depth. The default reports the depth of all regions.
--q Q, -Q Q mapping quality cutoff [default: 1]
--chrom CHROM, -c CHROM
optional chromosome to limit analysis
--mincov MINCOV minimum depth considered callable [default: 4]
--stats, -s report sequence stats [GC CpG masked] for each window
--reference REFERENCE, -r REFERENCE
path to reference fasta
--processes PROCESSES, -p PROCESSES
number of processors to parallelize.
--bed BED, -b BED file of positions or regions. (parallelization will be by region).
--prefix PREFIX
--help, -h display this help and exit
================================================
FILE: depth/depth.go
================================================
// Package depth parallelizes calls to samtools depths and outputs:
// 1) $prefix.callable.bed that contains collapsed per-base regions of NO/LOW/or CALLABLE coverage.
// where low is < MinCov.
// 2) $prefix.depth.bed that contains the average depth for each window interval specified by WindowSize.
// TODO: output gc-content in depth windows.
package depth
import (
"bufio"
"bytes"
"fmt"
"io"
"log"
"os"
"regexp"
"runtime"
"strconv"
"strings"
arg "github.com/alexflint/go-arg"
"github.com/brentp/faidx"
"github.com/brentp/gargs/process"
"github.com/brentp/xopen"
"github.com/fatih/color"
)
type dargs struct {
WindowSize int `arg:"-w,help:window size in which to calculate high-depth regions"`
MaxMeanDepth int `arg:"-m,help:windows with depth > than this are high-depth. The default reports the depth of all regions."`
Ordered bool `arg:"-o,help:force output to be in same order as input even with -p."`
Q int `arg:"-Q,help:mapping quality cutoff"`
Chrom string `arg:"-c,help:optional chromosome to limit analysis"`
MinCov int `arg:"help:minimum depth considered callable"`
Stats bool `arg:"-s,help:report sequence stats [GC CpG masked] for each window"`
Reference string `arg:"-r,help:path to reference fasta"`
Processes int `arg:"-p,help:number of processors to parallelize."`
Bed string `arg:"-b,help:optional file of positions or regions to restrict depth calculations."`
Prefix string `arg:"required,help:prefix for output files depth.bed and callable.bed"`
Bam string `arg:"positional,required,help:bam for which to calculate depth"`
stdout io.Writer `arg:"-"`
}
// we echo the region first so the callback knows the full extents even if there is NOTE
// coverage for part of it.
const command = "echo '%s'; samtools depth -Q %d -d %d -r '%s' '%s'"
// this is the size in basepairs of the genomic chunks for parallelization.
var step = 10000000
var exitCode = 0
func pcheck(e error) {
if e != nil {
log.Fatal(e)
}
}
func min(a, b int) int {
if a < b {
return a
}
return b
}
func max(a, b int) int {
if a > b {
return a
}
return b
}
// match chrom:start-end and chrom\tstart\tend
var re = regexp.MustCompile("(.+?)[:\t](\\d+)([\\-\t])(\\d+).*?")
func chromStartEndFromLine(line []byte) (string, int, int) {
ret := re.FindSubmatch(line)
if len(ret) != 5 {
log.Fatal("couldn't get region from line", string(line))
}
chrom, start, isep, end := ret[1], ret[2], ret[3], ret[4]
// convert from bed to chrom:start-end region so add 1 to start
istart, err := strconv.Atoi(string(start))
if err != nil {
log.Fatal(err)
}
if bytes.Equal(isep, []byte{'-'}) {
istart--
}
iend, err := strconv.Atoi(string(end))
if err != nil {
log.Fatal(err)
}
return string(chrom), max(istart, 0), iend
}
func regionFromLine(line []byte) string {
chrom, start, end := chromStartEndFromLine(line)
// convert from bed to chrom:start-end region so add 1 to start
return fmt.Sprintf("%s:%d-%d", chrom, start+1, end)
}
// when the user specified a Bed file of regions for coverage, this is used.
func genFromBed(ch chan string, args dargs) {
rdr, err := xopen.Ropen(args.Bed)
pcheck(err)
for {
line, err := rdr.ReadBytes('\n')
if err == io.EOF {
break
}
pcheck(err)
if len(line) == 0 {
continue
}
region := regionFromLine(line)
ch <- fmt.Sprintf(command, region, args.Q, args.MaxMeanDepth+2500,
region, args.Bam)
}
close(ch)
}
func genCommands(args dargs) chan string {
ch := make(chan string)
if args.Bed != "" {
go genFromBed(ch, args)
return ch
}
go func() {
// make sure step jives with windowsize otherwise we get WindowSize
// where it doesn't have the right size
step = max(1, step/args.WindowSize) * args.WindowSize
rdr, err := xopen.Ropen(args.Reference + ".fai")
pcheck(err)
for {
line, err := rdr.ReadString('\n')
if err == io.EOF {
break
}
pcheck(err)
toks := strings.Split(line, "\t")
chrom := toks[0]
if args.Chrom != "" && chrom != args.Chrom {
continue
}
length, err := strconv.Atoi(toks[1])
pcheck(err)
for i := 0; i < length; i += step {
region := fmt.Sprintf("%s:%d-%d", chrom, i+1, min(i+step, length))
ch <- fmt.Sprintf(command, region, args.Q, args.MaxMeanDepth+2500,
region, args.Bam)
}
}
close(ch)
}()
return ch
}
// Main is run from the dispatcher
func Main() {
args := dargs{WindowSize: 250,
MaxMeanDepth: 0,
MinCov: 4,
Q: 1}
p := arg.MustParse(&args)
if args.Prefix == "" {
p.Fail("you must specify an output prefix")
}
runtime.GOMAXPROCS(args.Processes)
run(args)
os.Exit(exitCode)
}
type ipos struct {
start int
}
func mean(sl []int, l int) (avg float64) {
if len(sl) == 0 || l == 0 {
return 0
}
for _, v := range sl {
avg += float64(v)
}
return avg / float64(l)
}
func getStats(fa *faidx.Faidx, chrom string, start, end int) string {
if fa == nil {
return ""
}
st, err := fa.Stats(chrom, start, end)
if err != nil {
log.Println(err)
}
return fmt.Sprintf("\t%.3g\t%.3g\t%.3g", st.GC, st.CpG, st.Masked)
}
func getPosDepth(rline string) (int, int, error) {
// toks starts after chrom. so [0] is pos and [1] is depth.
toks := strings.SplitN(rline, "\t", 2)
pos, err := strconv.Atoi(toks[0])
if err != nil {
return 0, 0, err
}
pos--
if len(toks[1]) > 1 && toks[1][len(toks[1])-1] == '\n' {
toks[1] = toks[1][:len(toks[1])-1]
}
depth, err := strconv.Atoi(toks[1])
if err != nil {
return 0, 0, err
}
return pos, depth, nil
}
func getCovClass(depth, minCov, maxMeanDepth int) string {
if depth == 0 {
return "NO_COVERAGE"
}
if depth < minCov {
return "LOW_COVERAGE"
}
if maxMeanDepth > 0 && depth >= maxMeanDepth {
return "EXCESSIVE_COVERAGE"
}
return "CALLABLE"
}
func run(args dargs) {
callback := func(r io.Reader, w io.WriteCloser) error {
rdr := bufio.NewReader(r)
wtr := bufio.NewWriter(w)
defer w.Close()
defer wtr.Flush()
var fa *faidx.Faidx
var err error
if args.Stats {
fa, err = faidx.New(args.Reference)
defer fa.Close()
if err != nil {
return err
}
}
depthCache := make([]int, 0, args.WindowSize)
var depth, pos int
region, err := rdr.ReadBytes('\n')
if err != nil {
return err
}
// this is the bounds of the region echo'd before the samtools depth call.
chrom, regionStart, regionEnd := chromStartEndFromLine(region)
lastWindow := max(0, regionStart/args.WindowSize)
var cache [2]ipos
cache[0].start = regionStart - 1
cache[1].start = regionStart - 1
var lastCovClass string
hdPath := fmt.Sprintf("%s.%s-%d-%d.tmp.depth.bed", args.Prefix, chrom, regionStart, regionEnd)
fhHD, ferr := xopen.Wopen(hdPath)
if ferr != nil {
return ferr
}
caPath := fmt.Sprintf("%s.%s-%d-%d.tmp.callable.bed", args.Prefix, chrom, regionStart, regionEnd)
fhCA, ferr := xopen.Wopen(caPath)
if ferr != nil {
return ferr
}
defer fhCA.Close()
defer fhHD.Close()
line, err := rdr.ReadString('\n')
for err == nil {
chrom = line[:strings.Index(line, "\t")]
pos, depth, err = getPosDepth(line[len(chrom)+1:])
if err != nil {
break
}
// if we have a full window...
if pos/args.WindowSize != lastWindow {
thisWindow := pos / args.WindowSize
// print lastWindow along with any windows without any coverage.
for iwindow := lastWindow; iwindow < thisWindow; iwindow++ {
s := max(regionStart, iwindow*args.WindowSize)
e := min(regionEnd, (iwindow+1)*args.WindowSize)
stats := getStats(fa, chrom, s, e)
// only the 1st loop of this will have values in depthCache. Others will have 0.
fhHD.WriteString(fmt.Sprintf("%s\t%d\t%d\t%.4g%s\n", chrom, s, e, mean(depthCache, e-s), stats))
depthCache = depthCache[:0]
}
lastWindow = thisWindow
}
depthCache = append(depthCache, depth)
covClass := getCovClass(depth, args.MinCov, args.MaxMeanDepth)
// check for a gap or a change in the coverage class.
if covClass != lastCovClass || pos != cache[1].start+1 {
if lastCovClass != "" {
fhCA.WriteString(fmt.Sprintf("%s\t%d\t%d\t%s\n", chrom, cache[0].start, cache[1].start+1, lastCovClass))
}
// also fill in block without any coverage.
if pos != cache[1].start+1 {
fhCA.WriteString(fmt.Sprintf("%s\t%d\t%d\t%s\n", chrom, cache[1].start+1, pos, "NO_COVERAGE"))
}
lastCovClass = covClass
cache[0] = ipos{pos}
cache[1] = ipos{pos}
} else {
cache[1].start = pos
}
line, err = rdr.ReadString('\n')
}
if cache[0].start != -1 && lastCovClass != "" {
fhCA.WriteString(fmt.Sprintf("%s\t%d\t%d\t%s\n", chrom, cache[0].start, cache[1].start+1, lastCovClass))
}
if len(depthCache) > 0 {
s := pos / args.WindowSize * args.WindowSize
if s < regionEnd {
s := max(s, regionStart)
e := min(regionEnd, s+args.WindowSize)
stats := getStats(fa, chrom, s, e)
fhHD.WriteString(fmt.Sprintf("%s\t%d\t%d\t%.4g%s\n", chrom, s, e, mean(depthCache, e-s), stats))
depthCache = depthCache[:0]
// set position to end here so we don't output the same position below.
pos = e
}
}
// we didn't get data for the full region, so it must end in no-coverage.
if cache[1].start+1 < regionEnd {
// If we had regions within section
if cache[1].start != -1 {
fhCA.WriteString(fmt.Sprintf("%s\t%d\t%d\tNO_COVERAGE\n", chrom, cache[1].start+1, regionEnd))
// otherwise the whole region is NO_COVERAGE
} else {
fhCA.WriteString(fmt.Sprintf("%s\t%d\t%d\tNO_COVERAGE\n", chrom, regionStart, regionEnd))
}
for ds := max(regionStart, pos) / args.WindowSize * args.WindowSize; ds < regionEnd && pos < regionEnd; ds += args.WindowSize {
// keep de calc first.
de := min(regionEnd, ds+args.WindowSize)
s := max(ds, regionStart)
stats := getStats(fa, chrom, s, de)
fhHD.WriteString(fmt.Sprintf("%s\t%d\t%d\t%.4g%s\n", chrom, s, de, mean(depthCache, de-s), stats))
depthCache = depthCache[:0]
}
}
wtr.WriteString(caPath + "\n")
wtr.WriteString(hdPath + "\n")
wtr.Flush()
return w.Close()
}
cancel := make(chan bool)
defer close(cancel)
var stdout io.Writer
if args.stdout == nil {
stdout = bufio.NewWriter(os.Stdout)
} else {
stdout = args.stdout
}
type flushable interface {
Flush() error
}
if s, ok := stdout.(flushable); ok {
defer s.Flush()
}
chrom := ""
if args.Chrom != "" {
chrom = "." + args.Chrom
}
fhca, err := xopen.Wopen(fmt.Sprintf("%s%s.callable.bed", args.Prefix, chrom))
pcheck(err)
fhhd, err := xopen.Wopen(fmt.Sprintf("%s%s.depth.bed", args.Prefix, chrom))
pcheck(err)
defer fhca.Flush()
defer fhhd.Flush()
opts := process.Options{Retries: 1, CallBack: callback, Ordered: args.Ordered}
for cmd := range process.Runner(genCommands(args), cancel, &opts) {
if ex := cmd.ExitCode(); ex != 0 && cmd.Err != io.EOF {
c := color.New(color.BgRed).Add(color.Bold)
fmt.Fprintf(os.Stderr, "%s\n", c.SprintFunc()(fmt.Sprintf("ERROR with command: %s", cmd)))
exitCode = max(exitCode, ex)
}
if cmd.Err == io.EOF {
continue
}
caPath, err := cmd.ReadString('\n')
if err != nil {
log.Println(cmd.CmdStr, err, cmd.Err)
}
caSrc, err := xopen.Ropen(strings.TrimSpace(caPath))
pcheck(err)
io.Copy(fhca, caSrc)
os.Remove(strings.TrimSpace(caPath))
hdPath, err := cmd.ReadString('\n')
if err != nil {
log.Println(err)
}
hdSrc, err := xopen.Ropen(strings.TrimSpace(hdPath))
pcheck(err)
io.Copy(fhhd, hdSrc)
os.Remove(strings.TrimSpace(hdPath))
cmd.Cleanup()
}
fhca.Flush()
fhca.Close()
fhhd.Flush()
fhhd.Close()
}
================================================
FILE: depth/functional-test.sh
================================================
#!/bin/bash
test -e ssshtest || wget -q https://raw.githubusercontent.com/ryanlayer/ssshtest/master/ssshtest
. ssshtest
set -uo pipefail
go build -o goleft ../cmd/goleft/goleft.go
check_with_fai_bt() {
fai=$1
bed=$2
v=$(awk '{ print $1"\t"0"\t"$2 }' $fai | bedtools subtract -b - -a $bed && awk '{ print $1"\t"0"\t"$2 }' $fai | bedtools subtract -a - -b $bed)
echo -e "$v"
}
check_with_bed_bt() {
v=$(bedtools subtract -a $1 -b $2 && bedtools subtract -a $2 -b $1)
echo -e "$v"
}
check_uniq() {
a=$(cat $1 | wc -l)
b=$(uniq $1 | wc -l)
if [[ "$a" != "$b" ]]; then
echo "DUPLICATE LINES in $1: $a $b"
return
fi
if [[ "$#" == "2" ]]; then
echo "OK"
return
fi
c=$(cut -f 1-3 $1 | sort -u | wc -l)
if [[ "$a" != "$c" ]]; then
echo "DUPLICATE regions in $1: $a $c"
return
fi
echo "OK"
}
export -f check_with_fai_bt
export -f check_with_bed_bt
run check_wgs ./goleft depth -Q 1 --ordered --windowsize 100 --stats --prefix x --reference test/hg19.fa test/t.bam
assert_exit_code 0
assert_equal "$(check_with_fai_bt test/hg19.fa.fai x.depth.bed)" ""
assert_equal "$(check_with_fai_bt test/hg19.fa.fai x.callable.bed)" ""
assert_equal "$(check_uniq x.depth.bed)" "OK"
assert_equal "$(check_uniq x.callable.bed)" "OK"
run compare_to_samtools_100 python test/cmp.py x.depth.bed test/t.bam
assert_exit_code 0
run check_wgs_big_window ./goleft depth -Q 1 --ordered --windowsize 1000000000 --stats --prefix x --reference test/hg19.fa test/t.bam
assert_exit_code 0
assert_equal "$(check_with_fai_bt test/hg19.fa.fai x.depth.bed)" ""
assert_equal "$(check_with_fai_bt test/hg19.fa.fai x.callable.bed)" ""
assert_equal "$(check_uniq x.depth.bed)" "OK"
assert_equal "$(check_uniq x.callable.bed)" "OK"
for w in 55 60 71 13 2001; do
run check_wgs_big_window$w ./goleft depth -Q 1 --ordered --windowsize $w --stats --prefix x --reference test/hg19.fa test/t.bam
assert_exit_code 0
assert_equal "$(check_with_fai_bt test/hg19.fa.fai x.depth.bed)" ""
assert_equal "$(check_with_fai_bt test/hg19.fa.fai x.callable.bed)" ""
assert_equal "$(check_uniq x.depth.bed)" "OK"
assert_equal "$(check_uniq x.callable.bed)" "OK"
done
run check_bed ./goleft depth --bed test/windows.bed -Q 1 --ordered --windowsize 10 --stats --prefix x --reference test/hg19.fa test/t.bam
assert_exit_code 0
assert_equal "$(check_with_bed_bt x.depth.bed test/windows.bed)" ""
assert_equal "$(check_with_bed_bt x.callable.bed test/windows.bed)" ""
assert_equal "$(check_uniq x.depth.bed bed)" "OK"
assert_equal "$(check_uniq x.callable.bed bed)" "OK"
run check_bed_big_window ./goleft depth --bed test/windows.bed -Q 1 --ordered --windowsize 1000000 --stats --prefix x --reference test/hg19.fa test/t.bam
assert_exit_code 0
assert_equal "$(check_with_bed_bt x.depth.bed test/windows.bed)" ""
assert_equal "$(check_with_bed_bt x.callable.bed test/windows.bed)" ""
assert_equal "$(check_uniq x.depth.bed bed)" "OK"
assert_equal "$(check_uniq x.callable.bed bed)" "OK"
run compare_to_samtools_big_window python test/cmp.py x.depth.bed test/t.bam
for w in 50 55 60 71 13 2002; do
run check_bed_window$w ./goleft depth --bed test/windows.bed -Q 1 --ordered --windowsize $w --stats --prefix x --reference test/hg19.fa test/t.bam
assert_exit_code 0
assert_equal "$(check_with_bed_bt x.depth.bed test/windows.bed)" ""
assert_equal "$(check_with_bed_bt x.callable.bed test/windows.bed)" ""
assert_equal "$(check_uniq x.depth.bed bed)" "OK"
assert_equal "$(check_uniq x.callable.bed bed)" "OK"
run compare_to_samtools_directly$w python test/cmp.py x.depth.bed test/t.bam
done
assert_exit_code 0
run check_empty ./goleft depth --windowsize 10 --q 1 --mincov 4 --reference test/hg19.fa --processes 1 --stats --prefix x test/t-empty.bam
assert_exit_code 0
assert_equal "$(check_with_fai_bt test/hg19.fa.fai x.depth.bed)" ""
assert_equal "$(check_with_fai_bt test/hg19.fa.fai x.callable.bed)" ""
assert_equal "$(check_uniq x.depth.bed)" "OK"
assert_equal "$(check_uniq x.callable.bed)" "OK"
run check_empty_window ./goleft depth --bed test/windows.bed --windowsize 10 --q 1 --mincov 4 --reference test/hg19.fa --processes 1 --stats --prefix x test/t-empty.bam
assert_exit_code 0
assert_equal "$(check_with_bed_bt x.depth.bed test/windows.bed)" ""
assert_equal "$(check_with_bed_bt x.callable.bed test/windows.bed)" ""
assert_equal "$(check_uniq x.depth.bed bed)" "OK"
assert_equal "$(check_uniq x.callable.bed bed)" "OK"
run check_hla ./goleft depth -r test/fake.fa --prefix /tmp/xx test/hla.bam
assert_exit_code 0
echo -e "\nFINISHED OK"
================================================
FILE: depth/intervals.go
================================================
package depth
import (
"bufio"
"io"
"github.com/biogo/store/interval"
"github.com/brentp/xopen"
)
// Integer-specific intervals
type irange struct {
Start, End int
UID uintptr
}
func (i irange) Overlap(b interval.IntRange) bool {
// Half-open interval indexing.
return i.End > b.Start && i.Start < b.End
}
func (i irange) ID() uintptr { return i.UID }
func (i irange) Range() interval.IntRange { return interval.IntRange{i.Start, i.End} }
// Overlaps checks for overlaps without pulling intervals from the tree.
func Overlaps(tree *interval.IntTree, start, end int) bool {
if tree == nil {
return false
}
q := irange{Start: start, End: end, UID: uintptr(tree.Len())}
overlaps := false
tree.DoMatching(func(iv interval.IntInterface) bool {
overlaps = true
return true
}, q)
return overlaps
}
// ReadTree takes a bed file and returns map of trees.
func ReadTree(ps ...string) map[string]*interval.IntTree {
tree := make(map[string]*interval.IntTree, 10)
k := 0
for _, p := range ps {
if p == "" {
continue
}
r, err := xopen.Ropen(p)
if err != nil {
panic(err)
}
defer r.Close()
br := bufio.NewReader(r)
for {
line, err := br.ReadBytes('\n')
if err == io.EOF {
break
}
if err != nil {
panic(err)
}
chrom, start, end := chromStartEndFromLine(line)
if start >= end {
continue
}
if _, ok := tree[chrom]; !ok {
tree[chrom] = &interval.IntTree{}
}
if err := tree[chrom].Insert(irange{start, end, uintptr(k)}, false); err != nil {
panic(err)
}
k += 1
}
}
return tree
}
================================================
FILE: depth/test/cmp.py
================================================
import subprocess as sp
import sys
goleft_bed = sys.argv[1]
bam = sys.argv[2]
for toks in (l.rstrip().split("\t") for l in open(goleft_bed)):
cmd = "samtools depth -a -Q 1 -r '%s:%d-%s' %s | awk '{s+=$3}END{if(NR==0){print 0}else{print s/%d}}'" % (toks[0], int(toks[1]) + 1, toks[2], bam, int(toks[2]) - int(toks[1]))
out = sp.check_output(cmd, shell=True).strip()
expected = float(toks[3])
if abs(expected - float(out.strip())) > 0.5:
print("ERROR")
print(float(out.strip()), expected)
print(cmd)
sys.exit(1)
================================================
FILE: depth/test/fake.fa
================================================
>HLA-A*01:01:01:01
GATCACAGGTCTATCACCCTATTAACCACTCACGGGAGCTCTCCATGCATTTGGTATTTT
CGTCTGGGGGGTGTGCACGCGATAGCATTGCGAGACGCTGGAGCCGGAGCACCCTATGTC
GCAGTATCTGTCTTTGATTCCTGCCTCATTCTATTATTTATCGCACCTACGTTCAATATT
ACAGGCGAACATACCTACTAAAGTGTGTTAATTAATTAATGCTTGTAGGACATAATAATA
ACAATTGAATGTCTGCACAGCCGCTTTCCACACAGACATCATAACAAAAAATTTCCACCA
AACCCCCCCCTCCCCCCGCTTCTGGCCACAGCACTTAAACACATCTCTGCCAAACCCCAA
AAACAAAGAACCCTAACACCAGCCTAACCAGATTTCAAATTTTATCTTTAGGCGGTATGC
ACTTTTAACAGTCACCCCCCAACTAACACATTATTTTCCCCTCCCACTCCCATACTACTA
ATCTCATCAATACAACCCCCGCCCATCCTACCCAGCACACACACACCGCTGCTAACCCCA
TACCCCGAACCAACCAAACCCCAAAGACACCCCCCACAGTTTATGTAGCTTACCTCCTCA
AAGCAATACACTGAAAATGTTTAGACGGGCTCACATCACCCCATAAACAAATAGGTTTGG
TCCTAGCCTTTCTATTAGCTCTTAGTAAGATTACACATGCAAGCATCCCCGTTCCAGTGA
GTTCACCCTCTAAATCACCACGATCAAAAGGGACAAGCATCAAGCACGCAGCAATGCAGC
TCAAAACGCTTAGCCTAGCCACACCCCCACGGGAAACAGCAGTGATTAACCTTTAGCAAT
AAACGAAAGTTTAACTAAGCTATACTAACCCCAGGGTTGGTCAATTTCGTGCCAGCCACC
GCGGTCACACGATTAACCCAAGTCAATAGAAGCCGGCGTAAAGAGTGTTTTAGATCACCC
CCTCCCCAATAAAGCTAAAACTCACCTGAGTTGTAAAAAACTCCAGTTGACACAAAATAG
ACTACGAAAGTGGCTTTAACATATCTGAACACACAATAGCTAAGACCCAAACTGGGATTA
GATACCCCACTATGCTTAGCCCTAAACCTCAACAGTTAAATCAACAAAACTGCTCGCCAG
AACACTACGAGCCACAGCTTAAAACTCAAAGGACCTGGCGGTGCTTCATATCCCTCTAGA
GGAGCCTGTTCTGTAATCGATAAACCCCGATCAACCTCACCACCTCTTGCTCAGCCTATA
TACCGCCATCTTCAGCAAACCCTGATGAAGGCTACAAAGTAAGCGCAAGTACCCACGTAA
AGACGTTAGGTCAAGGTGTAGCCCATGAGGTGGCAAGAAATGGGCTACATTTTCTACCCC
AGAAAACTACGATAGCCCTTATGAAACTTAAGGGTCGAAGGTGGATTTAGCAGTAAACTG
AGAGTAGAGTGCTTAGTTGAACAGGGCCCTGAAGCGCGTACACACCGCCCGTCACCCTCC
TCAAGTATACTTCAAAGGACATTTAACTAAAACCCCTACGCATTTATATAGAGGAGACAA
GTCGTAACATGGTAAGTGTACTGGAAAGTGCACTTGGACGAACCAGAGTGTAGCTTAACA
CAAAGCACCCAACTTACACTTAGGAGATTTCAACTTAACTTGACCGCTCTGAGCTAAACC
TAGCCCCAAACCCACTCCACCTTACTACCAGACAACCTTAGCCAAACCATTTACCCAAAT
AAAGTATAGGCGATAGAAATTGAAACCTGGCGCAATAGATATAGTACCGCAAGGGAAAGA
TGAAAAATTATAACCAAGCATAATATAGCAAGGACTAACCCCTATACCTTCTGCATAATG
AATTAACTAGAAATAACTTTGCAAGGAGAGCCAAAGCTAAGACCCCCGAAACCAGACGAG
CTACCTAAGAACAGCTAAAAGAGCACACCCGTCTATGTAGCAAAATAGTGGGAAGATTTA
TAGGTAGAGGCGACAAACCTACCGAGCCTGGTGATAGCTGGTTGTCCAAGATAGAATCTT
AGTTCAACTTTAAATTTGCCCACAGAACCCTCTAAATCCCCTTGTAAATTTAACTGTTAG
TCCAAAGAGGAACAGCTCTTTGGACACTAGGAAAAAACCTTGTAGAGAGAGTAAAAAATT
TAACACCCATAGTAGGCCTAAAAGCAGCCACCAATTAAGAAAGCGTTCAAGCTCAACACC
CACTACCTAAAAAATCCCAAACATATAACTGAACTCCTCACACCCAATTGGACCAATCTA
TCACCCTATAGAAGAACTAATGTTAGTATAAGTAACATGAAAACATTCTCCTCCGCATAA
GCCTGCGTCAGATCAAAACACTGAACTGACAATTAACAGCCCAATATCTACAATCAACCA
ACAAGTCATTATTACCCTCACTGTCAACCCAACACAGGCATGCTCATAAGGAAAGGTTAA
AAAAAGTAAAAGGAACTCGGCAAACCTTACCCCGCCTGTTTACCAAAAACATCACCTCTA
GCATCACCAGTATTAGAGGCACCGCCTGCCCAGTGACACATGTTTAACGGCCGCGGTACC
CTAACCGTGCAaaggtagcataatcacttgttccttaaatagggacctgtatgaatggct
ccacgagggttcagctgtctcttacttttaaccagtgaaattgacctgcccgtgaagagg
cgggcatgacacagcaagacgagaagaccctatggagctttaatttaTTAATGCAAACAG
TACCTAACAAACCCACAGGTCCTAAACTACCAAACCTGCATTAAAAATTTCGGTTGGGGC
GACCTCGGAGCAGAACCCAACCTCCGAGCAGTACATGCTAAGACTTCACCAGTCAAAGCG
AACTACTATACTCAATTGATCCAATAACTTGACCAACGGAACAAGTTACCCTAGGGATAA
CAGCGCAATCCTATTCTAGAGTCCATATCAACAATAGGGTTTACGACCTCGATGTTGGAT
CAGGACATCCCGATGGTGCAGCCGCTATTAAAGGTTCGTTTGTTCAACGATTAAAGTCCT
ACGTGATCTGAGTTCAGACCGGAGTAATCCAGGTCGGTTTCTATCTACTTCAAATTCCTC
CCTGTACGAAAGGACAAGAGAAATAAGGCCTACTTCACAAAGCGCCTTCCCCCGTAAATG
ATATCATCTCAACTTAGTATTATACCCACACCCACCCAAGAACAGGGTTTgttaagatgg
cagagcccggtaatcgcataaaacttaaaactttacagtcagaggttcaattcctcttct
taacaacaTACCCATGGCCAACCTCCTACTCCTCATTGTACCCATTCTAATCGCAATGGC
ATTCCTAATGCTTACCGAACGAAAAATTCTAGGCTATATACAACTACGCAAAGGCCCCAA
CGTTGTAGGCCCCTACGGGCTACTACAACCCTTCGCTGACGCCATAAAACTCTTCACCAA
AGAGCCCCTAAAACCCGCCACATCTACCATCACCCTCTACATCACCGCCCCGACCTTAGC
TCTCACCATCGCTCTTCTACTATGAACCCCCCTCCCCATACCCAACCCCCTGGTCAACCT
CAACCTAGGCCTCCTATTTATTCTAGCCACCTCTAGCCTAGCCGTTTACTCAATCCTCTG
ATCAGGGTGAGCATCAAACTCAAACTACGCCCTGATCGGCGCACTGCGAGCAGTAGCCCA
AACAATCTCATATGAAGTCACCCTAGCCATCATTCTACTATCAACATTACTAATAAGTGG
CTCCTTTAACCTCTCCACCCTTATCACAACACAAGAACACCTCTGATTACTCCTGCCATC
ATGACCCTTGGCCATAATATGATTTATCTCCACACTAGCAGAGACCAACCGAACCCCCTT
CGACCTTGCCGAAGGGGAGTCCGAACTAGTCTCAGGCTTCAACATCGAATACGCCGCAGG
CCCCTTCGCCCTATTCTTCATAGCCGAATACACAAACATTATTATAATAAACACCCTCAC
CACTACAATCTTCCTAGGAACAACATATGACGCACTCTCCCCTGAACTCTACACAACATA
TTTTGTCACCAAGACCCTACTTCTAACCTCCCTGTTCTTATGAATTCGAACAGCATACCC
CCGATTCCGCTACGACCAACTCATACACCTCCTATGAAAAAACTTCCTACCACTCACCCT
AGCATTACTTATATGATATGTCTCCATACCCATTACAATCTCCAGCATTCCCCCTCAAAC
CTAAGAAATATGTCTGATAAAAGAGTTACTTTGATAGAGTAAATAATAGGAGCTTAAACC
CCCTTATTTctaggactatgagaatcgaacccatccctgagaatccaaaattctccgtgc
cacctatcacaccccatcctaAAGTAAGGTCAGCTAAATAAGCTATCGGGCCCATACCCC
GAAAATGTTGGTTATACCCTTCCCGTACTAATTAATCCCCTGGCCCAACCCGTCATCTAC
TCTACCATCTTTGCAGGCACACTCATCACAGCGCTAAGCTCGCACTGATTTTTTACCTGA
GTAGGCCTAGAAATAAACATGCTAGCTTTTATTCCAGTTCTAACCAAAAAAATAAACCCT
CGTTCCACAGAAGCTGCCATCAAGTATTTCCTCACGCAAGCAACCGCATCCATAATCCTT
CTAATAGCTATCCTCTTCAACAATATACTCTCCGGACAATGAACCATAACCAATACTACC
AATCAATACTCATCATTAATAATCATAATGGCTATAGCAATAAAACTAGGAATAGCCCCC
TTTCACTTCTGAGTCCCAGAGGTTACCCAAGGCACCCCTCTGACATCCGGCCTGCTTCTT
CTCACATGACAAAAACTAGCCCCCATCTCAATCATATACCAAATCTCTCCCTCACTAAAC
GTAAGCCTTCTCCTCACTCTCTCAATCTTATCCATCATAGCAGGCAGTTGAGGTGGATTA
AACCAAACCCAGCTACGCAAAATCTTAGCATACTCCTCAATTACCCACATAGGATGAATA
ATAGCAGTTCTACCGTACAACCCTAACATAACCATTCTTAATTTAACTATTTATATTATC
CTAACTACTACCGCATTCCTACTACTCAACTTAAACTCCAGCACCACGACCCTACTACTA
TCTCGCACCTGAAACAAGCTAACATGACTAACACCCTTAATTCCATCCACCCTCCTCTCC
CTAGGAGGCCTGCCCCCGCTAACCGGCTTTTTGCCCAAATGGGCCATTATCGAAGAATTC
ACAAAAAACAATAGCCTCATCATCCCCACCATCATAGCCACCATCACCCTCCTTAACCTC
TACTTCTACCTACGCCTAATCTACTCCACCTCAATCACACTACTCCCCATATCTAACAAC
GTAAAAATAAAATGACAGTTTGAACATACAAAACCCACCCCATTCCTCCCCACACTCATC
GCCCTTACCACGCTACTCCTACCTATCTCCCCTTTTATACTAATAATCTTATAGAAATTT
AGGTTAAATACAGACCAAGAGCCTTCAAAGCCCTCAGTAAGTTGCAATACTTAATTTCTG
CAACAGCTAAGGACTGCAAAACCCCACTCTGCATCAACTGAACGCAAATCAGCCACTTTA
ATTAAGCTAAGCCCTTACTAGACCAATGGGACTTAAACCCACAAACACTTAGTTAACAGC
TAAGCACCCTAATCAACTGGCTTCAATCTACTTCTCCCGCCGCCGGGAAAAAAGGCGGGA
GAAGCCCCGGCAGGTTTGAAGCTGCTTCTTCGAATTTGCAATTCAATATGAAAATCACCT
CGGAGCTGGTAAAAAGAGGCCTAACCCCTGTCTTTAGATTTACAGTCCAATGCTTCACTC
AGCCATTTTACCTCACCCCCACTGATGTTCGCCGACCGTTGACTATTCTCTACAAACCAC
AAAGACATTGGAACACTATACCTATTATTCGGCGCATGAGCTGGAGTCCTAGGCACAGCT
CTAAGCCTCCTTATTCGAGCCGAGCTGGGCCAGCCAGGCAACCTTCTAGGTAACGACCAC
ATCTACAACGTTATCGTCACAGCCCATGCATTTGTAATAATCTTCTTCATAGTAATACCC
ATCATAATCGGAGGCTTTGGCAACTGACTAGTTCCCCTAATAATCGGTGCCCCCGATATG
GCGTTTCCCCGCATAAACAACATAAGCTTCTGACTCTTACCTCCCTCTCTCCTACTCCTG
CTCGCATCTGCTATAGTGGAGGCCGGAGCAGGAACAGGTTGAACAGTCTACCCTCCCTTA
GCAGGGAACTACTCCCACCCTGGAGCCTCCGTAGACCTAACCATCTTCTCCTTACACCTA
GCAGGTGTCTCCTCTATCTTAGGGGCCATCAATTTCATCACAACAATTATCAATATAAAA
CCCCCTGCCATAACCCAATACCAAACGCCCCTCTTCGTCTGATCCGTCCTAATCACAGCA
GTCCTACTTCTCCTATCTCTCCCAGTCCTAGCTGCTGGCATCACTATACTACTAACAGAC
CGCAACCTCAACACCACCTTCTTCGACCCCGCCGGAGGAGGAGACCCCATTCTATACCAA
CACCTATTCTGATTTTTCGGTCACCCTGAAGTTTATATTCTTATCCTACCAGGCTTCGGA
ATAATCTCCCATATTGTAACTTACTACTCCGGAAAAAAAGAACCATTTGGATACATAGGT
ATGGTCTGAGCTATGATATCAATTGGCTTCCTAGGGTTTATCGTGTGAGCACACCATATA
TTTACAGTAGGAATAGACGTAGACACACGAGCATATTTCACCTCCGCTACCATAATCATC
GCTATCCCCACCGGCGTCAAAGTATTTAGCTGACTCGCCACACTCCACGGAAGCAATATG
AAATGATCTGCTGCAGTGCTCTGAGCCCTAGGATTCATCTTTCTTTTCACCGTAGGTGGC
CTGACTGGCATTGTATTAGCAAACTCATCACTAGACATCGTACTACACGACACGTACTAC
GTTGTAGCTCACTTCCACTATGTCCTATCAATAGGAGCTGTATTTGCCATCATAGGAGGC
TTCATTCACTGATTTCCCCTATTCTCAGGCTACACCCTAGACCAAACCTACGCCAAAATC
CATTTCACTATCATATTCATCGGCGTAAATCTAACTTTCTTCCCACAACACTTTCTCGGC
CTATCCGGAATGCCCCGACGTTACTCGGACTACCCCGATGCATACACCACATGAAACATC
CTATCATCTGTAGGCTCATTCATTTCTCTAACAGCAGTAATATTAATAATTTTCATGATT
TGAGAAGCCTTCGCTTCGAAGCGAAAAGTCCTAATAGTAGAAGAACCCTCCATAAACCTG
GAGTGACTATATGGATGCCCCCCACCCTACCACACATTCGAAGAACCCGTATACATAAAA
TCTAGACAaaaaaggaaggaatcgaaccccccaaagctggtttcaagccaaccccatggc
ctccatgactttttcAAAAAGGTATTAGAAAAACCATTTCATAACTTTGTCAAAGTTAAA
TTATAGGCTAAATCCTATATATCTTAATGGCACATGCAGCGCAAGTAGGTCTACAAGACG
CTACTTCCCCTATCATAGAAGAGCTTATCACCTTTCATGATCACGCCCTCATAATCATTT
TCCTTATCTGCTTCCTAGTCCTGTATGCCCTTTTCCTAACACTCACAACAAAACTAACTA
ATACTAACATCTCAGACGCTCAGGAAATAGAAACCGTCTGAACTATCCTGCCCGCCATCA
TCCTAGTCCTCATCGCCCTCCCATCCCTACGCATCCTTTACATAACAGACGAGGTCAACG
ATCCCTCCCTTACCATCAAATCAATTGGCCACCAATGGTACTGAACCTACGAGTACACCG
ACTACGGCGGACTAATCTTCAACTCCTACATACTTCCCCCATTATTCCTAGAACCAGGCG
ACCTGCGACTCCTTGACGTTGACAATCGAGTAGTACTCCCGATTGAAGCCCCCATTCGTA
TAATAATTACATCACAAGACGTCTTGCACTCATGAGCTGTCCCCACATTAGGCTTAAAAA
CAGATGCAATTCCCGGACGTCTAAACCAAACCACTTTCACCGCTACACGACCGGGGGTAT
ACTACGGTCAATGCTCTGAAATCTGTGGAGCAAACCACAGTTTCATGCCCATCGTCCTAG
AATTAATTCCCCTAAAAATCTTTGAAATAGGGCCCGTATTTACCCTATAGCACCCCCTCT
ACCCCCTCTAGAGCCCACTGTAAAGCTAACTTAGCATTAACCTTTTAAGTTAAAGATTAA
GAGAACCAACACCTCTTTACAGTGAAATGCCCCAACTAAATACTACCGTATGGCCCACCA
TAATTACCCCCATACTCCTTACACTATTCCTCATCACCCAACTAAAAATATTAAACACAA
ACTACCACCTACCTCCCTCACCAAAGCCCATAAAAATAAAAAATTATAACAAACCCTGAG
AACCAAAATGAACGAAAATCTGTTCGCTTCATTCATTGCCCCCACAATCCTAGGCCTACC
CGCCGCAGTACTGATCATTCTATTTCCCCCTCTATTGATCCCCACCTCCAAATATCTCAT
CAACAACCGACTAATCACCACCCAACAATGACTAATCAAACTAACCTCAAAACAAATGAT
AGCCATACACAACACTAAAGGACGAACCTGATCTCTTATACTAGTATCCTTAATCATTTT
TATTGCCACAACTAACCTCCTCGGACTCCTGCCTCACTCATTTACACCAACCACCCAACT
ATCTATAAACCTAGCCATGGCCATCCCCTTATGAGCGGGCGCAGTGATTATAGGCTTTCG
CTCTAAGATTAAAAATGCCCTAGCCCACTTCTTACCACAAGGCACACCTACACCCCTTAT
CCCCATACTAGTTATTATCGAAACCATCAGCCTACTCATTCAACCAATAGCCCTGGCCGT
ACGCCTAACCGCTAACATTACTGCAGGCCACCTACTCATGCACCTAATTGGAAGCGCCAC
CCTAGCAATATCAACCATTAACCTTCCCTCTACACTTATCATCTTCACAATTCTAATTCT
ACTGACTATCCTAGAAATCGCTGTCGCCTTAATCCAAGCCTACGTTTTCACACTTCTAGT
AAGCCTCTACCTGCACGACAACACATAATGACCCACCAATCACATGCCTATCATATAGTA
AAACCCAGCCCATGACCCCTAACAGGGGCCCTCTCAGCCCTCCTAATGACCTCCGGCCTA
GCCATGTGATTTCACTTCCACTCCATAACGCTCCTCATACTAGGCCTACTAACCAACACA
CTAACCATATACCAATGGTGGCGCGATGTAACACGAGAAAGCACATACCAAGGCCACCAC
ACACCACCTGTCCAAAAAGGCCTTCGATACGGGATAATCCTATTTATTACCTCAGAAGTT
TTTTTCTTCGCAGGATTTTTCTGAGCCTTTTACCACTCCAGCCTAGCCCCTACCCCCCAA
CTAGGAGGGCACTGGCCCCCAACAGGCATCACCCCGCTAAATCCCCTAGAAGTCCCACTC
CTAAACACATCCGTATTACTCGCATCAGGAGTATCAATCACCTGAGCTCACCATAGTCTA
ATAGAAAACAACCGAAACCAAATAATTCAAGCACTGCTTATTACAATTTTACTGGGTCTC
TATTTTACCCTCCTACAAGCCTCAGAGTACTTCGAGTCTCCCTTCACCATTTCCGACGGC
ATCTACGGCTCAACATTTTTTGTAGCCACAGGCTTCCACGGACTTCACGTCATTATTGGC
TCAACTTTCCTCACTATCTGCTTCATCCGCCAACTAATATTTCACTTTACATCCAAACAT
CACTTTGGCTTCGAAGCCGCCGCCTGATACTGGCATTTTGTAGATGTGGTTTGACTATTT
CTGTATGTCTCCATCTATTGATGAGGGTCTTACTCTTTTAGTATAAATAGTACCGTTAAC
TTCCAATTAACTAGTTTTGACAACATTCAAAAAAGAGTAATAAACTTCGCCTTAATTTTA
ATAATCAACACCCTCCTAGCCTTACTACTAATAATTATTACATTTTGACTACCACAACTC
AACGGCTACATAGAAAAATCCACCCCTTACGAGTGCGGCTTCGACCCTATATCCCCCGCC
CGCGTCCCTTTCTCCATAAAATTCTTCTTAGTAGCTATTACCTTCTTATTATTTGATCTA
GAAATTGCCCTCCTTTTACCCCTACCATGAGCCCTACAAACAACTAACCTGCCACTAATA
GTTATGTCATCCCTCTTATTAATCATCATCCTAGCCCTAAGTCTGGCCTATGAGTGACTA
CAAAAAGGATTAGACTGAGCCGAATTGGTATATAGTTTAAACAAAACGAATGATTTCGAC
TCATTAAATTATGATAATCATATTTACCAAATGCCCCTCATTTACATAAATATTATACTA
GCATTTACCATCTCACTTCTAGGAATACTAGTATATCGCTCACACCTCATATCCTCCCTA
CTATGCCTAGAAGGAATAATACTATCGCTGTTCATTATAGCTACTCTCATAACCCTCAAC
ACCCACTCCCTCTTAGCCAATATTGTGCCTATTGCCATACTAGTCTTTGCCGCCTGCGAA
GCAGCGGTGGGCCTAGCCCTACTAGTCTCAATCTCCAACACATATGGCCTAGACTACGTA
CATAACCTAAACCTACTCCAATGCTAAAACTAATCGTCCCAACAATTATATTACTACCAC
TGACATGACTTTCCAAAAAGCACATAATTTGAATCAACACAACCACCCACAGCCTAATTA
TTAGCATCATCCCCCTACTATTTTTTAACCAAATCAACAACAACCTATTTAGCTGTTCCC
CAACCTTTTCCTCCGACCCCCTAACAACCCCCCTCCTAATACTAACTACCTGACTCCTAC
CCCTCACAATCATGGCAAGCCAACGCCACTTATCCAGCGAACCACTATCACGAAAAAAAC
TCTACCTCTCTATACTAATCTCCCTACAAATCTCCTTAATTATAACATTCACAGCCACAG
AACTAATCATATTTTATATCTTCTTCGAAACCACACTTATCCCCACCTTGGCTATCATCA
CCCGATGAGGCAACCAGCCAGAACGCCTGAACGCAGGCACATACTTCCTATTCTACACCC
TAGTAGGCTCCCTTCCCCTACTCATCGCACTAATTTACACTCACAACACCCTAGGCTCAC
TAAACATTCTACTACTCACTCTCACTGCCCAAGAACTATCAAACTCCTGAGCCAACAACT
TAATATGACTAGCTTACACAATAGCTTTTATAGTAAAGATACCTCTTTACGGACTCCACT
TATGACTCCCTAAAGCCCATGTCGAAGCCCCCATCGCTGGGTCAATAGTACTTGCCGCAG
TACTCTTAAAACTAGGCGGCTATGGTATAATACGCCTCACACTCATTCTCAACCCCCTGA
CAAAACACATAGCCTACCCCTTCCTTGTACTATCCCTATGAGGCATAATTATAACAAGCT
CCATCTGCCTACGACAAACAGACCTAAAATCGCTCATTGCATACTCTTCAATCAGCCACA
TAGCCCTCGTAGTAACAGCCATTCTCATCCAAACCCCCTGAAGCTTCACCGGCGCAGTCA
TTCTCATAATCGCCCACGGACTCACATCCTCATTACTATTCTGCCTAGCAAACTCAAACT
ACGAACGCACTCACAGTCGCATCATAATCCTCTCTCAAGGACTTCAAACTCTACTCCCAC
TAATAGCTTTTTGATGACTTCTAGCAAGCCTCGCTAACCTCGCCTTACCCCCCACTATTA
ACCTACTGGGAGAACTCTCTGTGCTAGTAACCACGTTCTCCTGATCAAATATCACTCTCC
TACTTACAGGACTCAACATACTAGTCACAGCCCTATACTCCCTCTACATATTTACCACAA
CACAATGGGGCTCACTCACCCACCACATTAACAACATAAAACCCTCATTCACACGAGAAA
ACACCCTCATGTTCATACACCTATCCCCCATTCTCCTCCTATCCCTCAACCCCGACATCA
TTACCGGGTTTTCCTCTTGTAAATATAGTTTAACCAAAACATCAGATTGTGAATCTGACA
ACAGAGGCTTACGACCCCTTATTTACCGAGAAAGCTCACAAGAACTGCTAACTCATGCCC
CCATGTCTAACAACATGGCTTTCTCAACTTTTAAAGGATAACAGCTATCCATTGGTCTTA
GGCCCCAAAAATTTTGGTGCAACTCCAAATAAAAGTAATAACCATGCACACTACTATAAC
CACCCTAACCCTGACTTCCCTAATTCCCCCCATCCTTACCACCCTCGTTAACCCTAACAA
AAAAAACTCATACCCCCATTATGTAAAATCCATTGTCGCATCCACCTTTATTATCAGTCT
CTTCCCCACAACAATATTCATGTGCCTAGACCAAGAAGTTATTATCTCGAACTGACACTG
AGCCACAACCCAAACAACCCAGCTCTCCCTAAGCTTCAAACTAGACTACTTCTCCATAAT
ATTCATCCCTGTAGCATTGTTCGTTACATGGTCCATCATAGAATTCTCACTGTGATATAT
AAACTCAGACCCAAACATTAATCAGTTCTTCAAATATCTACTCATTTTCCTAATTACCAT
ACTAATCTTAGTTACCGCTAACAACCTATTCCAACTGTTCATCGGCTGAGAGGGCGTAGG
AATTATATCCTTCTTGCTCATCAGTTGATGATACGCCCGAGCAGATGCCAACACAGCAGC
CATTCAAGCAGTCCTATACAACCGTATCGGCGATATCGGTTTCATCCTCGCCTTAGCATG
ATTTATCCTACACTCCAACTCATGAGACCCACAACAAATAGCCCTTCTAAACGCTAATCC
AAGCCTCACCCCACTACTAGGCCTCCTCCTAGCAGCAGCAGGCAAATCAGCCCAATTAGG
TCTCCACCCCTGACTCCCCTCAGCCATAGAAGGCCCCACCCCAGTCTCAGCCCTACTCCA
CTCAAGCACTATAGTTGTAGCAGGAATCTTCTTACTCATCCGCTTCCACCCCCTAGCAGA
AAATAGCCCACTAATCCAAACTCTAACACTATGCTTAGGCGCTATCACCACTCTGTTCGC
AGCAGTCTGCGCCCTTACACAAAATGACATCAAAAAAATCGTAGCCTTCTCCACTTCAAG
TCAACTAGGACTCATAATAGTTACAATCGGCATCAACCAACCACACCTAGCATTCCTGCA
CATCTGTACCCACGCCTTCTTCAAAGCCATACTATTTATGTGCTCCGGGTCCATCATCCA
CAACCTTAACAATGAACAAGATATTCGAAAAATAGGAGGACTACTCAAAACCATACCTCT
CACTTCAACCTCCCTCACCATTGGCAGCCTAGCATTAGCAGGAATACCTTTCCTCACAGG
TTTCTACTCCAAAGACCACATCATCGAAACCGCAAACATATCATACACAAACGCCTGAGC
CCTATCTATTACTCTCATCGCTACCTCCCTGACAAGCGCCTATAGCACTCGAATAATTCT
TCTCACCCTAACAGGTCAACCTCGCTTCCCCACCCTTACTAACATTAACGAAAATAACCC
CACCCTACTAAACCCCATTAAACGCCTGGCAGCCGGAAGCCTATTCGCAGGATTTCTCAT
TACTAACAACATTTCCCCCGCATCCCCCTTCCAAACAACAATCCCCCTCTACCTAAAACT
CACAGCCCTCGCTGTCACTTTCCTAGGACTTCTAACAGCCCTAGACCTCAACTACCTAAC
CAACAAACTTAAAATAAAATCCCCACTATGCACATTTTATTTCTCCAACATACTCGGATT
CTACCCTAGCATCACACACCGCACAATCCCCTATCTAGGCCTTCTTACGAGCCAAAACCT
GCCCCTACTCCTCCTAGACCTAACCTGACTAGAAAAGCTATTACCTAAAACAATTTCACA
GCACCAAATCTCCACCTCCATCATCACCTCAACCCAAAAAGGCATAATTAAACTTTACTT
CCTCTCTTTCTTCTTCCCACTCATCCTAACCCTACTCCTAATCACATAACCTATTCCCCC
GAGCAATCTCAATTACAATATATACACCAACAAACAATGTTCAACCAGTAACCACTACTA
ATCAACGCCCATAATCATACAAAGCCCCCGCACCAATAGGATCCTCCCGAATCAACCCTG
ACCCCTCTCCTTCATAAATTATTCAGCTTCCTACACTATTAAAGTTTACCACAACCACCA
CCCCATCATACTCTTTCACCCACAGCACCAATCCTACCTCCATCGCTAACCCCACTAAAA
CACTCACCAAGACCTCAACCCCTGACCCCCATGCCTCAGGATACTCCTCAATAGCCATCG
CTGTAGTATATCCAAAGACAACCATCATTCCCCCTAAATAAATTAAAAAAACTATTAAAC
CCATATAACCTCCCCCAAAATTCAGAATAATAACACACCCGACCACACCGCTAACAATCA
GTACTAAACCCCCATAAATAGGAGAAGGCTTAGAAGAAAACCCCACAAACCCCATTACTA
AACCCACACTCAACAGAAACAAAGCATACATCATTATTCTCGCACGGACTACAACCACGA
CCAATGATATGAAAAACCATCGTTGTATTTCAACTACAAGAACACCAATGACCCCAATAC
GCAAAATTAACCCCCTAATAAAATTAATTAACCACTCATTCATCGACCTCCCCACCCCAT
CCAACATCTCCGCATGATGAAACTTCGGCTCACTCCTTGGCGCCTGCCTGATCCTCCAAA
TCACCACAGGACTATTCCTAGCCATACACTACTCACCAGACGCCTCAACCGCCTTTTCAT
CAATCGCCCACATCACTCGAGACGTAAATTATGGCTGAATCATCCGCTACCTTCACGCCA
ATGGCGCCTCAATATTCTTTATCTGCCTCTTCCTACACATCGGGCGAGGCCTATATTACG
GATCATTTCTCTACTCAGAAACCTGAAACATCGGCATTATCCTCCTGCTTGCAACTATAG
CAACAGCCTTCATAGGCTATGTCCTCCCGTGAGGCCAAATATCATTCTGAGGGGCCACAG
TAATTACAAACTTACTATCCGCCATCCCATACATTGGGACAGACCTAGTTCAATGAATCT
GAGGAGGCTACTCAGTAGACAGTCCCACCCTCACACGATTCTTTACCTTTCACTTCATCT
TACCCTTCATTATTGCAGCCCTAGCAGCACTCCACCTCCTATTCTTGCACGAAACGGGAT
CAAACAACCCCCTAGGAATCACCTCCCATTCCGATAAAATCACCTTCCACCCTTACTACA
CAATCAAAGACGCCCTCGGCTTACTTCTCTTCCTTCTCTCCTTAATGACATTAACACTAT
TCTCACCAGACCTCCTAGGCGACCCAGACAATTATACCCTAGCCAACCCCTTAAACACCC
CTCCCCACATCAAGCCCGAATGATATTTCCTATTCGCCTACACAATTCTCCGATCCGTCC
CTAACAAACTAGGAGGCGTCCTTGCCCTATTACTATCCATCCTCATCCTAGCAATAATCC
CCATCCTCCATATATCCAAACAACAAAGCATAATATTTCGCCCACTAAGCCAATCACTTT
ATTGACTCCTAGCCGCAGACCTCCTCATTCTAACCTGAATCGGAGGACAACCAGTAAGCT
ACCCTTTTACCATCATTGGACAAGTAGCATCCGTACTATACTTCACAACAATCCTAATCC
TAATACCAACTATCTCCCTAATTGAAAACAAAATACTCAAATGGGCCTGTCCTTGTAGTA
TAAACTAATACACCAGTCTTGTAAACCGGAGACGAAAACCTTTTTCCAAGGACAAATCAG
AGAAAAAGTCTTTAACTCCACCATTAGCACCCAAAGCTAAGATTCTAATTTAAACTATTC
TCTGTTCTTTCATGGGGAAGCAGATTTGGGTACCACCCAAGTATTGACTCACCCATCAAC
AACCGCTATGTATTTCGTACATTACTGCCAGCCACCATGAATATTGTACGGTACCATAAA
TACTTGACCACCTGTAGTACATAAAAACCCAACCCACATCAAACCCCCCCCCCCCATGCT
TACAAGCAAGTACAGCAATCAACCTTCAACTATCACACATCAACTGCAACTCCAAAGCCA
CCCCTCACCCACTAGGATACCAACAAACCTACCCACCCTTAACAGTACATAGTACATAAA
GTCATTTACCGTACATAGCACATTACAGTCAAATCCCTTCTCGTCCCCATGGATGACCCC
CCTCAGATAGGGGTCCCTTGACCACCATCCTCCGTGAAATCAATATCCCGCACAAGAGTG
CTACTCTCCTCGCTCCGGGCCCATAACACTTGGGGGTAGCTAAAGTGAACTGTATCCGAC
ATCTGGTTCCTACTTCAGGGCCATAAAGCCTAAATAGCCCACACGTTCCCCTTAAATAAG
ACATCACGATG
================================================
FILE: depth/test/fake.fa.fai
================================================
HLA-A*01:01:01:01 16571 19 60 61
================================================
FILE: depth/test/hg19.fa
================================================
>chrM
GATCACAGGTCTATCACCCTATTAACCACTCACGGGAGCTCTCCATGCATTTGGTATTTT
CGTCTGGGGGGTGTGCACGCGATAGCATTGCGAGACGCTGGAGCCGGAGCACCCTATGTC
GCAGTATCTGTCTTTGATTCCTGCCTCATTCTATTATTTATCGCACCTACGTTCAATATT
ACAGGCGAACATACCTACTAAAGTGTGTTAATTAATTAATGCTTGTAGGACATAATAATA
ACAATTGAATGTCTGCACAGCCGCTTTCCACACAGACATCATAACAAAAAATTTCCACCA
AACCCCCCCCTCCCCCCGCTTCTGGCCACAGCACTTAAACACATCTCTGCCAAACCCCAA
AAACAAAGAACCCTAACACCAGCCTAACCAGATTTCAAATTTTATCTTTAGGCGGTATGC
ACTTTTAACAGTCACCCCCCAACTAACACATTATTTTCCCCTCCCACTCCCATACTACTA
ATCTCATCAATACAACCCCCGCCCATCCTACCCAGCACACACACACCGCTGCTAACCCCA
TACCCCGAACCAACCAAACCCCAAAGACACCCCCCACAGTTTATGTAGCTTACCTCCTCA
AAGCAATACACTGAAAATGTTTAGACGGGCTCACATCACCCCATAAACAAATAGGTTTGG
TCCTAGCCTTTCTATTAGCTCTTAGTAAGATTACACATGCAAGCATCCCCGTTCCAGTGA
GTTCACCCTCTAAATCACCACGATCAAAAGGGACAAGCATCAAGCACGCAGCAATGCAGC
TCAAAACGCTTAGCCTAGCCACACCCCCACGGGAAACAGCAGTGATTAACCTTTAGCAAT
AAACGAAAGTTTAACTAAGCTATACTAACCCCAGGGTTGGTCAATTTCGTGCCAGCCACC
GCGGTCACACGATTAACCCAAGTCAATAGAAGCCGGCGTAAAGAGTGTTTTAGATCACCC
CCTCCCCAATAAAGCTAAAACTCACCTGAGTTGTAAAAAACTCCAGTTGACACAAAATAG
ACTACGAAAGTGGCTTTAACATATCTGAACACACAATAGCTAAGACCCAAACTGGGATTA
GATACCCCACTATGCTTAGCCCTAAACCTCAACAGTTAAATCAACAAAACTGCTCGCCAG
AACACTACGAGCCACAGCTTAAAACTCAAAGGACCTGGCGGTGCTTCATATCCCTCTAGA
GGAGCCTGTTCTGTAATCGATAAACCCCGATCAACCTCACCACCTCTTGCTCAGCCTATA
TACCGCCATCTTCAGCAAACCCTGATGAAGGCTACAAAGTAAGCGCAAGTACCCACGTAA
AGACGTTAGGTCAAGGTGTAGCCCATGAGGTGGCAAGAAATGGGCTACATTTTCTACCCC
AGAAAACTACGATAGCCCTTATGAAACTTAAGGGTCGAAGGTGGATTTAGCAGTAAACTG
AGAGTAGAGTGCTTAGTTGAACAGGGCCCTGAAGCGCGTACACACCGCCCGTCACCCTCC
TCAAGTATACTTCAAAGGACATTTAACTAAAACCCCTACGCATTTATATAGAGGAGACAA
GTCGTAACATGGTAAGTGTACTGGAAAGTGCACTTGGACGAACCAGAGTGTAGCTTAACA
CAAAGCACCCAACTTACACTTAGGAGATTTCAACTTAACTTGACCGCTCTGAGCTAAACC
TAGCCCCAAACCCACTCCACCTTACTACCAGACAACCTTAGCCAAACCATTTACCCAAAT
AAAGTATAGGCGATAGAAATTGAAACCTGGCGCAATAGATATAGTACCGCAAGGGAAAGA
TGAAAAATTATAACCAAGCATAATATAGCAAGGACTAACCCCTATACCTTCTGCATAATG
AATTAACTAGAAATAACTTTGCAAGGAGAGCCAAAGCTAAGACCCCCGAAACCAGACGAG
CTACCTAAGAACAGCTAAAAGAGCACACCCGTCTATGTAGCAAAATAGTGGGAAGATTTA
TAGGTAGAGGCGACAAACCTACCGAGCCTGGTGATAGCTGGTTGTCCAAGATAGAATCTT
AGTTCAACTTTAAATTTGCCCACAGAACCCTCTAAATCCCCTTGTAAATTTAACTGTTAG
TCCAAAGAGGAACAGCTCTTTGGACACTAGGAAAAAACCTTGTAGAGAGAGTAAAAAATT
TAACACCCATAGTAGGCCTAAAAGCAGCCACCAATTAAGAAAGCGTTCAAGCTCAACACC
CACTACCTAAAAAATCCCAAACATATAACTGAACTCCTCACACCCAATTGGACCAATCTA
TCACCCTATAGAAGAACTAATGTTAGTATAAGTAACATGAAAACATTCTCCTCCGCATAA
GCCTGCGTCAGATCAAAACACTGAACTGACAATTAACAGCCCAATATCTACAATCAACCA
ACAAGTCATTATTACCCTCACTGTCAACCCAACACAGGCATGCTCATAAGGAAAGGTTAA
AAAAAGTAAAAGGAACTCGGCAAACCTTACCCCGCCTGTTTACCAAAAACATCACCTCTA
GCATCACCAGTATTAGAGGCACCGCCTGCCCAGTGACACATGTTTAACGGCCGCGGTACC
CTAACCGTGCAaaggtagcataatcacttgttccttaaatagggacctgtatgaatggct
ccacgagggttcagctgtctcttacttttaaccagtgaaattgacctgcccgtgaagagg
cgggcatgacacagcaagacgagaagaccctatggagctttaatttaTTAATGCAAACAG
TACCTAACAAACCCACAGGTCCTAAACTACCAAACCTGCATTAAAAATTTCGGTTGGGGC
GACCTCGGAGCAGAACCCAACCTCCGAGCAGTACATGCTAAGACTTCACCAGTCAAAGCG
AACTACTATACTCAATTGATCCAATAACTTGACCAACGGAACAAGTTACCCTAGGGATAA
CAGCGCAATCCTATTCTAGAGTCCATATCAACAATAGGGTTTACGACCTCGATGTTGGAT
CAGGACATCCCGATGGTGCAGCCGCTATTAAAGGTTCGTTTGTTCAACGATTAAAGTCCT
ACGTGATCTGAGTTCAGACCGGAGTAATCCAGGTCGGTTTCTATCTACTTCAAATTCCTC
CCTGTACGAAAGGACAAGAGAAATAAGGCCTACTTCACAAAGCGCCTTCCCCCGTAAATG
ATATCATCTCAACTTAGTATTATACCCACACCCACCCAAGAACAGGGTTTgttaagatgg
cagagcccggtaatcgcataaaacttaaaactttacagtcagaggttcaattcctcttct
taacaacaTACCCATGGCCAACCTCCTACTCCTCATTGTACCCATTCTAATCGCAATGGC
ATTCCTAATGCTTACCGAACGAAAAATTCTAGGCTATATACAACTACGCAAAGGCCCCAA
CGTTGTAGGCCCCTACGGGCTACTACAACCCTTCGCTGACGCCATAAAACTCTTCACCAA
AGAGCCCCTAAAACCCGCCACATCTACCATCACCCTCTACATCACCGCCCCGACCTTAGC
TCTCACCATCGCTCTTCTACTATGAACCCCCCTCCCCATACCCAACCCCCTGGTCAACCT
CAACCTAGGCCTCCTATTTATTCTAGCCACCTCTAGCCTAGCCGTTTACTCAATCCTCTG
ATCAGGGTGAGCATCAAACTCAAACTACGCCCTGATCGGCGCACTGCGAGCAGTAGCCCA
AACAATCTCATATGAAGTCACCCTAGCCATCATTCTACTATCAACATTACTAATAAGTGG
CTCCTTTAACCTCTCCACCCTTATCACAACACAAGAACACCTCTGATTACTCCTGCCATC
ATGACCCTTGGCCATAATATGATTTATCTCCACACTAGCAGAGACCAACCGAACCCCCTT
CGACCTTGCCGAAGGGGAGTCCGAACTAGTCTCAGGCTTCAACATCGAATACGCCGCAGG
CCCCTTCGCCCTATTCTTCATAGCCGAATACACAAACATTATTATAATAAACACCCTCAC
CACTACAATCTTCCTAGGAACAACATATGACGCACTCTCCCCTGAACTCTACACAACATA
TTTTGTCACCAAGACCCTACTTCTAACCTCCCTGTTCTTATGAATTCGAACAGCATACCC
CCGATTCCGCTACGACCAACTCATACACCTCCTATGAAAAAACTTCCTACCACTCACCCT
AGCATTACTTATATGATATGTCTCCATACCCATTACAATCTCCAGCATTCCCCCTCAAAC
CTAAGAAATATGTCTGATAAAAGAGTTACTTTGATAGAGTAAATAATAGGAGCTTAAACC
CCCTTATTTctaggactatgagaatcgaacccatccctgagaatccaaaattctccgtgc
cacctatcacaccccatcctaAAGTAAGGTCAGCTAAATAAGCTATCGGGCCCATACCCC
GAAAATGTTGGTTATACCCTTCCCGTACTAATTAATCCCCTGGCCCAACCCGTCATCTAC
TCTACCATCTTTGCAGGCACACTCATCACAGCGCTAAGCTCGCACTGATTTTTTACCTGA
GTAGGCCTAGAAATAAACATGCTAGCTTTTATTCCAGTTCTAACCAAAAAAATAAACCCT
CGTTCCACAGAAGCTGCCATCAAGTATTTCCTCACGCAAGCAACCGCATCCATAATCCTT
CTAATAGCTATCCTCTTCAACAATATACTCTCCGGACAATGAACCATAACCAATACTACC
AATCAATACTCATCATTAATAATCATAATGGCTATAGCAATAAAACTAGGAATAGCCCCC
TTTCACTTCTGAGTCCCAGAGGTTACCCAAGGCACCCCTCTGACATCCGGCCTGCTTCTT
CTCACATGACAAAAACTAGCCCCCATCTCAATCATATACCAAATCTCTCCCTCACTAAAC
GTAAGCCTTCTCCTCACTCTCTCAATCTTATCCATCATAGCAGGCAGTTGAGGTGGATTA
AACCAAACCCAGCTACGCAAAATCTTAGCATACTCCTCAATTACCCACATAGGATGAATA
ATAGCAGTTCTACCGTACAACCCTAACATAACCATTCTTAATTTAACTATTTATATTATC
CTAACTACTACCGCATTCCTACTACTCAACTTAAACTCCAGCACCACGACCCTACTACTA
TCTCGCACCTGAAACAAGCTAACATGACTAACACCCTTAATTCCATCCACCCTCCTCTCC
CTAGGAGGCCTGCCCCCGCTAACCGGCTTTTTGCCCAAATGGGCCATTATCGAAGAATTC
ACAAAAAACAATAGCCTCATCATCCCCACCATCATAGCCACCATCACCCTCCTTAACCTC
TACTTCTACCTACGCCTAATCTACTCCACCTCAATCACACTACTCCCCATATCTAACAAC
GTAAAAATAAAATGACAGTTTGAACATACAAAACCCACCCCATTCCTCCCCACACTCATC
GCCCTTACCACGCTACTCCTACCTATCTCCCCTTTTATACTAATAATCTTATAGAAATTT
AGGTTAAATACAGACCAAGAGCCTTCAAAGCCCTCAGTAAGTTGCAATACTTAATTTCTG
CAACAGCTAAGGACTGCAAAACCCCACTCTGCATCAACTGAACGCAAATCAGCCACTTTA
ATTAAGCTAAGCCCTTACTAGACCAATGGGACTTAAACCCACAAACACTTAGTTAACAGC
TAAGCACCCTAATCAACTGGCTTCAATCTACTTCTCCCGCCGCCGGGAAAAAAGGCGGGA
GAAGCCCCGGCAGGTTTGAAGCTGCTTCTTCGAATTTGCAATTCAATATGAAAATCACCT
CGGAGCTGGTAAAAAGAGGCCTAACCCCTGTCTTTAGATTTACAGTCCAATGCTTCACTC
AGCCATTTTACCTCACCCCCACTGATGTTCGCCGACCGTTGACTATTCTCTACAAACCAC
AAAGACATTGGAACACTATACCTATTATTCGGCGCATGAGCTGGAGTCCTAGGCACAGCT
CTAAGCCTCCTTATTCGAGCCGAGCTGGGCCAGCCAGGCAACCTTCTAGGTAACGACCAC
ATCTACAACGTTATCGTCACAGCCCATGCATTTGTAATAATCTTCTTCATAGTAATACCC
ATCATAATCGGAGGCTTTGGCAACTGACTAGTTCCCCTAATAATCGGTGCCCCCGATATG
GCGTTTCCCCGCATAAACAACATAAGCTTCTGACTCTTACCTCCCTCTCTCCTACTCCTG
CTCGCATCTGCTATAGTGGAGGCCGGAGCAGGAACAGGTTGAACAGTCTACCCTCCCTTA
GCAGGGAACTACTCCCACCCTGGAGCCTCCGTAGACCTAACCATCTTCTCCTTACACCTA
GCAGGTGTCTCCTCTATCTTAGGGGCCATCAATTTCATCACAACAATTATCAATATAAAA
CCCCCTGCCATAACCCAATACCAAACGCCCCTCTTCGTCTGATCCGTCCTAATCACAGCA
GTCCTACTTCTCCTATCTCTCCCAGTCCTAGCTGCTGGCATCACTATACTACTAACAGAC
CGCAACCTCAACACCACCTTCTTCGACCCCGCCGGAGGAGGAGACCCCATTCTATACCAA
CACCTATTCTGATTTTTCGGTCACCCTGAAGTTTATATTCTTATCCTACCAGGCTTCGGA
ATAATCTCCCATATTGTAACTTACTACTCCGGAAAAAAAGAACCATTTGGATACATAGGT
ATGGTCTGAGCTATGATATCAATTGGCTTCCTAGGGTTTATCGTGTGAGCACACCATATA
TTTACAGTAGGAATAGACGTAGACACACGAGCATATTTCACCTCCGCTACCATAATCATC
GCTATCCCCACCGGCGTCAAAGTATTTAGCTGACTCGCCACACTCCACGGAAGCAATATG
AAATGATCTGCTGCAGTGCTCTGAGCCCTAGGATTCATCTTTCTTTTCACCGTAGGTGGC
CTGACTGGCATTGTATTAGCAAACTCATCACTAGACATCGTACTACACGACACGTACTAC
GTTGTAGCTCACTTCCACTATGTCCTATCAATAGGAGCTGTATTTGCCATCATAGGAGGC
TTCATTCACTGATTTCCCCTATTCTCAGGCTACACCCTAGACCAAACCTACGCCAAAATC
CATTTCACTATCATATTCATCGGCGTAAATCTAACTTTCTTCCCACAACACTTTCTCGGC
CTATCCGGAATGCCCCGACGTTACTCGGACTACCCCGATGCATACACCACATGAAACATC
CTATCATCTGTAGGCTCATTCATTTCTCTAACAGCAGTAATATTAATAATTTTCATGATT
TGAGAAGCCTTCGCTTCGAAGCGAAAAGTCCTAATAGTAGAAGAACCCTCCATAAACCTG
GAGTGACTATATGGATGCCCCCCACCCTACCACACATTCGAAGAACCCGTATACATAAAA
TCTAGACAaaaaaggaaggaatcgaaccccccaaagctggtttcaagccaaccccatggc
ctccatgactttttcAAAAAGGTATTAGAAAAACCATTTCATAACTTTGTCAAAGTTAAA
TTATAGGCTAAATCCTATATATCTTAATGGCACATGCAGCGCAAGTAGGTCTACAAGACG
CTACTTCCCCTATCATAGAAGAGCTTATCACCTTTCATGATCACGCCCTCATAATCATTT
TCCTTATCTGCTTCCTAGTCCTGTATGCCCTTTTCCTAACACTCACAACAAAACTAACTA
ATACTAACATCTCAGACGCTCAGGAAATAGAAACCGTCTGAACTATCCTGCCCGCCATCA
TCCTAGTCCTCATCGCCCTCCCATCCCTACGCATCCTTTACATAACAGACGAGGTCAACG
ATCCCTCCCTTACCATCAAATCAATTGGCCACCAATGGTACTGAACCTACGAGTACACCG
ACTACGGCGGACTAATCTTCAACTCCTACATACTTCCCCCATTATTCCTAGAACCAGGCG
ACCTGCGACTCCTTGACGTTGACAATCGAGTAGTACTCCCGATTGAAGCCCCCATTCGTA
TAATAATTACATCACAAGACGTCTTGCACTCATGAGCTGTCCCCACATTAGGCTTAAAAA
CAGATGCAATTCCCGGACGTCTAAACCAAACCACTTTCACCGCTACACGACCGGGGGTAT
ACTACGGTCAATGCTCTGAAATCTGTGGAGCAAACCACAGTTTCATGCCCATCGTCCTAG
AATTAATTCCCCTAAAAATCTTTGAAATAGGGCCCGTATTTACCCTATAGCACCCCCTCT
ACCCCCTCTAGAGCCCACTGTAAAGCTAACTTAGCATTAACCTTTTAAGTTAAAGATTAA
GAGAACCAACACCTCTTTACAGTGAAATGCCCCAACTAAATACTACCGTATGGCCCACCA
TAATTACCCCCATACTCCTTACACTATTCCTCATCACCCAACTAAAAATATTAAACACAA
ACTACCACCTACCTCCCTCACCAAAGCCCATAAAAATAAAAAATTATAACAAACCCTGAG
AACCAAAATGAACGAAAATCTGTTCGCTTCATTCATTGCCCCCACAATCCTAGGCCTACC
CGCCGCAGTACTGATCATTCTATTTCCCCCTCTATTGATCCCCACCTCCAAATATCTCAT
CAACAACCGACTAATCACCACCCAACAATGACTAATCAAACTAACCTCAAAACAAATGAT
AGCCATACACAACACTAAAGGACGAACCTGATCTCTTATACTAGTATCCTTAATCATTTT
TATTGCCACAACTAACCTCCTCGGACTCCTGCCTCACTCATTTACACCAACCACCCAACT
ATCTATAAACCTAGCCATGGCCATCCCCTTATGAGCGGGCGCAGTGATTATAGGCTTTCG
CTCTAAGATTAAAAATGCCCTAGCCCACTTCTTACCACAAGGCACACCTACACCCCTTAT
CCCCATACTAGTTATTATCGAAACCATCAGCCTACTCATTCAACCAATAGCCCTGGCCGT
ACGCCTAACCGCTAACATTACTGCAGGCCACCTACTCATGCACCTAATTGGAAGCGCCAC
CCTAGCAATATCAACCATTAACCTTCCCTCTACACTTATCATCTTCACAATTCTAATTCT
ACTGACTATCCTAGAAATCGCTGTCGCCTTAATCCAAGCCTACGTTTTCACACTTCTAGT
AAGCCTCTACCTGCACGACAACACATAATGACCCACCAATCACATGCCTATCATATAGTA
AAACCCAGCCCATGACCCCTAACAGGGGCCCTCTCAGCCCTCCTAATGACCTCCGGCCTA
GCCATGTGATTTCACTTCCACTCCATAACGCTCCTCATACTAGGCCTACTAACCAACACA
CTAACCATATACCAATGGTGGCGCGATGTAACACGAGAAAGCACATACCAAGGCCACCAC
ACACCACCTGTCCAAAAAGGCCTTCGATACGGGATAATCCTATTTATTACCTCAGAAGTT
TTTTTCTTCGCAGGATTTTTCTGAGCCTTTTACCACTCCAGCCTAGCCCCTACCCCCCAA
CTAGGAGGGCACTGGCCCCCAACAGGCATCACCCCGCTAAATCCCCTAGAAGTCCCACTC
CTAAACACATCCGTATTACTCGCATCAGGAGTATCAATCACCTGAGCTCACCATAGTCTA
ATAGAAAACAACCGAAACCAAATAATTCAAGCACTGCTTATTACAATTTTACTGGGTCTC
TATTTTACCCTCCTACAAGCCTCAGAGTACTTCGAGTCTCCCTTCACCATTTCCGACGGC
ATCTACGGCTCAACATTTTTTGTAGCCACAGGCTTCCACGGACTTCACGTCATTATTGGC
TCAACTTTCCTCACTATCTGCTTCATCCGCCAACTAATATTTCACTTTACATCCAAACAT
CACTTTGGCTTCGAAGCCGCCGCCTGATACTGGCATTTTGTAGATGTGGTTTGACTATTT
CTGTATGTCTCCATCTATTGATGAGGGTCTTACTCTTTTAGTATAAATAGTACCGTTAAC
TTCCAATTAACTAGTTTTGACAACATTCAAAAAAGAGTAATAAACTTCGCCTTAATTTTA
ATAATCAACACCCTCCTAGCCTTACTACTAATAATTATTACATTTTGACTACCACAACTC
AACGGCTACATAGAAAAATCCACCCCTTACGAGTGCGGCTTCGACCCTATATCCCCCGCC
CGCGTCCCTTTCTCCATAAAATTCTTCTTAGTAGCTATTACCTTCTTATTATTTGATCTA
GAAATTGCCCTCCTTTTACCCCTACCATGAGCCCTACAAACAACTAACCTGCCACTAATA
GTTATGTCATCCCTCTTATTAATCATCATCCTAGCCCTAAGTCTGGCCTATGAGTGACTA
CAAAAAGGATTAGACTGAGCCGAATTGGTATATAGTTTAAACAAAACGAATGATTTCGAC
TCATTAAATTATGATAATCATATTTACCAAATGCCCCTCATTTACATAAATATTATACTA
GCATTTACCATCTCACTTCTAGGAATACTAGTATATCGCTCACACCTCATATCCTCCCTA
CTATGCCTAGAAGGAATAATACTATCGCTGTTCATTATAGCTACTCTCATAACCCTCAAC
ACCCACTCCCTCTTAGCCAATATTGTGCCTATTGCCATACTAGTCTTTGCCGCCTGCGAA
GCAGCGGTGGGCCTAGCCCTACTAGTCTCAATCTCCAACACATATGGCCTAGACTACGTA
CATAACCTAAACCTACTCCAATGCTAAAACTAATCGTCCCAACAATTATATTACTACCAC
TGACATGACTTTCCAAAAAGCACATAATTTGAATCAACACAACCACCCACAGCCTAATTA
TTAGCATCATCCCCCTACTATTTTTTAACCAAATCAACAACAACCTATTTAGCTGTTCCC
CAACCTTTTCCTCCGACCCCCTAACAACCCCCCTCCTAATACTAACTACCTGACTCCTAC
CCCTCACAATCATGGCAAGCCAACGCCACTTATCCAGCGAACCACTATCACGAAAAAAAC
TCTACCTCTCTATACTAATCTCCCTACAAATCTCCTTAATTATAACATTCACAGCCACAG
AACTAATCATATTTTATATCTTCTTCGAAACCACACTTATCCCCACCTTGGCTATCATCA
CCCGATGAGGCAACCAGCCAGAACGCCTGAACGCAGGCACATACTTCCTATTCTACACCC
TAGTAGGCTCCCTTCCCCTACTCATCGCACTAATTTACACTCACAACACCCTAGGCTCAC
TAAACATTCTACTACTCACTCTCACTGCCCAAGAACTATCAAACTCCTGAGCCAACAACT
TAATATGACTAGCTTACACAATAGCTTTTATAGTAAAGATACCTCTTTACGGACTCCACT
TATGACTCCCTAAAGCCCATGTCGAAGCCCCCATCGCTGGGTCAATAGTACTTGCCGCAG
TACTCTTAAAACTAGGCGGCTATGGTATAATACGCCTCACACTCATTCTCAACCCCCTGA
CAAAACACATAGCCTACCCCTTCCTTGTACTATCCCTATGAGGCATAATTATAACAAGCT
CCATCTGCCTACGACAAACAGACCTAAAATCGCTCATTGCATACTCTTCAATCAGCCACA
TAGCCCTCGTAGTAACAGCCATTCTCATCCAAACCCCCTGAAGCTTCACCGGCGCAGTCA
TTCTCATAATCGCCCACGGACTCACATCCTCATTACTATTCTGCCTAGCAAACTCAAACT
ACGAACGCACTCACAGTCGCATCATAATCCTCTCTCAAGGACTTCAAACTCTACTCCCAC
TAATAGCTTTTTGATGACTTCTAGCAAGCCTCGCTAACCTCGCCTTACCCCCCACTATTA
ACCTACTGGGAGAACTCTCTGTGCTAGTAACCACGTTCTCCTGATCAAATATCACTCTCC
TACTTACAGGACTCAACATACTAGTCACAGCCCTATACTCCCTCTACATATTTACCACAA
CACAATGGGGCTCACTCACCCACCACATTAACAACATAAAACCCTCATTCACACGAGAAA
ACACCCTCATGTTCATACACCTATCCCCCATTCTCCTCCTATCCCTCAACCCCGACATCA
TTACCGGGTTTTCCTCTTGTAAATATAGTTTAACCAAAACATCAGATTGTGAATCTGACA
ACAGAGGCTTACGACCCCTTATTTACCGAGAAAGCTCACAAGAACTGCTAACTCATGCCC
CCATGTCTAACAACATGGCTTTCTCAACTTTTAAAGGATAACAGCTATCCATTGGTCTTA
GGCCCCAAAAATTTTGGTGCAACTCCAAATAAAAGTAATAACCATGCACACTACTATAAC
CACCCTAACCCTGACTTCCCTAATTCCCCCCATCCTTACCACCCTCGTTAACCCTAACAA
AAAAAACTCATACCCCCATTATGTAAAATCCATTGTCGCATCCACCTTTATTATCAGTCT
CTTCCCCACAACAATATTCATGTGCCTAGACCAAGAAGTTATTATCTCGAACTGACACTG
AGCCACAACCCAAACAACCCAGCTCTCCCTAAGCTTCAAACTAGACTACTTCTCCATAAT
ATTCATCCCTGTAGCATTGTTCGTTACATGGTCCATCATAGAATTCTCACTGTGATATAT
AAACTCAGACCCAAACATTAATCAGTTCTTCAAATATCTACTCATTTTCCTAATTACCAT
ACTAATCTTAGTTACCGCTAACAACCTATTCCAACTGTTCATCGGCTGAGAGGGCGTAGG
AATTATATCCTTCTTGCTCATCAGTTGATGATACGCCCGAGCAGATGCCAACACAGCAGC
CATTCAAGCAGTCCTATACAACCGTATCGGCGATATCGGTTTCATCCTCGCCTTAGCATG
ATTTATCCTACACTCCAACTCATGAGACCCACAACAAATAGCCCTTCTAAACGCTAATCC
AAGCCTCACCCCACTACTAGGCCTCCTCCTAGCAGCAGCAGGCAAATCAGCCCAATTAGG
TCTCCACCCCTGACTCCCCTCAGCCATAGAAGGCCCCACCCCAGTCTCAGCCCTACTCCA
CTCAAGCACTATAGTTGTAGCAGGAATCTTCTTACTCATCCGCTTCCACCCCCTAGCAGA
AAATAGCCCACTAATCCAAACTCTAACACTATGCTTAGGCGCTATCACCACTCTGTTCGC
AGCAGTCTGCGCCCTTACACAAAATGACATCAAAAAAATCGTAGCCTTCTCCACTTCAAG
TCAACTAGGACTCATAATAGTTACAATCGGCATCAACCAACCACACCTAGCATTCCTGCA
CATCTGTACCCACGCCTTCTTCAAAGCCATACTATTTATGTGCTCCGGGTCCATCATCCA
CAACCTTAACAATGAACAAGATATTCGAAAAATAGGAGGACTACTCAAAACCATACCTCT
CACTTCAACCTCCCTCACCATTGGCAGCCTAGCATTAGCAGGAATACCTTTCCTCACAGG
TTTCTACTCCAAAGACCACATCATCGAAACCGCAAACATATCATACACAAACGCCTGAGC
CCTATCTATTACTCTCATCGCTACCTCCCTGACAAGCGCCTATAGCACTCGAATAATTCT
TCTCACCCTAACAGGTCAACCTCGCTTCCCCACCCTTACTAACATTAACGAAAATAACCC
CACCCTACTAAACCCCATTAAACGCCTGGCAGCCGGAAGCCTATTCGCAGGATTTCTCAT
TACTAACAACATTTCCCCCGCATCCCCCTTCCAAACAACAATCCCCCTCTACCTAAAACT
CACAGCCCTCGCTGTCACTTTCCTAGGACTTCTAACAGCCCTAGACCTCAACTACCTAAC
CAACAAACTTAAAATAAAATCCCCACTATGCACATTTTATTTCTCCAACATACTCGGATT
CTACCCTAGCATCACACACCGCACAATCCCCTATCTAGGCCTTCTTACGAGCCAAAACCT
GCCCCTACTCCTCCTAGACCTAACCTGACTAGAAAAGCTATTACCTAAAACAATTTCACA
GCACCAAATCTCCACCTCCATCATCACCTCAACCCAAAAAGGCATAATTAAACTTTACTT
CCTCTCTTTCTTCTTCCCACTCATCCTAACCCTACTCCTAATCACATAACCTATTCCCCC
GAGCAATCTCAATTACAATATATACACCAACAAACAATGTTCAACCAGTAACCACTACTA
ATCAACGCCCATAATCATACAAAGCCCCCGCACCAATAGGATCCTCCCGAATCAACCCTG
ACCCCTCTCCTTCATAAATTATTCAGCTTCCTACACTATTAAAGTTTACCACAACCACCA
CCCCATCATACTCTTTCACCCACAGCACCAATCCTACCTCCATCGCTAACCCCACTAAAA
CACTCACCAAGACCTCAACCCCTGACCCCCATGCCTCAGGATACTCCTCAATAGCCATCG
CTGTAGTATATCCAAAGACAACCATCATTCCCCCTAAATAAATTAAAAAAACTATTAAAC
CCATATAACCTCCCCCAAAATTCAGAATAATAACACACCCGACCACACCGCTAACAATCA
GTACTAAACCCCCATAAATAGGAGAAGGCTTAGAAGAAAACCCCACAAACCCCATTACTA
AACCCACACTCAACAGAAACAAAGCATACATCATTATTCTCGCACGGACTACAACCACGA
CCAATGATATGAAAAACCATCGTTGTATTTCAACTACAAGAACACCAATGACCCCAATAC
GCAAAATTAACCCCCTAATAAAATTAATTAACCACTCATTCATCGACCTCCCCACCCCAT
CCAACATCTCCGCATGATGAAACTTCGGCTCACTCCTTGGCGCCTGCCTGATCCTCCAAA
TCACCACAGGACTATTCCTAGCCATACACTACTCACCAGACGCCTCAACCGCCTTTTCAT
CAATCGCCCACATCACTCGAGACGTAAATTATGGCTGAATCATCCGCTACCTTCACGCCA
ATGGCGCCTCAATATTCTTTATCTGCCTCTTCCTACACATCGGGCGAGGCCTATATTACG
GATCATTTCTCTACTCAGAAACCTGAAACATCGGCATTATCCTCCTGCTTGCAACTATAG
CAACAGCCTTCATAGGCTATGTCCTCCCGTGAGGCCAAATATCATTCTGAGGGGCCACAG
TAATTACAAACTTACTATCCGCCATCCCATACATTGGGACAGACCTAGTTCAATGAATCT
GAGGAGGCTACTCAGTAGACAGTCCCACCCTCACACGATTCTTTACCTTTCACTTCATCT
TACCCTTCATTATTGCAGCCCTAGCAGCACTCCACCTCCTATTCTTGCACGAAACGGGAT
CAAACAACCCCCTAGGAATCACCTCCCATTCCGATAAAATCACCTTCCACCCTTACTACA
CAATCAAAGACGCCCTCGGCTTACTTCTCTTCCTTCTCTCCTTAATGACATTAACACTAT
TCTCACCAGACCTCCTAGGCGACCCAGACAATTATACCCTAGCCAACCCCTTAAACACCC
CTCCCCACATCAAGCCCGAATGATATTTCCTATTCGCCTACACAATTCTCCGATCCGTCC
CTAACAAACTAGGAGGCGTCCTTGCCCTATTACTATCCATCCTCATCCTAGCAATAATCC
CCATCCTCCATATATCCAAACAACAAAGCATAATATTTCGCCCACTAAGCCAATCACTTT
ATTGACTCCTAGCCGCAGACCTCCTCATTCTAACCTGAATCGGAGGACAACCAGTAAGCT
ACCCTTTTACCATCATTGGACAAGTAGCATCCGTACTATACTTCACAACAATCCTAATCC
TAATACCAACTATCTCCCTAATTGAAAACAAAATACTCAAATGGGCCTGTCCTTGTAGTA
TAAACTAATACACCAGTCTTGTAAACCGGAGACGAAAACCTTTTTCCAAGGACAAATCAG
AGAAAAAGTCTTTAACTCCACCATTAGCACCCAAAGCTAAGATTCTAATTTAAACTATTC
TCTGTTCTTTCATGGGGAAGCAGATTTGGGTACCACCCAAGTATTGACTCACCCATCAAC
AACCGCTATGTATTTCGTACATTACTGCCAGCCACCATGAATATTGTACGGTACCATAAA
TACTTGACCACCTGTAGTACATAAAAACCCAACCCACATCAAACCCCCCCCCCCCATGCT
TACAAGCAAGTACAGCAATCAACCTTCAACTATCACACATCAACTGCAACTCCAAAGCCA
CCCCTCACCCACTAGGATACCAACAAACCTACCCACCCTTAACAGTACATAGTACATAAA
GTCATTTACCGTACATAGCACATTACAGTCAAATCCCTTCTCGTCCCCATGGATGACCCC
CCTCAGATAGGGGTCCCTTGACCACCATCCTCCGTGAAATCAATATCCCGCACAAGAGTG
CTACTCTCCTCGCTCCGGGCCCATAACACTTGGGGGTAGCTAAAGTGAACTGTATCCGAC
ATCTGGTTCCTACTTCAGGGCCATAAAGCCTAAATAGCCCACACGTTCCCCTTAAATAAG
ACATCACGATG
>chr22
gTATTTTCTccctggataatgaaataatctttaaatggcctgttaaattatgcttcaaaa
tgacattgcgagaaatagtgccctccttttgccgtatttccaagttctagggtaattttt
cctAACTCTTGTTTCAGGGAAGTCATTTGTTCTGCTGGCTCCACAGACTGACTCCCATGG
GCACCCCCACGCTGCCCTTTTGACTTGAAGCATTCTGTATTGCTTAGCGATTCTTTCCTG
TCTGCTCATATTTATAAATAAAGACGATGAGGCTCTAAGCTGAGCAGGGTGAAGAGCTGC
CTAGCTTCAGCATTGTGGTGAGCTCTCAGTTTGACATTTTCTCTTGGTCCTCGAGATGGG
GGCTGGATGAGGCGAGGTCTGCAGGCCAGCATCCTTGGGAGATCAGGGagggctgggcat
ggggctgacatgcgatgtgtgcggtcacacagggccccacgcttgggtccatactctgct
gtcactattttgaaattcttaatcatttatgaacaaggggccctgcatcttcagtttgca
ccaagtcccacaatgatgtaggtggtcctgGCTGAGGGATAGATGCAAAGGAGACttttt
tttgaggcagtttcattctgtcacccaggctggagtgcagtggtgcgatcacagcttact
gcagcctcgccctccctggactcaggtgatcctcccacttcagcctcccaagtagctggg
actacaggcacatgccccatgcccggctaattttttttttttttactttttaattttttt
gtagagacaagctctcactatgtgacctcctgggttcaagtgatcctcccaccttggcct
cttgaagcgctgggatacaggtgtgagccaccacgctcagcTGACTTTTTTGCTGGAGTC
Atgagcactctcactgcccagctatgtgctggatttgggaactcaggtgaacaggaccac
cccgTGCTCAAGGTCGTTCCCATCCTTTGTGCCCAGGGGTGGCGTGGGTGGAGAGGACAG
GATGGGGAGTCACAACCCTGGCTCCAGAGCCCAGCCCTCCGGTCCCCCTCCCACCCAAGA
CCCATCCCCAGAGCTGCCCACCCACCCCCCAAATCCCACCCAGGCCTGGTGCTATAAATG
TTCTGTTCCCCGAGTAACCGGCCTATTTGCTCCCTTCCTCTACCTCCCCTTCCCCAAATT
AATTACTAGCTCTTTCTTCAAGCTGTGGAGGCAGAcatagcacctccgagttagaaggtt
ccttagaggtcacggccttcatctccacatctggtgtaaccctcatggcaggtgtgtctg
agactggggcctgcctctgttcccaggctgcccctgcagggagcacagtgcctcaccagg
cggctggtctcaaactaggacatccaaatgcactagaaagctctttctttcacggagctg
aaactgatcttcctgtggctcccaccGGATGGTACcattcattcattcattcattcattc
aCTAaatcgacctttattgagcatctactacatgccaggccttgtgcagagcagtggggg
catgaagatgaacaagacaggccctttgtgatttcacgtaactttcagtttggaaaacag
aaataaaacacatcaccacaactaaagtctaaattgggatccatgctgttgtcaggaagc
atagagagccatcaggtcatggaatggggtcctgcttttgattggggggtgtcactgtat
gtcacactgagggacagacctggggtaggtaagagctggccaggcagagagctgggggaa
agggagtttcaggcagcggggaagcatgcaggaggcctgagggggtgcatgaggaaggga
aaggtgagtgacaggggatgctggagcccagggtttctggggggtgggtgctaagacatg
aggccagagaagggcaagggcttcattgcacAGGCAAGGTCCAGAGGCTGCAGGGATGGT
ATCACTGACAAACTcatagccgtccttcagaagttggggggtggttcctgtcctcctcaa
gtctccccttccagatgaaatgtccccagccttcccaccatttgtcaaaggacagcgttc
atcccttatctgctggactcgcttcaggctgtctctgtccctggcaggagaacgggatcc
caccctcccaatgatggcttatggggtagagagaatgggctgccctcgcctcagtgaagt
gtgggattgcggtggcctggggagtggccatgctcccttttgccgtcaggtcatgttcac
tctccaaaccaggtctctcccaccctggaactaaaagttggtgatttttaaaacccacgt
gaaaaactttgcacttactgctgttgagttcatctCACCGTGGCCTCTTGGAGTCCTGAG
GCAGCCGCTCATTCCATGCACTTCCTGCACTCGcacagctcaggatagtgagtcctgtgg
caccgcactagactcttccagtgtgtgacaaagaccccgtcatcatctctatttgtgttt
ggttgaacccaactcttttatttattattcttttttgagacagggtctctttctgttgcc
caggctggagtgcagtggcgccatctcggctcactacaacctcagcttcctaggttcaag
caattctcatgcctcagcctcccgagtagctgggattacaggcatgcgccgccatgccgg
ctaagttttgtatttttagtagagacggggtttcaccatgttggccagattggtcttgaa
ctcctgacctcaagtgatccaccctcctcggcctcccgaagtgctgggattacaggcatg
agtcactatgtctggccaatcccaactctttgtcttatcatttaagctacacttttctgc
ctctgtccattaggaggtcatgaactattcaatcacattcttgctgaacttgagacgttc
tttatctgtgtatctcccttggtgcatcatgctggtaattctatcTCCTCCCCCAACCAG
AAACAAAATGGCCATTGCCACCTGtggggaggggcctgggcacttctgttaaaagttccc
caagaattctgatgtCTGGTCTCTGGGGGTGAGCCAGGGGTGGAGGGTGAGGCTACTGGG
ATCTCTCCAGAATGAGGTTTGCCAAGGACATGGCTGATGTGGGCCCTGTCTTGGATGAGT
ACAGAGAACAGGAGGCGCCTTACATCTGAAAGACTTCGCAAGCTTCTGACTGTGTGGAGA
ATGGAACAGCTGAGGGCAGGGTGTGCATAGATCAGGAATGCGAACTGCCCCACTCCCCAA
ACACATGCACATCCTTTCACCCCTTCTcaatgttcctccaacgtcagggagcagcaggat
cactggggcatgtgtttaaaagcagatttctggccttagctcagggatccactgccagca
ggcaggcagagcttagaaatctgcattgtaaccaaacgcccaggtggccctgatgtggtc
tgtgggccactggtggagaaATTACAGCTCATTCGACTGTCACAGCAGCCTCTAATCAGG
AGGACTGAAAGGTACAGGTCATGATTCCCAGTCTGGGAACCGCAGGAAGGGGAAGAGAGA
TAGGGAGGGCTCCATCTCTGCATCTGTGTCCAGGATTTGAATAATTTTCATGACAGGTAG
AAGTACTTTGTGAACAGAACAGTGGGAACTCTATGTAAGAAGTTCTGTGATTggccaggc
actgtggctcatgcctataatcccagcactttgggaggctgaggcaggcagatcacctga
ggtcaggagtttgagaccagcctggcaaacatgatgaaaccccatgtctactaaaaatac
aaaaattagtccgggtgcggtggctcacacctgtaatcccagcactttggggtgccaagg
cgggggggggtcacctgaggtcaggagttcgagaccaacatggtgaaaccctgtctctac
taaaaatacaaaaaaattagctgggcgtggtggcagacacctgtaatcccagcgggaggc
tgaggcaggagaactgcttgaacccaggaggcggaggttgccatgagcccagatcgtgcc
actgcactccagcctgggcaatgagagtgaaactccatctccaaaaaaaaaaaaaaaaaa
aaaatacaaatacaaattcaaaaattagccaggcgcagtggcgcacacctgtagtcccag
ctgtttgggcggcaggagaatagcttgaaccgggtggtagagaggttgcagtgagccaag
attgcactcctacactccagcctgggagacagagtctcagtctctaaaaaagaaCTTCTG
TGATCACCCAGTCCAGTGGTGTGTGTCAATTGttccagctactcaggaggctgaggtggg
aggatatcttgagcccaggagttagagatcggtctgggcaacatagcgagagcccatttc
tttaaaacattttttaaaaaagaaTTTCTATGATCATTAATAGTATTAATAAAGTAATAT
TAGTAACTTAGCACCTTGGCtagagggtgagaaggagaggctgggttaggacttgtatcc
tgggctgagtgcagtggctcttgcctgtaatcccagcactttggcaggccgaggtggatg
gatcgcttgagctcagaaggttgagaccagcctgggcaacatggtgaaaccacagctaaa
aaaaaaaaaaatgtgtgtgtctgtagtcccagctactcaggaggctgaggtgggaggatt
gcttgaggctgggaggcggaggttgcagtgagccaagattgcgccactacactgcagcct
gggtgacagagtgagatcctgtctcaaaaaaaaagaaaagagaaaaaaaaaatttattgt
accctggaaacatggtctctggaatgctgggaacagcttctccaccctgactcttacagA
CTCTTGGGAAACAAAAAGCCACTAAGAATTGTTCCTCAGCTCTGGGCTAGGGCTTTCTAG
AAAGATCAGGCAGGTATGTCCCTGCTGAGGTTGCTGGCTGAGAGTTCCTTTTTTCCAAAG
TGCCCCATCAGTGGGACTTCAAAAGGCAAAGGTAATTTAATTCTCTGATGCCTCCAGGAG
TGTGATAAGAATAAGgacgctgactgctgagtgctcacaccgtgcatcatcctgttgaat
ggtcagacaagccctgtgagggctgtggtcagttccacctcacagatgaggcagtgacag
gagtaacttgcctgaggtcacaggctggtaaggggcagagtcaggagttgaacccaggga
gcttagctccaCCAGCTCCACCAGGATTGGGTCCTGGTTCAGTGTGACTGCTGGGtgtat
ttgtcagggatgcatttggctgcaagtaatagaaaacccaaccaactgtggctcaggcaa
atcctgaatccgtgtttttctgacataacacaaagttcTGGTTACTGGTGATAGTTCTGC
AGTGTGGGGGCTGACATCCTTGTGATTTTCCAGGCCTTTCTTTCATGGTCACAAGGCAGC
CGGTGAAGCCGTGGGTGTCATGTCTGAATTAAAGACAGGAAAGAAGGGTGAAGAGTGACA
GGGCATGTCCACTTGGATCAGGAAAATGAGATTTTCTTTCCGGGATCCTTCCCTTCCCTA
GTGCATTTGGCCAGAACTGGGTCTGATGGACACCTGAGTGGCAGCAAGGCTAGGAAAGCA
GAAAGCATCATTGAACTTGGCTAAATCAAACAAGAGTTGTTCCTTGGGTTCAGGCAAGAT
CACAAGAGAGAGAACGCCCATCATGGGGGCACTCCGAGTCAGCCACATTCCTCTCCTTGA
GCCTCAGTTTCTTCACCCACCCTCTGCCAAAGCCGTGGCTCTACCATGTCTCCAAGCCCT
GGTTAGAGCTTCTGGAGCTCTGCCTGTGCTGACTGGGCAGGGGCAGGGCTCTGTTGAGAT
CTCTAACGTCAATACCAACCTAGGCAAGCTCCACAGAGCCCAGTGCCTGTCAGCAGATCC
TGCTGTGGTCATGGGAATCAGAAGGCAATCACTTGGATGCCCAGAAGCCTTTGGAGCTGG
CCTTCCTGCACAACTCTGTGTGCACTATTGGTGGGTAAGGGAAGCCCTCCGAATGTCTTG
AAGCCCAGGGGACCCTTCTGGTTTTGTCATTGACTTTACACTCTGATCTATCCTGGACTT
ACAGGTCTGTCTGCCCTGCGGCTGTGGATGCTCAGATGCactgggtgctctgagggcagg
accaaggctagtcatcatcctgaagtccccagagccgtggaggcatcattacatgtttgt
tTCCTGTCTGTTGCACCCAGGCACGAAAGAGCTGGGGAGAGGATATCTGGAGCCATTTTC
TTTAAGCTGAGCTGCCGTTGGGTGGGCGTGGACTGGGGAAGGTTCCAATAGGAACCTTAG
TGTGTTTTTCTCATTTGCATATGGGATGGGATGGGAGAGAGGGTGATGGTCACTGTGGAG
GCTCGTTTCCATGGAAACAGGATGGTAGCTGCCATGTGTGATGTTGGGGGAAGTCACCAG
AGATTCTCTGGCCACAGGCTGAGGTGCCTGACACGGGTCAATCATGAATCGGGAaggact
atctctgttacgtgggacagaaaccctgaatctggtttaagggagtcaactgtttcctct
actgaaaagccaagaggtctccagcttcagggcccgcttgctctagaatcctgaaagatg
tctctagatggtgtgtgctcctatcccacagctctgctagtctgtgctgacttccctccc
tggagctttcacggtggcagggtggtggcaggcagctcggggctcagtgccgactccctc
cagttcagacacacctttcctttcctagcagttccaatcagtcctgggaactgagcctct
ttggcctggattggctggtgtggggcatgtgctcatccctaagccaatcactgagggtag
ggtgggcagagctcctataggccagacggaggtgaaggctcacccctggcaggatgtgtc
agctgtgcccctatcacgtggctgagggtggggAGGCTGGTCAGGGAGGCTGGAAAGGGA
TGCTGGACAGGGAGGATCCCAGGCCAGGCCTTGTTACTCCTGGAGTTCACAAGGGCGCCC
TGGCTGGTGGAAACCAAGCCGTTTAGGTGGCCTACCATGAACTATCATTAACTGactgag
ttgggcttttttacacccatgatggtgttacatcctgacaatccccagaaattagtattg
ttaacaccattttgcagatgagaaaatggagtgtcagagagattggtagcctgcctcagg
acacactcagcctttatggatcagatctgggattgctcaggtctggctgcccccagggct
cgtgctcACCCATGACATGAAGGGGTTGTACATTTCCAGAGGCTGAAATATAAGCCGTTG
ATTTGCCTCACTAGCCCTCAGAAAGCAGTGAGGTGAGTCCCCTGAGAGGAACATTTCCCC
CAGGCTCTGGTTAGAGCCAAAAGCATCTCTGCACCACACAGAGCCCACTCTCTGGTTCCC
AGCAGCCATTCTCACCTGCCGTGCTGCCAAGACTACTCTGGAGTAATGGAGCTAAGTTTC
ACGGGAGGCAGACATcatgaggcatacactaaaattattcattgtttatctgaagctcag
atttaactgggaagcttctatttatctggcaactctaCCCAGAAATAAACCACTGGAGTA
AAGTAACCCAAATGGAGGCTTGGAGAGAGAAGGTCCAGGTCTTCTGCCACTGAGGTTCCC
AGAGCTGCCCTGGTTCCCACCTGCCTGGGTTCTGTCTTTGCAGCCCATCCCTCAGCTTTG
TGGCCAACCCAGCATTCTTCCCCCAAATCCCCCCTGTACTCTGAGCTTGGCctgagttgg
tttcagagcgtcagtcaactgggcttaataacctctgttctttggcctcataggtttgtg
tgaggaactgcgagtgttgctgttgtttgaatgtgtctcccatagttcatgtgttggcaa
cctaatgccaagtgcaacagagttgagaggtgggacctttaagaagtgaccaggtcatga
ggactcagccctcgtggatggattaatgccattattgtgggagtgggatggttatcgtgg
gagtgggttcctgatgagagggatgagtttggccccttccctgtctcacacacactttct
tgcccttctgccacgtgatgacacagcaagaaagtcctcgccagatgcagctccttgatg
ttggacttcccagcctccagaatcgtaaaccaaattaatttcttttttaaaaataaatca
tccagtctttctgcttctgttatagcagcagaaaatggactaagacaGGtatcttagtct
gtttggggtgctctaacaaaataccataaaccgggtgcctcataaacaacagaaatctag
ttctcacagttctggaggttgggaagtccaagatcaaggtgctggcagattcaatgtctg
gtgggggccacttcctcatagatgagtcttctcattgagtcctcacttgagtcctcacgt
gaaggggcagatgagtttccctttgcctgttttaaaaaggtgctaatctcattcttgagg
gccctgccttcatgatctaatcacctccccaaaggccctaataccatcaccttgggggat
agaatttcaatgtatgaattttaagtggatataaatattcagaccatagcaatgggtgaa
atgacccataaatcatgaggtgctggccacagtcaagggttaatgtcattACTCCCAAAT
CCTCTCTATTATTTccttcctccttctctccctccttccctccatccctccACAGAACAC
CTACTGTGTGCTAGGTCCCCGGATATTGGCAATGGCTGGTGGTCTAGTTACCAACCAACA
CAAGCCTGAGTCATCACAGAGCTGCCTCCTGACAGATGATCTGTGATTTCCAGCATCTCA
GCTTCCCTTCCATTAGCTACATCTTAAATCACATTTTAAGAAAGCCCCCGTGGGCCCCTT
GTGAAGATTGAGGAAACACCCTATTTTTATCAGCCACACACAGAAATCATCTCCTGGGCG
GGGTATTTCCTGGAAAGATGTTAAATCTCAGTCATTTCTTGTGGCTTCTTGTCAGCTCCA
AGCTTTTTTTTTCTTTCTTCTTTTTTTCTGATCTTGTCCCTCAAAttatttgtttgacaa
actcacacagggaatccacctctaagtcagaacctgggctgggcactggggacccagcag
gggctctgagccaacccctgctctgaggaacAGGGACAGGTGCCCAGAGGTGCCCTCATA
GAGGATCAGTGGGACACCAGGCAGAAGAGCTCATCTCTGCCTGGGGGTGGGGTCTGGAGA
GGGCCTCATGTGATTCGTGGGCGCGTGTGAGCTGAGGTAACAGTTGAGGCTGCGATACaa
taatagctcacatttcttggctgttccttgtgtgaggccctgttctgagtactggatctg
tatATGAACATGTTTCaggtcagtgacttgcccaaagtcacatgggacacaagcagcgag
ctgggattggaacccagctctgtactctgacCATCGGGTAGCACTGCCTTGGAGGATGCT
GGCCCTGGTCCTAGTGCTGTGGTGGGCGCTGTGCCTTCCACCTACCTGGTCAGCAGAGGG
TAACGCTCCCGAGCCGGAGGCGCTGGCCTGCTCCGGCCTTGCCGGTGACTGATGCAGTGG
GAGAGGGGGCAGGTCACACAGAGCTCCTGGGTCCCTTGGTACCTGTCTGTGGGACATGGA
TCCCttctttttttttttttgagacagagttttgttcttgtcacccaggctggagtgcag
tggcgcaatctcagctcactgcaacctccgcctcctgggttcaagcgattctcttccctc
agcctcttgagtagctgggattacaggcgtgcgccaccatgcccagctaattttttttta
tttttgtatttttagtagagacagggttttgccatgttagccaggctggtcttgaactcg
tgacttcaggtgatccacctgccttggcctcccaaagtactgggcttacaggcatgagcc
accatgctgggccTGACATGGGCCCCTTCTGTCTCAGTTTCTTCATCTGCAGTGGGTGCT
GTAATCCAGCTGAGAGAGGAGTACTTGAGGGAAGGGGTATGAAGCTTGCGGCAGGTAGCG
AGTGCTCAGATAACCTTTCTAAACCAACCGGGACCCTGAgttccagttgacagaaacaca
gtacaagcaggacctagaacccaaaaggaaggcactggctcaagtaaccggggagagcag
agggtaggtcagggatctgggctcagctggagggaggtcctccaagcatgtggtcaggag
cccgcctctctccagctcttgcttcagccttcctttgtgttggcaaaattctcaggccac
cacagagccaaggtggcctccgggtttgcaggctgctgcttagccagggagaagggctct
tccctgcagtcctggcttaagggctgggctgcctttgtggctcacctgggatcacgtgcc
tatcctgaaccaaccatggtggcccagctgggggcatgggatcctctggtggaccaggcc
tgggtcTCTGGACCTCTGCTAGGAGCCAGGAGCCAGGGAGGGAGGCTCTTCAAGGAATAA
GGTCGGAGTAGAGGGTGCTGGGAAGAAATGGTGTCCACCCTCCCTGCCCTCCTTTGCATG
GCCCCTCTACCAGTCTGACCACACGGGAGCCCCTCTCCCCAGAAGACAGCCACCTCCTCC
TGGGGCGACTTCAGGATGGAAGTGCTCTCTTTAAAGCAACATTACTTACCTAATTAAGCG
CTTAGGAGCTGGCAGGAGGTAGTGGGGAGGTTTTGTTGATTTCTTTTTTAGACTTTTAGC
ACTGAAGTTGCGTGAGAAAGTAACTGTGTAATTAGGAATTAATTTCTCACTCCTGTAAGC
GATGTCTTATTTGGGGCCTGAGGGGAGTCAGCCCACAAGGCGGCCCTTCCTTACCTTCTC
TTTTTGGAATGTGGGCAGGAAGTCCCAGCTGTCTTGGCTGTCACTGGGGTGGAAAGAGGA
GAAGGGGAGGGAGATAGCTTCCTCCATCCCAGGTGGCCCTCAGCAAAAATTGAGACGTGG
TGCTTATGCCTGACATGGCACCTAGGGTGAGCAGACACTCGGgggagatggacggaggcc
acattatggagacccttgaaggtctctttgttctgaaggcaatggggagtcactgagggt
tttaagtgggagtgacacagctaggtctgagtttaggagatttctgctgactgaggaagg
gctgtaggggaggaagcaaggggcaggagggcaattgggaggcttgtgccactgtcggga
cagagggagggtgatccgggctaggacagggagagtggaactgTCAGCAAGCTATCCCAG
GTTGGGCCAATTGGTGCATTGAGTCATTGTCAAGACAGTGAGGTTCCCAGGACACAGACT
TAAACCCACAATTCCTCCCTCCCAACTAAGTGCTCTTCCCTCTTCCCTCCTCTCTCCCCA
TCCTTGTCCTGTGTCCTCCTTTCTATCCTCTTCTGCTCAGAGAAGAATGAGAACTACACG
ATTCTTCACTGTGCAGCTACTATGTTTCTTCTTCACTGAATGCATTTATATGCTCTTATT
CCCCCAGGCAGGAGATGCGGCCACCGCAGAATACCCGCAAATGGTTCATGAAGTGGAGAA
GTGAGAGTTAGGACCCAGGAGAAACATTTAAGCAAATGGATTCCCTGGAAGGATCTACAG
TGTCAAGATCTTTCATGCTGCtaagaactcagtaatatcacatttccttttttgacttgg
ttgccaggaagctcagagctaagatcttgacaccagattctaCAGGAACGTTTTCTTGGG
GGAGCTTTTCACCGGGGTCTGAGGGCTGCACCTGGTGGATTCTCAGGGGAATTTGGGGAA
TGTTTGCCGCAGACATAGACTGCAGGTGTGTTCCCGTGCTGAAGACCCAGAGGGTCATGT
ATGGCGTGAAGGAAAGGGGCTGGGCCAATGTGTTGCTCCAGGCCTGCCCTATTTGGACCA
GCTCAGAGTGTTTGGGAGCTTCAAATGCACTGCCAGGCAGCGGCTGTTTCTGTTCCCCTC
CAAGAtgggggcggatggcggggaggttgcccaagtctgtagccgagagcacacgtgtct
gatcagcctcctgtggcaaggctggggtctgggaggtgttcagatcctaaagttactaac
tgggtcatcgtgggccccccctttgacatccagtcacaacttgtatctcattgaggaccc
tgggatcagtctcttcctgccaccccttgttgtagagaaacacaaagtgtaagaaaacaC
TCTTTGTCggctgggcacggtggctcacgcctgtaatcccagcactttgggaggccaaag
tgggtggatcatctgaggttgggagttcgagaccagcctgaccaacatggagaaactcca
tctctactaaaaatacaaaattagctgggcatggtggtgcatgcctgtaatcccagctac
tcaggaggctgaggcaggagaatcgcttgaacccgggaggcgtaggttgtggtgagctaa
gatagtgccattgcactccagcctgggcaacaagagtgaaactctgtctcaaaaaaaaaa
aaaaaaaaaaaaagaaaagaaaaagaaaaCACTCTTTGTCATCAAGGGGCTGAGTTGTGC
ACGAGGGCAGTCTTGTCCCCCAGCCTATCCTGGGGCAGGGGCCATGGTTGGTGTCCTCAC
TTAACTGAGAGCCAATAGTCCTAGACTGGGTGGGGAAGGTGGAGCCTGGTGGCCGTGTAG
GGGAGGGGAGTTAGGGACCAGCAGGGGGTTGTCCCAAGGGCTCCCTCAATGAGCCAGTCA
TGGATGTGGCTTGCTCTGGTCCGGGGTGGAATGGAGGGAGGCTGTGGCAggagagaataa
tgggcccgcgctcaaatgagtggagattgaaatgggttcccacaggtaaagagaacagtg
cccggcacccagtagggtctcaaACAGCCTTGCTTTTCTGTCTACCCATCCATCTTTCAG
GCATCTGTTTATTTTCATGGCGAGGCTTCATGGGGACGGGAACAAGTCCTTGATGAGCGC
CTGCCAGAGCTGGGCAGGTGTGCCCTCTGGGCTCTGGGAAGGCAGCACGTGGGTGGGTTC
AGTCTGGTGTGGGCTGGGAGCCCCCATCTCCAGCTCACCCAGCAAAGCATGAACTGAGCC
TGAGGGGGTTCCCAGCTCTCCCTAGGGACTGACTCCCCCCACCCCGCCCCCCACAGGATC
TGGAGAACCAAGGCAGGAGAAAGAGAGGCTGCGTCTGTGGGGGTGGGGCATGGTGGGGAG
GGCTGGCTGGAGCTGGGCCTGGCTGCCTGCGATGGGACTCGGCAGTCCTGGGCCCCGCGG
GTGCCAGCGCCTGTTTGTGTGCCTGTGTGTGCCACCCCCGCAGCCCCTCCATCACACGTG
TCTCCCGGCTGCCTGGAGAGCTCTTTCTACAAAATGTGAAAATGACAGTTGGGCTCACCC
ACGCGCAGAATCCTCATGCAGTCCCGCTCCCTCGCTGCCCCTTCCAGGTCACCATCGGCC
CTCACCCTCTCTGCCTAGCTGCTGccccccgcccaccgcacccctcctttcccggcccct
cccccaaccccctcttccctcctcctgctccttcccttggccccctcctccctccctgct
ctctgccagctcccccctccctctttcctccctccccctcAGGTCCCCAAGGTCTCTGTC
TCTAGCTCTAGGTCTCTGTCACTTTTTTGGGTCACTCCCCCTCATCTGAATTTATGCTTG
AGTAGGAGTGTGCATGTATGAGGATGTCCAAGAAGGGAGTGAGTGTGTGTGTGCAGGTGT
GCAGTtgtgtgtgtatttgtgcttgtgtatgcgggtgtgtggttgtttgcatgtgtgtga
ctctgtgtgcaggtgtgtgactgggtgtgtgggtatgtggttgtgtgtatgtgtgacttt
ttttggaggtgtgtgactgtgtgtgtgggtatgtggttgtgtacgtgtgtgtgACTGTGA
TGGTGTGTGACTGTGTGCAGgtgtgtggttgtgtgcctgtgtgtgtgtgtgcaagtgtgt
gactgtgtgtgtgactgtgtgtgcaggtgtgtgattatgtgcgtgtgtgtgattgtgcag
gtgtgtgtttgtgggtgtgtggttgtgtgcgtgtgtgactgtgtgcatgggtgtgactgt
gggtgtgtggttgtgtgCATGTACGTGACTCTGTGTATGCAGGTGTGTGACTGTGCGTGT
GTGCACACAGGTATGGAAGTGTGTGTGCATGCGCTCCAGCGGGTGGGGGATGGATGGTGG
TGGCATTTCAGGGAACGAATGGAGCTTTCACTCAATGACTCTTCAAGCAGCGGGAGGGGG
TGGCAGCTTCACAACAGTCGGACAGGTTTGTGCAGCATGTAGGAAAAGCCTTCATTTCCT
ACTGACAGTGGTGACATGGGTGGTGACAGGTGGAGCTGGCAGCAGTGCTGAAGTCCTGGG
GTGGGAGGTGCCAGGGGAAGGGTCTGGTGATGGGGGGCAGGGGGGGTCATCCTGGAAATG
CAGGCCGGGCCCATCTCCCAGTCGCCCTCAAATGAGGTTTGCTGTGCTTCCACCGTGAAG
GGACCTCAGAGGTCTGCCTCTTGAGGGAGATCTGGGAAGACTTCCTGAAGGAGGCAAACT
GCCTCCAAAGAGCTGCAGGGCTAGTTGAGCATGGAAGGGATGTGGGGTGTGGAGCCGTTT
GGTGCAGGAGATGTTCCTCCCACTTTCAGAGGCTGCTGTGGAAGCTGGGGCTGACATGGG
CCACGGGCCAGGAGGATGCGCTGGGGCAGGAGCCACCTGGCACAGCGCTGGGCACACAGT
GGGAGCCCAACATCTGTGCTCCCTTCATGCTCTAAGCCCTTGCCCACATCTGTCACCGGC
GCCATTTACAGAGGAGGAGACAAGGGCCACCAACCCCAGGCCACATGTTGGCCAGGTGTA
GCTGGAGATCCGACTGCTGTCTTTACTTGCCCTGTCCAGGCAGTAGTGCGCAGGTGGCTG
GAGAATGCTGTGGCCCGGGCCCTGGCCCCAGCTGGCCTCCAGCACCATCCCTCACTCTCT
CTCCTTTCTCTGCAGGATGGTCGAGTACTCCCTGGACCTTCAGAACATCAACCTGTCAGC
CATCCGCACCGTGCGCGTCCTGAGGCCCCTCAAAGCCATCAACCGCGTGCCCAGTGAGTC
AGCCCCGCCCTGTCCACACATTCCTGGCTGATCCATCCCTGGCCAACCCATCCCTGGCCT
ACCTAGCCAATGCCCACCCCCCCACCCTGCTTCGTTCACTTGGAGAAGACTGATTAGGGC
CCGGGTGTGCTCAGGGATCCTGCGGTGTCTATCTAGACAGATGTGCCCTGCTCCCATAGA
GCTCATGGGCCTGAAGACACTGGCAGGTGGTCCCAATGCTTCTGAGTCCCAGGAGAGTCT
GGAGAGCATGCTGGGGAGTCTGGCTTTTCAGGGACGAAGAGTTTATGGGAGAGTGGTCTT
CATAGGATGTCAAGGCAAGCACCCATAGGAAAAGAAGTTGCTTAGTTTGAAGGAGGACGT
CGTAGAGCATTTCACTGGGGCAATGAAACCTGACTCCCTCACTTGTGCTGACTGACTTAG
AAGTCGAGCTCTGTCATTCACCCACCACAGATCGATGTACCTACTCACCCATATGCCTAG
CCACCGGTTcatccatccacccgtccacctatccacctgtccatccatccatccatccgt
ccgtccgtccatccatccatccatccatccatctacctgtccacccatccacctgtctat
ccatccatccatccatccatccatccatccatccatccacccacccacccatccacccac
ccacctgtccacccacccacctgtccatccatctacctgtccacccatccacctgtccat
ccatccacccacccatccatccacccacccatccatccatccatccactcatccatccat
tcacccacccgtccatccatctacctgtccacccatccacctgtccatccatccatccat
ccatccatccatccatccatccatACGTACATACATACATCTGCTCATCTTTCTAGCCAT
CTTTCCATTTGTCCATTCATTCATCTGTATAGTCAGCCAGAcatccacctgtccatccac
tcatccacccatccacctgtccatccatccatctgtccacccacacatccatccacctgc
ccacccaCCTAGTATTAAGAGAGGTTATCTTGCAACCATAAGCCCTGTagagttttcatg
tccatgacctgttttgagccttacagtcattctgagggaggtgagctgttgccattttac
agatgaaaaaactaagacttggagacacgaggttacctgcccagggacgcactgccagtg
agtagcaaaggctggagtcagttaggtcttctgactcctcactgctctcttcTAGGAATG
GGGTGAAGACTGGGGAAAGAGAGGATGAGGGCCCTGCCTGCCTTCCTGGtttttttttgt
tgttgttgtttgtttgtttgtttgtttgttttttttgagacacagcccgtagctctgttg
cccagactggagtccagtggtgtgaacttggctcactgcaacttctgcctcccaggttca
agcaattctcctcctgtctcaccctcatgagtagctgggactacaggcatgtgccaccat
gcctggctaatttttgtatttttagtagggatgaggtttcaccatattggtcaggctggt
ctcgaactcctgacctcaggtgatccacccaccttggcttcccaaagtgctaggattaca
ggcatgagccactgcacctggcTGCCTGGGGCTTTTATACGCATTTACCCACTTCCTATG
GTCCAGGAACTTGACATCTGATGGCTCAACAACCTGTGGgaggctcagagaagttaagtg
actcacacaaagtcacacagcaattcagcggcagagctggaatctgaacagagttctgtc
tgtcctcagcccagtttatttccTGGCTGTGTCTGACCCCTTGCTTCTCTTCCCTGCCTG
AGCTTCTGTTTCCCCATCTGCCAAAGAGTACAGGTCTCCTGGCACCTGCTCCCCCTCCAC
AGGTAGTGCTGTCCCCATTCCTTTATTCCTAGCCCTGGGGCCTTGGGGCTCTGTCACCCA
CCCCACCCAGCCAACCTCTGTGGTCCATCCATCCTGAGCGCCCTGTGGGGCTGGCCTGAC
CCCGGGCTTGCAGAATGCATCAGTCAGTCTGGGCAGGCCTGGCGGGGCAGGAGAGGCCAT
GCTTCAGAATATCTGTGGAGCAAGGTGACCAGGAGGGTGGCAGAGCTTTCTGAGCCTGGA
GGGTGGCCCAATCCTGCTTTGTTCTGAGAGGGACTGGCTTGGCTTGGGTAGGGCACAGAG
GGGGCCTGGGGGCTGGGGTCTCAAGGTCACAATACGATAGAAAACGCTGGGGGTCCTCAG
TGCTACTGTGAGGGTCTTGGGGAAGGGTTTGGGAGGCGAGGTAGGGCAAGTGAGTAGTGG
GAACCAAAGCTGTGCGGGAGGGGGAGGGGGAGTTCAGCTCTACCAGCCTGGCCCCTTCCC
ACTGCCCTAGGGAGACCCCCTTGGGCACAGGGAGGGGACATGCGGAGAGGCCATTTTAGG
GCCAGCTTCTCTCTGTCCTCATCCCCTCCAATCccagagggctccttgaagatcacctag
ttcaaaaccatctttcccacatttaacaaatgaggaaactaaggtccagagagggtcgtg
gctagtccagggtcacacagcaattcagtgTGACCAAACAGCAGTTCAGGAAGGACCAAG
CCAAACCAGCACACCTTCCCCAACAGTGTGTGATTTTCTCCCATGTGCCCCACCTGACTT
TACTGGGAAATGAGCCAAAAGGTGGCCTccgtacactcagcacccagaactctgcctggc
ggacagaaggcgcgccaaagacacgtgtgaaatggaCACAGCAGGTGTACTGAGCTGTGT
ACTGTGCCAGGACCACAGAGCTATACATGCTCCTGTGCCGGGCATGAGGAGGCAGGGAGA
ATGGGGCTgggggtcgggaggcctccgggagaaggggatgtctgagttgagacccagggg
aggatggggattgagtaggtggagggggagggctgggcggcagtagcgggggttcaggga
gtgtaaagggcttggggagggagcTGCAGGAGCTGGGGGTTACAGGCTGGGTGGACCAAG
GGGTGGGGCATGAGGCTGGAGAGGACAGGGCCTGGGCATGGACCATGTGCCTGAGGGCAG
TGGGAGCATAGGAAGAGGTTAGCAAGTGGTTGCTTTAGAAACACCCCTGGCCAGAGTGCG
GTgtggggggggcggtggggggggcagtgggggTGAGCTGGACATGGGACTGCTCCTGGA
ACAGGTGTGAGCGAATGGCCGGTACTGGGCAGGGGTGGGGGTGGGATGCAGAGCAGCAAG
TGGGTGGGAGAGGGACTGCTGGGCCCAGTCCAGGTCCTCCTTGAGTGTCTGGTGTGGGCA
CCTGGGTGGGCGGGAGGGACCTCAGCTCTCAGGGGCCAGCACAGAGGGCCACGTCGCTCC
TGGCTCCCACCCACAGTGCTGCTTGTTTCTGTCCTGGGGGACGGCGGGGGCTGCCCTCAG
CAGGCAGCTGCCATGGGACCATGGTCACACTCCAGGCCACGGAGCCCACAGGCACCGCCA
CCTTCCAGAGGTGTGTGCACGTTGCAGAGGGTCGCACACAAGGGATGTTTGTACGTGATC
TTGATCTGAACCTCTTGTCCGGTCTAGGGTCTGCCCAGCAGGGGGCAGCACTGTGATGGG
ACCGCTGAGGCTGCAGGCGGGCTTAGGGGCATGGGACGGGACACGGGCGGAGGCCTCGCT
CTTGCCAGGCGGGCTTCTCTACATCtgtgtgagggtgtgtgtgggtgtgagggtgtgtgt
gggtgtgagggtgtgtgtCCACCAGAGAACACGTGTGAGGACGTGTGTGCACGAGTGTGT
GTGCAATGAAGGGTGTGCACAGGTGAGTATGTGCCTGTGAGGTGCGTGTGCACATGTAAG
TACATGGGAGAGtgtgtgtgcatgtgacaatgtgtgcatctgaggatgtgtgtgcacaag
tgagcaaatgtgaaagcctgcacacgtgaatgggcacatgtaagggtgtgtacatgtgag
agtgcgtgcctatgaaagtgtgtgtgttgtgagggtgtgtgctgtgtctgcctgggaggg
tgtctgtgtatgCCTATGAATATGTTCATGCCTGAGCATAtgtgtgcttgtgtgtgtgtg
cctgtgagggtgtgtgtgcctgtgagagtgtttgctgtgatgtgtgtgtgcctgtgaggg
tgtgtgtgcctgtgtgtgtgtgtgcctgtgtgtgtatgtgtgCTGCGAGGGGGTATGCCT
GTGAGGGgtgtgtggctgtgagggtgtgtgtgctgtgaggaggtgtgttatgaaagtatg
cgtgcctgtgaacatgcgtgtgtctatgagcctatgtgtgcctgtgggggtgtgtatgtc
tgtgaaagggtgtgtacgtgtcaagagtgtgtgtgtgcctctgagcgtgtgtgcgtccat
aaaggggtgtgcctgtgagggtgtgtgtgtgtgaagtgtgtgtgtgcgcctgtgagggtg
tatgtgtgacgtgtttgtgtgtgtgcctgtgagggtgtgtgtgaaagggtgtgtatgtgt
CAAGGGTGTGTGTGCGCCTCT
================================================
FILE: depth/test/hg19.fa.fai
================================================
chrM 16571 6 60 61
chr22 20001 16861 60 61
================================================
FILE: depth/test/run.sh
================================================
#!/bin/bash
goleft depth --windowsize 10 --q 1 --mincov 4 --reference hg19.fa --processes 1 --stats --bed Test1-coverage.depth-tocalculate-windows.bed --prefix out Test1-sort.bam
================================================
FILE: depthwed/depthwed.go
================================================
// Package depthwed combines files from goleft depth into matrices.
package depthwed
import (
"bufio"
"bytes"
"fmt"
"io"
"log"
"os"
"strconv"
"strings"
arg "github.com/alexflint/go-arg"
"github.com/brentp/xopen"
)
type cliargs struct {
Size int `arg:"-s,required,help:sizes of windows to aggregate to must be >= window in input files."`
Beds []string `arg:"positional,required,help:depth.bed files from goleft depth"`
}
func pcheck(e error) {
if e != nil {
log.Fatal(e)
}
}
// Main is run from the dispatcher
func Main() {
cli := cliargs{}
arg.MustParse(&cli)
run(cli)
}
func getNameFromFile(f string) string {
tmp := strings.Split(f, "/")
tmpn := tmp[len(tmp)-1]
for _, suff := range []string{".gz", ".bed", ".depth"} {
if strings.HasSuffix(tmpn, suff) {
tmpn = tmpn[:len(tmpn)-len(suff)]
}
}
return strings.TrimSuffix(tmpn, "\n")
}
func run(args cliargs) {
stdout := bufio.NewWriter(os.Stdout)
defer stdout.Flush()
beds := make([]*xopen.Reader, len(args.Beds))
names := make([]string, 3+len(args.Beds))
names[0], names[1], names[2] = "#chrom", "start", "end"
var err error
for i, f := range args.Beds {
beds[i], err = xopen.Ropen(f)
pcheck(err)
names[i+3] = getNameFromFile(f)
}
stdout.WriteString(strings.Join(names, "\t") + "\n")
depths, eof := next(beds, args.Size)
for ; !eof; depths, eof = next(beds, args.Size) {
fmt.Fprintf(stdout, "%s\t%d\t%d", depths[0].chrom, depths[0].start, depths[0].end)
for _, d := range depths {
fmt.Fprintf(stdout, "\t%d", d.depth)
}
stdout.Write([]byte{'\n'})
}
}
type depth struct {
chrom string
start int
end int
depth int
}
func mustAtoi(s string) int {
v, err := strconv.Atoi(s)
pcheck(err)
return v
}
func mustAtof(s string) float64 {
v, err := strconv.ParseFloat(s, 64)
pcheck(err)
return v
}
func sFromLine(l string) depth {
toks := strings.Split(strings.TrimSuffix(l, "\n"), "\t")
dep := mustAtof(toks[3])
d := depth{
chrom: toks[0],
start: mustAtoi(toks[1]),
end: mustAtoi(toks[2]),
}
d.depth = int(0.5 + dep) //*float64(d.end-d.start))
return d
}
func getNextChrom(r *bufio.Reader) string {
chromLine, _ := r.Peek(100)
var chrom string
if len(chromLine) > 0 {
chrom = string(chromLine[:bytes.Index(chromLine, []byte("\t"))])
}
return chrom
}
func next(beds []*xopen.Reader, size int) (depths []depth, eof bool) {
depths = make([]depth, len(beds))
eof = false
k := 0
// endSeen makes sure we only print the indivisible message once per chrom
endSeen := false
chrom := getNextChrom(beds[0].Reader)
for !eof && depths[0].end-depths[0].start < size && chrom == getNextChrom(beds[0].Reader) {
for i, bed := range beds {
line, err := bed.ReadString('\n')
if err == io.EOF {
if i > 0 && !eof {
panic("not all files have same number of records")
}
eof = true
continue
} else if err != nil {
panic(err)
}
if k == 0 {
depths[i] = sFromLine(line)
if depths[i].chrom != chrom {
log.Fatalf("got unexpected chromosome from %s: %s", bed, depths[i].chrom)
}
if size%(depths[i].end-depths[i].start) != 0 && !endSeen {
endSeen = true
log.Printf("size %d indivisible by interval in line: %s likely chromosome change.", size, line)
}
} else {
tmp := sFromLine(line)
depths[i].end = tmp.end
depths[i].depth += tmp.depth
}
}
k++
}
return depths, eof
}
================================================
FILE: docs/index.html
================================================
<html>
<body>
<h1><a href="indexcov/index.html">IndexCov</a></h1>
</body>
</html>
================================================
FILE: docs/indexcov/ex-indexcov-depth-15.html
================================================
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.3.0/Chart.bundle.js"></script>
<script>
/*!
* chartjs-plugin-annotation.js
* http://chartjs.org/
* Version: 0.4.3
*
* Copyright 2016 Evert Timberg
* Released under the MIT license
* https://github.com/chartjs/Chart.Annotation.js/blob/master/LICENSE.md
*/
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
},{}],2:[function(require,module,exports){
function isValid(num) {
return !isNaN(num) && isFinite(num);
}
function decorate(obj, prop, func) {
var prefix = '$';
if (!obj[prefix + prop]) {
obj[prefix + prop] = obj[prop].bind(obj);
obj[prop] = function() {
return func(obj[prefix + prop]);
};
}
}
module.exports = {
isValid: isValid,
decorate: decorate
};
},{}],3:[function(require,module,exports){
// Get the chart variable
var Chart = require('chart.js');
Chart = typeof(Chart) === 'function' ? Chart : window.Chart;
var chartHelpers = Chart.helpers;
var helpers = require('./helpers.js');
// Configure plugin namespace
Chart.Annotation = Chart.Annotation || {};
var DRAW_AFTER = 'afterDraw';
var DRAW_AFTER_DATASETS = 'afterDatasetsDraw';
var DRAW_BEFORE_DATASETS = 'beforeDatasetsDraw';
Chart.Annotation.drawTimeOptions = {
afterDraw: DRAW_AFTER,
afterDatasetsDraw: DRAW_AFTER_DATASETS,
beforeDatasetsDraw: DRAW_BEFORE_DATASETS
};
var annotationTypes =
Chart.Annotation.types = {
line: require('./types/line.js')(Chart),
box: require('./types/box.js')(Chart)
};
// Default plugin options
var annotationDefaults =
Chart.Annotation.defaults = {
drawTime: DRAW_AFTER,
annotations: []
};
// Default annotation label options
var labelDefaults =
Chart.Annotation.labelDefaults = {
backgroundColor: 'rgba(0,0,0,0.8)',
fontFamily: Chart.defaults.global.defaultFontFamily,
fontSize: Chart.defaults.global.defaultFontSize,
fontStyle: 'bold',
fontColor: '#fff',
xPadding: 6,
yPadding: 6,
cornerRadius: 6,
position: 'center',
xAdjust: 0,
yAdjust: 0,
enabled: false,
content: null
};
function draw(chartInstance, easingDecimal) {
if (chartHelpers.isArray(chartInstance.annotations)) {
chartInstance.annotations.forEach(function(annotation) {
annotation.transition(easingDecimal)
.draw(chartInstance.chart.ctx);
});
}
}
function initConfig(config) {
config = chartHelpers.configMerge(annotationDefaults, config);
if (chartHelpers.isArray(config.annotations)) {
config.annotations.forEach(function(annotation) {
annotation.label = chartHelpers.configMerge(labelDefaults, annotation.label);
});
}
return config;
}
function build(configs, chartInstance) {
return configs
.filter(function(config) {
return !!annotationTypes[config.type];
})
.map(function(config, i) {
var annotation = annotationTypes[config.type];
var annotationObject = new annotation({
_index: i,
config: config
});
// Set the data range for this annotation
annotationObject.setRanges(config, chartInstance);
return annotationObject;
});
}
function getScaleLimits(scaleId, annotations, scaleMin, scaleMax) {
var ranges = annotations.filter(function(annotation) {
return !!annotation._model.ranges[scaleId];
}).map(function(annotation) {
return annotation._model.ranges[scaleId];
});
var min = ranges.map(function(range) {
return Number(range.min);
}).reduce(function(a, b) {
return isFinite(b) && !isNaN(b) && b < a ? b : a;
}, scaleMin);
var max = ranges.map(function(range) {
return Number(range.max);
}).reduce(function(a, b) {
return isFinite(b) && !isNaN(b) && b > a ? b : a;
}, scaleMax);
return {
min: min,
max: max
};
}
var annotationPlugin = {
beforeInit: function(chartInstance) {
// Decorate Chart.Controller.buildScales() so we can decorate each scale
// instance's determineDataLimits() method
helpers.decorate(chartInstance, 'buildScales', function(previous) {
previous();
// Decorate Chart.Scale.determineDataLimits() so we can
// check the annotation values and adjust the scale range
Object.keys(chartInstance.scales).forEach(function(scaleId) {
var scale = chartInstance.scales[scaleId];
helpers.decorate(scale, 'determineDataLimits', function(previous) {
previous();
if (chartInstance.annotations) {
var range = getScaleLimits(scaleId, chartInstance.annotations, scale.min, scale.max);
if (typeof scale.options.ticks.min === 'undefined' && typeof scale.options.ticks.suggestedMin === 'undefined') {
scale.min = range.min;
}
if (typeof scale.options.ticks.max === 'undefined' && typeof scale.options.ticks.suggestedMax === 'undefined') {
scale.max = range.max;
}
}
});
});
});
},
beforeUpdate: function(chartInstance) {
// Build the configuration with all the defaults set
var config = chartInstance.options.annotation;
config = initConfig(config || {});
if (chartHelpers.isArray(config.annotations)) {
chartInstance.annotations = build(config.annotations, chartInstance);
chartInstance.annotations._config = config;
}
},
afterScaleUpdate: function(chartInstance) {
if (chartHelpers.isArray(chartInstance.annotations)) {
chartInstance.annotations.forEach(function(annotation) {
annotation.configure(annotation.config, chartInstance);
});
}
},
afterDraw: function(chartInstance, easingDecimal) {
var config = chartInstance.annotations._config;
if (config.drawTime == DRAW_AFTER) {
draw(chartInstance, easingDecimal);
}
},
afterDatasetsDraw: function(chartInstance, easingDecimal) {
var config = chartInstance.annotations._config;
if (config.drawTime == DRAW_AFTER_DATASETS) {
draw(chartInstance, easingDecimal);
}
},
beforeDatasetsDraw: function(chartInstance, easingDecimal) {
var config = chartInstance.annotations._config;
if (config.drawTime == DRAW_BEFORE_DATASETS) {
draw(chartInstance, easingDecimal);
}
}
};
module.exports = annotationPlugin;
Chart.pluginService.register(annotationPlugin);
},{"./helpers.js":2,"./types/box.js":4,"./types/line.js":5,"chart.js":1}],4:[function(require,module,exports){
var helpers = require('../helpers.js');
// Box Annotation implementation
module.exports = function(Chart) {
var BoxAnnotation = Chart.Element.extend({
setRanges: function(options, chartInstance) {
var model = this._model = this._model || {};
var xScale = chartInstance.scales[options.xScaleID];
var yScale = chartInstance.scales[options.yScaleID];
var chartArea = chartInstance.chartArea;
model.ranges = {};
if (xScale) {
min = helpers.isValid(options.xMin) ? options.xMin : xScale.getPixelForValue(chartArea.left);
max = helpers.isValid(options.xMax) ? options.xMax : xScale.getPixelForValue(chartArea.right);
model.ranges[options.xScaleID] = {
min: Math.min(min, max),
max: Math.max(min, max)
};
}
if (yScale) {
min = helpers.isValid(options.yMin) ? options.yMin : yScale.getPixelForValue(chartArea.bottom);
max = helpers.isValid(options.yMax) ? options.yMax : yScale.getPixelForValue(chartArea.top);
model.ranges[options.yScaleID] = {
min: Math.min(min, max),
max: Math.max(min, max)
};
}
},
configure: function(options, chartInstance) {
var model = this._model = this._model || {};
var xScale = chartInstance.scales[options.xScaleID];
var yScale = chartInstance.scales[options.yScaleID];
var chartArea = chartInstance.chartArea;
// clip annotations to the chart area
model.clip = {
x1: chartArea.left,
x2: chartArea.right,
y1: chartArea.top,
y2: chartArea.bottom
};
var left = chartArea.left,
top = chartArea.top,
right = chartArea.right,
bottom = chartArea.bottom;
var min, max;
if (xScale) {
min = helpers.isValid(options.xMin) ? xScale.getPixelForValue(options.xMin) : chartArea.left;
max = helpers.isValid(options.xMax) ? xScale.getPixelForValue(options.xMax) : chartArea.right;
left = Math.min(min, max);
right = Math.max(min, max);
}
if (yScale) {
min = helpers.isValid(options.yMin) ? yScale.getPixelForValue(options.yMin) : chartArea.bottom;
max = helpers.isValid(options.yMax) ? yScale.getPixelForValue(options.yMax) : chartArea.top;
top = Math.min(min, max);
bottom = Math.max(min, max);
}
// Ensure model has rect coordinates
model.left = left;
model.top = top;
model.right = right;
model.bottom = bottom;
// Stylistic options
model.borderColor = options.borderColor;
model.borderWidth = options.borderWidth;
model.backgroundColor = options.backgroundColor;
},
draw: function(ctx) {
var view = this._view;
// Canvas setup
ctx.save();
ctx.beginPath();
ctx.rect(view.clip.x1, view.clip.y1, view.clip.x2 - view.clip.x1, view.clip.y2 - view.clip.y1);
ctx.clip();
ctx.lineWidth = view.borderWidth;
ctx.strokeStyle = view.borderColor;
ctx.fillStyle = view.backgroundColor;
// Draw
var width = view.right - view.left,
height = view.bottom - view.top;
ctx.fillRect(view.left, view.top, width, height);
ctx.strokeRect(view.left, view.top, width, height);
}
});
return BoxAnnotation;
};
},{"../helpers.js":2}],5:[function(require,module,exports){
// Get the chart variable
var Chart = require('chart.js');
Chart = typeof(Chart) === 'function' ? Chart : window.Chart;
var chartHelpers = Chart.helpers;
var helpers = require('../helpers.js');
// Line Annotation implementation
module.exports = function(Chart) {
var horizontalKeyword = 'horizontal';
var verticalKeyword = 'vertical';
var LineAnnotation = Chart.Element.extend({
setRanges: function(options) {
var model = this._model = chartHelpers.clone(this._model) || {};
model.ranges = {};
model.ranges[options.scaleID] = {
min: options.value,
max: options.endValue || options.value
};
},
configure: function(options, chartInstance) {
var model = this._model = chartHelpers.clone(this._model) || {};
var scale = chartInstance.scales[options.scaleID];
var pixel, endPixel;
if (scale) {
pixel = helpers.isValid(options.value) ? scale.getPixelForValue(options.value) : NaN;
endPixel = helpers.isValid(options.endValue) ? scale.getPixelForValue(options.endValue) : pixel;
}
var chartArea = chartInstance.chartArea;
var ctx = chartInstance.chart.ctx;
// clip annotations to the chart area
model.clip = {
x1: chartArea.left,
x2: chartArea.right,
y1: chartArea.top,
y2: chartArea.bottom
};
if (!isNaN(pixel)) {
if (options.mode == horizontalKeyword) {
model.x1 = chartArea.left;
model.x2 = chartArea.right;
model.y1 = pixel;
model.y2 = endPixel;
} else {
model.y1 = chartArea.top;
model.y2 = chartArea.bottom;
model.x1 = pixel;
model.x2 = endPixel;
}
}
model.mode = options.mode;
// Figure out the label:
model.labelBackgroundColor = options.label.backgroundColor;
model.labelFontFamily = options.label.fontFamily;
model.labelFontSize = options.label.fontSize;
model.labelFontStyle = options.label.fontStyle;
model.labelFontColor = options.label.fontColor;
model.labelXPadding = options.label.xPadding;
model.labelYPadding = options.label.yPadding;
model.labelCornerRadius = options.label.cornerRadius;
model.labelPosition = options.label.position;
model.labelXAdjust = options.label.xAdjust;
model.labelYAdjust = options.label.yAdjust;
model.labelEnabled = options.label.enabled;
model.labelContent = options.label.content;
ctx.font = chartHelpers.fontString(model.labelFontSize, model.labelFontStyle, model.labelFontFamily);
var textWidth = ctx.measureText(model.labelContent).width;
var textHeight = ctx.measureText('M').width;
var labelPosition = calculateLabelPosition(model, textWidth, textHeight, model.labelXPadding, model.labelYPadding);
model.labelX = labelPosition.x - model.labelXPadding;
model.labelY = labelPosition.y - model.labelYPadding;
model.labelWidth = textWidth + (2 * model.labelXPadding);
model.labelHeight = textHeight + (2 * model.labelYPadding);
model.borderColor = options.borderColor;
model.borderWidth = options.borderWidth;
model.borderDash = options.borderDash || [];
model.borderDashOffset = options.borderDashOffset || 0;
},
draw: function(ctx) {
var view = this._view;
// Canvas setup
ctx.save();
ctx.beginPath();
ctx.rect(view.clip.x1, view.clip.y1, view.clip.x2 - view.clip.x1, view.clip.y2 - view.clip.y1);
ctx.clip();
ctx.lineWidth = view.borderWidth;
ctx.strokeStyle = view.borderColor;
if (ctx.setLineDash) {
ctx.setLineDash(view.borderDash);
}
ctx.lineDashOffset = view.borderDashOffset;
// Draw
ctx.beginPath();
ctx.moveTo(view.x1, view.y1);
ctx.lineTo(view.x2, view.y2);
ctx.stroke();
ctx.restore();
if (view.labelEnabled && view.labelContent) {
ctx.beginPath();
ctx.rect(view.clip.x1, view.clip.y1, view.clip.x2 - view.clip.x1, view.clip.y2 - view.clip.y1);
ctx.clip();
ctx.fillStyle = view.labelBackgroundColor;
// Draw the tooltip
chartHelpers.drawRoundedRectangle(
ctx,
view.labelX, // x
view.labelY, // y
view.labelWidth, // width
view.labelHeight, // height
view.labelCornerRadius // radius
);
ctx.fill();
// Draw the text
ctx.font = chartHelpers.fontString(
view.labelFontSize,
view.labelFontStyle,
view.labelFontFamily
);
ctx.fillStyle = view.labelFontColor;
ctx.textAlign = 'center';
ctx.textBaseline = 'middle';
ctx.fillText(
view.labelContent,
view.labelX + (view.labelWidth / 2),
view.labelY + (view.labelHeight / 2)
);
}
}
});
function calculateLabelPosition(view, width, height, padWidth, padHeight) {
// Describe the line in slope-intercept form (y = mx + b).
// Note that the axes are rotated 90° CCW, which causes the
// x- and y-axes to be swapped.
var m = (view.x2 - view.x1) / (view.y2 - view.y1);
var b = view.x1 || 0;
var fy = function(y) {
// Coordinates are relative to the origin of the canvas
return m * (y - view.y1) + b;
};
var fx = function(x) {
return ((x - b) / m) + view.y1;
};
var ret = {}, xa = 0, ya = 0;
switch (true) {
// top align
case view.mode == verticalKeyword && view.labelPosition == "top":
ya = padHeight + view.labelYAdjust;
xa = (width / 2) + view.labelXAdjust;
ret.y = view.y1 + ya;
ret.x = (isFinite(m) ? fy(ret.y) : view.x1) - xa;
break;
// bottom align
case view.mode == verticalKeyword && view.labelPosition == "bottom":
ya = height + padHeight + view.labelYAdjust;
xa = (width / 2) + view.labelXAdjust;
ret.y = view.y2 - ya;
ret.x = (isFinite(m) ? fy(ret.y) : view.x1) - xa;
break;
// left align
case view.mode == horizontalKeyword && view.labelPosition == "left":
xa = padWidth + view.labelXAdjust;
ya = -(height / 2) + view.labelYAdjust;
ret.x = view.x1 + xa;
ret.y = fx(ret.x) + ya;
break;
// right align
case view.mode == horizontalKeyword && view.labelPosition == "right":
xa = width + padWidth + view.labelXAdjust;
ya = -(height / 2) + view.labelYAdjust;
ret.x = view.x2 - xa;
ret.y = fx(ret.x) + ya;
break;
// center align
default:
ret.x = ((view.x1 + view.x2 - width) / 2) + view.labelXAdjust;
ret.y = ((view.y1 + view.y2 - height) / 2) + view.labelYAdjust;
}
return ret;
}
return LineAnnotation;
};
},{"../helpers.js":2,"chart.js":1}]},{},[3]);
</script>
</head>
<body>
<h4>Here we see a single sample with a very large deletion. Also note that this is an acrocentric chromosome.</h4>
<h5>Each line is a sample.</h5>
<h5>The legend at the top of the plot shows the sample id from the bam read-group.</h5>
<canvas id="canvas0" height="800" width="800"></canvas>
<hr>
</body>
<script>
Chart.defaults.line.cubicInterpolationMode = 'monotone';
Chart.defaults.global.animation.duration = 0;
var charts = []
var ctx = document.getElementById("canvas0").getContext("2d");
var chart = new Chart(ctx, {"type":"line","label":"15","data":{"datasets":[{"backgroundColor":"rgba(250, 18, 249, 0.941)","borderColor":"rgba(250, 18, 249, 0.941)","borderWidth":0.5,"label":"sample60","fill":false,"steppedLine":true,"lineTension":0,"pointBorderWidth":0,"pointHitRadius": 6,"pointRadius":0,"xAxisID":"xaxis0","yAxisID":"yaxis0","data":[{"x":19988480,"y":0.26},{"x":20004864,"y":0.90},{"x":20021248,"y":1.04},{"x":20037632,"y":1.14},{"x":20054016,"y":1.17},{"x":20070400,"y":1.22},{"x":20086784,"y":1.18},{"x":20103168,"y":1.21},{"x":20119552,"y":1.24},{"x":20135936,"y":1.28},{"x":20152320,"y":1.12},{"x":20168704,"y":1.06},{"x":20185088,"y":1.12},{"x":20201472,"y":1.18},{"x":20217856,"y":1.05},{"x":20234240,"y":1.69},{"x":20250624,"y":1.56},{"x":20267008,"y":1.28},{"x":20283392,"y":0.90},{"x":20299776,"y":2.50},{"x":20316160,"y":1.26},{"x":20332544,"y":1.32},{"x":20348928,"y":1.05},{"x":20365312,"y":0.89},{"x":20381696,"y":1.31},{"x":20398080,"y":1.73},{"x":20414464,"y":1.77},{"x":20430848,"y":1.87},{"x":20447232,"y":2.50},{"x":20463616,"y":2.50},{"x":20480000,"y":2.50},{"x":20496384,"y":2.50},{"x":20512768,"y":2.50},{"x":20529152,"y":1.47},{"x":20545536,"y":2.07},{"x":20561920,"y":2.50},{"x":20578304,"y":1.58},{"x":20594688,"y":2.50},{"x":20611072,"y":2.50},{"x":20627456,"y":1.02},{"x":20643840,"y":0.82},{"x":20660224,"y":0.97},{"x":20676608,"y":0.86},{"x":20692992,"y":0.69},{"x":20709376,"y":0.85},{"x":20725760,"y":0.84},{"x":20742144,"y":0.95},{"x":20758528,"y":1.02},{"x":20774912,"y":0.98},{"x":20791296,"y":0.80},{"x":20807680,"y":0.63},{"x":20824064,"y":0.93},{"x":20840448,"y":2.13},{"x":20856832,"y":2.50},{"x":20873216,"y":1.90},{"x":20889600,"y":0.00},{"x":20905984,"y":0.56},{"x":20922368,"y":0.42},{"x":20938752,"y":1.60},{"x":20955136,"y":1.32},{"x":20971520,"y":1.44},{"x":20987904,"y":1.27},{"x":21004288,"y":1.41},{"x":21020672,"y":1.73},{"x":21037056,"y":1.43},{"x":21053440,"y":1.45},{"x":21069824,"y":1.53},{"x":21086208,"y":1.43},{"x":21102592,"y":1.41},{"x":21118976,"y":1.32},{"x":21135360,"y":1.24},{"x":21151744,"y":1.26},{"x":21168128,"y":1.64},{"x":21184512,"y":1.22},{"x":21200896,"y":0.83},{"x":21217280,"y":0.49},{"x":21233664,"y":0.81},{"x":21250048,"y":1.15},{"x":21266432,"y":1.32},{"x":21282816,"y":0.72},{"x":21299200,"y":1.87},{"x":21315584,"y":1.98},{"x":21331968,"y":1.09},{"x":21348352,"y":0.91},{"x":21364736,"y":0.89},{"x":21381120,"y":0.86},{"x":21397504,"y":0.00},{"x":21413888,"y":0.00},{"x":21430272,"y":0.00},{"x":21446656,"y":0.00},{"x":21463040,"y":0.00},{"x":21479424,"y":0.00},{"x":21495808,"y":0.00},{"x":21512192,"y":0.00},{"x":21528576,"y":0.00},{"x":21544960,"y":0.00},{"x":21561344,"y":0.00},{"x":21577728,"y":0.00},{"x":21594112,"y":0.00},{"x":21610496,"y":0.00},{"x":21626880,"y":0.00},{"x":21643264,"y":0.00},{"x":21659648,"y":0.00},{"x":21676032,"y":0.00},{"x":21692416,"y":0.00},{"x":21708800,"y":0.00},{"x":21725184,"y":0.00},{"x":21741568,"y":0.00},{"x":21757952,"y":0.00},{"x":21774336,"y":0.00},{"x":21790720,"y":0.00},{"x":21807104,"y":0.00},{"x":21823488,"y":0.00},{"x":21839872,"y":0.00},{"x":21856256,"y":0.08},{"x":21872640,"y":0.32},{"x":21889024,"y":1.73},{"x":21905408,"y":2.50},{"x":21921792,"y":2.50},{"x":21938176,"y":1.38},{"x":21954560,"y":1.45},{"x":21970944,"y":1.49},{"x":21987328,"y":1.51},{"x":22003712,"y":1.76},{"x":22020096,"y":1.58},{"x":22036480,"y":1.82},{"x":22052864,"y":1.82},{"x":22069248,"y":1.60},{"x":22085632,"y":1.31},{"x":22102016,"y":1.52},{"x":22118400,"y":1.51},{"x":22134784,"y":1.68},{"x":22151168,"y":1.56},{"x":22167552,"y":1.29},{"x":22183936,"y":0.76},{"x":22200320,"y":0.00},{"x":22216704,"y":0.00},{"x":22233088,"y":0.59},{"x":22249472,"y":0.14},{"x":22265856,"y":0.76},{"x":22282240,"y":1.09},{"x":22298624,"y":2.24},{"x":22315008,"y":2.17},{"x":22331392,"y":1.93},{"x":22347776,"y":2.02},{"x":22364160,"y":1.88},{"x":22380544,"y":2.04},{"x":22396928,"y":2.35},{"x":22413312,"y":2.14},{"x":22429696,"y":2.03},{"x":22446080,"y":2.16},{"x":22462464,"y":2.20},{"x":22478848,"y":2.09},{"x":22495232,"y":1.99},{"x":22511616,"y":1.97},{"x":22528000,"y":1.98},{"x":22544384,"y":1.98},{"x":22560768,"y":2.24},{"x":22577152,"y":2.07},{"x":22593536,"y":0.00},{"x":22609920,"y":0.00},{"x":22626304,"y":0.30},{"x":22642688,"y":0.64},{"x":22659072,"y":1.24},{"x":22675456,"y":1.87},{"x":22691840,"y":1.14},{"x":22708224,"y":0.81},{"x":22724608,"y":1.08},{"x":22740992,"y":1.16},{"x":22757376,"y":1.02},{"x":22773760,"y":1.03},{"x":22790144,"y":1.00},{"x":22806528,"y":1.08},{"x":22822912,"y":1.25},{"x":22839296,"y":1.03},{"x":22855680,"y":0.99},{"x":22872064,"y":0.99},{"x":22888448,"y":0.97},{"x":22904832,"y":0.94},{"x":22921216,"y":0.95},{"x":22937600,"y":0.95},{"x":22953984,"y":0.97},{"x":22970368,"y":0.98},{"x":22986752,"y":0.98},{"x":23003136,"y":1.02},{"x":23019520,"y":0.97},{"x":23035904,"y":1.03},{"x":23052288,"y":1.01},{"x":23068672,"y":0.92},{"x":23085056,"y":1.04},{"x":23101440,"y":1.11},{"x":23117824,"y":1.17},{"x":23134208,"y":1.14},{"x":23150592,"y":1.15},{"x":23166976,"y":1.10},{"x":23183360,"y":1.15},{"x":23199744,"y":1.18},{"x":23216128,"y":1.14},{"x":23232512,"y":1.17},{"x":23248896,"y":1.17},{"x":23265280,"y":1.18},{"x":23281664,"y":1.30},{"x":23298048,"y":1.17},{"x":23314432,"y":1.17},{"x":23330816,"y":1.16},{"x":23347200,"y":1.16},{"x":23363584,"y":1.03},{"x":23379968,"y":1.46},{"x":23396352,"y":1.32},{"x":23412736,"y":1.57},{"x":23429120,"y":1.40},{"x":23445504,"y":1.02},{"x":23461888,"y":0.83},{"x":23478272,"y":1.03},{"x":23494656,"y":1.32},{"x":23511040,"y":0.00},{"x":23527424,"y":0.00},{"x":23543808,"y":0.33},{"x":23560192,"y":0.79},{"x":23576576,"y":1.29},{"x":23592960,"y":1.18},{"x":23609344,"y":1.07},{"x":23625728,"y":1.02},{"x":23642112,"y":0.98},{"x":23658496,"y":0.79},{"x":23674880,"y":1.12},{"x":23691264,"y":1.07},{"x":23707648,"y":1.02},{"x":23724032,"y":1.08},{"x":23740416,"y":1.06},{"x":23756800,"y":1.00},{"x":23773184,"y":1.05},{"x":23789568,"y":1.04},{"x":23805952,"y":1.04},{"x":23822336,"y":1.05},{"x":23838720,"y":1.00},{"x":23855104,"y":1.02},{"x":23871488,"y":1.00},{"x":23887872,"y":1.03},{"x":23904256,"y":1.06},{"x":23920640,"y":1.02},{"x":23937024,"y":1.08},{"x":23953408,"y":1.05},{"x":23969792,"y":1.06},{"x":23986176,"y":1.05},{"x":24002560,"y":1.04},{"x":24018944,"y":1.05},{"x":24035328,"y":1.03},{"x":24051712,"y":1.06},{"x":24068096,"y":1.06},{"x":24084480,"y":1.02},{"x":24100864,"y":1.07},{"x":24117248,"y":1.04},{"x":24133632,"y":1.02},{"x":24150016,"y":1.06},{"x":24166400,"y":1.06},{"x":24182784,"y":1.07},{"x":24199168,"y":1.07},{"x":24215552,"y":1.07},{"x":24231936,"y":0.98},{"x":24248320,"y":1.02},{"x":24264704,"y":1.05},{"x":24281088,"y":1.02},{"x":24297472,"y":1.05},{"x":24313856,"y":1.05},{"x":24330240,"y":1.13},{"x":24346624,"y":0.62},{"x":24363008,"y":0.58},{"x":24379392,"y":0.64},{"x":24395776,"y":0.58},{"x":24412160,"y":0.63},{"x":24428544,"y":0.63},{"x":24444928,"y":0.57},{"x":24461312,"y":0.58},{"x":24477696,"y":0.50},{"x":24494080,"y":0.61},{"x":24510464,"y":1.15},{"x":24526848,"y":1.16},{"x":24543232,"y":1.08},{"x":24559616,"y":1.11},{"x":24576000,"y":1.15},{"x":24592384,"y":1.13},{"x":24608768,"y":1.13},{"x":24625152,"y":1.16},{"x":24641536,"y":1.14},{"x":24657920,"y":1.22},{"x":24674304,"y":1.22},{"x":24690688,"y":1.12},{"x":24707072,"y":1.18},{"x":24723456,"y":1.17},{"x":24739840,"y":1.09},{"x":24756224,"y":1.17},{"x":24772608,"y":1.08},{"x":24788992,"y":1.14},{"x":24805376,"y":1.16},{"x":24821760,"y":1.08},{"x":24838144,"y":1.07},{"x":24854528,"y":1.01},{"x":24870912,"y":1.07},{"x":24887296,"y":1.04},{"x":24903680,"y":1.07},{"x":24920064,"y":0.96},{"x":24936448,"y":1.06},{"x":24952832,"y":1.06},{"x":24969216,"y":1.02},{"x":24985600,"y":1.06},{"x":25001984,"y":1.08},{"x":25018368,"y":1.08},{"x":25034752,"y":1.00},{"x":25051136,"y":1.05},{"x":25067520,"y":1.04},{"x":25083904,"y":1.01},{"x":25100288,"y":1.08},{"x":25116672,"y":1.02},{"x":25133056,"y":1.03},{"x":25149440,"y":1.00},{"x":25165824,"y":0.96},{"x":25182208,"y":0.99},{"x":25198592,"y":1.00},{"x":25214976,"y":1.03},{"x":25231360,"y":1.09},{"x":25247744,"y":1.05},{"x":25264128,"y":1.04},{"x":25280512,"y":1.05},{"x":25296896,"y":0.91},{"x":25313280,"y":0.97},{"x":25329664,"y":1.02},{"x":25346048,"y":1.03},{"x":25362432,"y":1.02},{"x":25378816,"y":1.04},{"x":25395200,"y":1.01},{"x":25411584,"y":0.75},{"x":25427968,"y":0.84},{"x":25444352,"y":0.90},{"x":25460736,"y":0.93},{"x":25477120,"y":0.91},{"x":25493504,"y":1.06},{"x":25509888,"y":1.06},{"x":25526272,"y":1.08},{"x":25542656,"y":1.02},{"x":25559040,"y":1.05},{"x":25575424,"y":1.02},{"x":25591808,"y":1.11},{"x":25608192,"y":1.02},{"x":25624576,"y":1.05},{"x":25640960,"y":1.05},{"x":25657344,"y":1.06},{"x":25673728,"y":1.05},{"x":25690112,"y":1.06},{"x":25706496,"y":1.01},{"x":25722880,"y":1.07},{"x":25739264,"y":1.00},{"x":25755648,"y":1.01},{"x":25772032,"y":1.10},{"x":25788416,"y":1.02},{"x":25804800,"y":1.04},{"x":25821184,"y":1.05},{"x":25837568,"y":1.03},{"x":25853952,"y":1.00},{"x":25870336,"y":1.03},{"x":25886720,"y":1.01},{"x":25903104,"y":0.99},{"x":25919488,"y":0.93},{"x":25935872,"y":1.00},{"x":25952256,"y":0.98},{"x":25968640,"y":0.97},{"x":25985024,"y":1.09},{"x":26001408,"y":1.19},{"x":26017792,"y":0.98},{"x":26034176,"y":0.97},{"x":26050560,"y":1.07},{"x":26066944,"y":1.02},{"x":26083328,"y":1.00},{"x":26099712,"y":0.97},{"x":26116096,"y":1.06},{"x":26132480,"y":1.01},{"x":26148864,"y":1.08},{"x":26165248,"y":1.04},{"x":26181632,"y":0.99},{"x":26198016,"y":1.03},{"x":26214400,"y":1.01},{"x":26230784,"y":1.02},{"x":26247168,"y":1.03},{"x":26263552,"y":1.01},{"x":26279936,"y":1.00},{"x":26296320,"y":1.02},{"x":26312704,"y":1.03},{"x":26329088,"y":1.01},{"x":26345472,"y":1.04},{"x":26361856,"y":0.97},{"x":26378240,"y":1.01},{"x":26394624,"y":1.03},{"x":26411008,"y":1.01},{"x":26427392,"y":1.02},{"x":26443776,"y":1.01},{"x":26460160,"y":0.98},{"x":26476544,"y":1.00},{"x":26492928,"y":1.04},{"x":26509312,"y":1.01},{"x":26525696,"y":1.03},{"x":26542080,"y":1.01},{"x":26558464,"y":1.03},{"x":26574848,"y":1.06},{"x":26591232,"y":1.02},{"x":26607616,"y":1.02},{"x":26624000,"y":1.02},{"x":26640384,"y":1.08},{"x":26656768,"y":1.04},{"x":26673152,"y":1.05},{"x":26689536,"y":0.98},{"x":26705920,"y":0.99},{"x":26722304,"y":1.06},{"x":26738688,"y":1.07},{"x":26755072,"y":1.05},{"x":26771456,"y":1.08},{"x":26787840,"y":1.02},{"x":26804224,"y":1.05},{"x":26820608,"y":1.02},{"x":26836992,"y":1.05},{"x":26853376,"y":1.03},{"x":26869760,"y":0.98},{"x":26886144,"y":1.03},{"x":26902528,"y":1.04},{"x":26918912,"y":1.01},{"x":26935296,"y":1.06},{"x":26951680,"y":1.10},{"x":26968064,"y":1.04},{"x":26984448,"y":1.01},{"x":27000832,"y":1.01},{"x":27017216,"y":1.09},{"x":27033600,"y":1.08},{"x":27049984,"y":1.08},{"x":27066368,"y":1.08},{"x":27082752,"y":1.03},{"x":27099136,"y":1.05},{"x":27115520,"y":0.97},{"x":27131904,"y":1.03},{"x":27148288,"y":1.02},{"x":27164672,"y":1.06},{"x":27181056,"y":0.96},{"x":27197440,"y":1.04},{"x":27213824,"y":0.97},{"x":27230208,"y":1.06},{"x":27246592,"y":1.08},{"x":27262976,"y":0.97},{"x":27279360,"y":1.00},{"x":27295744,"y":1.04},{"x":27312128,"y":1.00},{"x":27328512,"y":1.00},{"x":27344896,"y":1.07},{"x":27361280,"y":1.03},{"x":27377664,"y":1.05},{"x":27394048,"y":1.03},{"x":27410432,"y":0.99},{"x":27426816,"y":1.10},{"x":27443200,"y":1.02},{"x":27459584,"y":1.01},{"x":27475968,"y":1.01},{"x":27492352,"y":1.01},{"x":27508736,"y":1.02},{"x":27525120,"y":1.01},{"x":27541504,"y":1.11},{"x":27557888,"y":1.03},{"x":27574272,"y":1.06},{"x":27590656,"y":1.00},{"x":27607040,"y":1.02},{"x":27623424,"y":1.07},{"x":27639808,"y":1.01},{"x":27656192,"y":1.05},{"x":27672576,"y":1.02},{"x":27688960,"y":1.05},{"x":27705344,"y":1.06},{"x":27721728,"y":1.04},{"x":27738112,"y":1.08},{"x":27754496,"y":1.10},{"x":27770880,"y":1.03},{"x":27787264,"y":1.02},{"x":27803648,"y":1.05},{"x":27820032,"y":1.03},{"x":27836416,"y":0.99},{"x":27852800,"y":1.10},{"x":27869184,"y":1.05},{"x":27885568,"y":1.07},{"x":27901952,"y":1.01},{"x":27918336,"y":0.96},{"x":27934720,"y":0.97},{"x":27951104,"y":1.03},{"x":27967488,"y":1.01},{"x":27983872,"y":0.96},{"x":28000256,"y":1.04},{"x":28016640,"y":1.03},{"x":28033024,"y":1.04},{"x":28049408,"y":0.95},{"x":28065792,"y":0.99},{"x":28082176,"y":0.98},{"x":28098560,"y":1.02},{"x":28114944,"y":1.02},{"x":28131328,"y":1.06},{"x":28147712,"y":1.04},{"x":28164096,"y":1.07},{"x":28180480,"y":0.98},{"x":28196864,"y":1.01},{"x":28213248,"y":1.04},{"x":28229632,"y":1.02},{"x":28246016,"y":1.02},{"x":28262400,"y":0.96},{"x":28278784,"y":1.05},{"x":28295168,"y":0.97},{"x":28311552,"y":0.99},{"x":28327936,"y":0.97},{"x":28344320,"y":1.04},{"x":28360704,"y":0.96},{"x":28377088,"y":1.01},{"x":28393472,"y":1.05},{"x":28409856,"y":1.06},{"x":28426240,"y":1.03},{"x":28442624,"y":1.09},{"x":28459008,"y":1.12},{"x":28475392,"y":1.11},{"x":28491776,"y":0.99},{"x":28508160,"y":0.96},{"x":28524544,"y":1.11},{"x":28540928,"y":1.49},{"x":28557312,"y":1.42},{"x":28573696,"y":1.26},{"x":28590080,"y":1.17},{"x":28606464,"y":1.28},{"x":28622848,"y":1.18},{"x":28639232,"y":0.91},{"x":28655616,"y":2.50},{"x":28672000,"y":1.18},{"x":28688384,"y":1.33},{"x":28704768,"y":1.55},{"x":28721152,"y":1.18},{"x":28737536,"y":1.79},{"x":28753920,"y":1.30},{"x":28770304,"y":1.16},{"x":28786688,"y":1.18},{"x":28803072,"y":1.14},{"x":28819456,"y":1.19},{"x":28835840,"y":0.70},{"x":28852224,"y":0.91},{"x":28868608,"y":0.93},{"x":28884992,"y":0.96},{"x":28901376,"y":1.02},{"x":28917760,"y":0.98},{"x":28934144,"y":1.02},{"x":28950528,"y":1.15},{"x":28966912,"y":1.26},{"x":28983296,"y":1.19},{"x":28999680,"y":1.15},{"x":29016064,"y":1.14},{"x":29032448,"y":1.12},{"x":29048832,"y":1.21},{"x":29065216,"y":1.14},{"x":29081600,"y":1.18},{"x":29097984,"y":0.95},{"x":29114368,"y":0.96},{"x":29130752,"y":0.92},{"x":29147136,"y":0.00},{"x":29163520,"y":0.00},{"x":29179904,"y":0.74},{"x":29196288,"y":0.18},{"x":29212672,"y":0.98},{"x":29229056,"y":0.93},{"x":29245440,"y":1.00},{"x":29261824,"y":0.99},{"x":29278208,"y":0.95},{"x":29294592,"y":0.97},{"x":29310976,"y":0.97},{"x":29327360,"y":1.00},{"x":29343744,"y":1.00},{"x":29360128,"y":1.02},{"x":29376512,"y":0.95},{"x":29392896,"y":0.92},{"x":29409280,"y":0.89},{"x":29425664,"y":0.95},{"x":29442048,"y":1.03},{"x":29458432,"y":0.99},{"x":29474816,"y":0.94},{"x":29491200,"y":1.01},{"x":29507584,"y":1.00},{"x":29523968,"y":1.03},{"x":29540352,"y":1.06},{"x":29556736,"y":1.00},{"x":29573120,"y":0.95},{"x":29589504,"y":1.05},{"x":29605888,"y":1.05},{"x":29622272,"y":0.97},{"x":29638656,"y":1.02},{"x":29655040,"y":1.03},{"x":29671424,"y":1.01},{"x":29687808,"y":0.97},{"x":29704192,"y":1.05},{"x":29720576,"y":0.97},{"x":29736960,"y":1.00},{"x":29753344,"y":0.99},{"x":29769728,"y":0.97},{"x":29786112,"y":1.08},{"x":29802496,"y":1.02},{"x":29818880,"y":0.96},{"x":29835264,"y":1.02},{"x":29851648,"y":0.95},{"x":29868032,"y":1.05},{"x":29884416,"y":1.00},{"x":29900800,"y":0.96},{"x":29917184,"y":0.98},{"x":29933568,"y":0.99},{"x":29949952,"y":0.96},{"x":29966336,"y":0.94},{"x":29982720,"y":1.04},{"x":29999104,"y":0.98},{"x":30015488,"y":1.02},{"x":30031872,"y":1.01},{"x":30048256,"y":1.02},{"x":30064640,"y":1.05},{"x":30081024,"y":1.04},{"x":30097408,"y":1.06},{"x":30113792,"y":1.00},{"x":30130176,"y":0.98},{"x":30146560,"y":1.01},{"x":30162944,"y":0.97},{"x":30179328,"y":1.01},{"x":30195712,"y":0.98},{"x":30212096,"y":1.02},{"x":30228480,"y":1.23},{"x":30244864,"y":1.01},{"x":30261248,"y":1.03},{"x":30277632,"y":1.00},{"x":30294016,"y":1.00},{"x":30310400,"y":1.00},{"x":30326784,"y":0.96},{"x":30343168,"y":1.05},{"x":30359552,"y":1.00},{"x":30375936,"y":0.81},{"x":30392320,"y":0.85},{"x":30408704,"y":0.59},{"x":30425088,"y":0.79},{"x":30441472,"y":1.09},{"x":30457856,"y":1.07},{"x":30474240,"y":0.96},{"x":30490624,"y":1.06},{"x":30507008,"y":1.07},{"x":30523392,"y":1.32},{"x":30539776,"y":1.33},{"x":30556160,"y":1.04},{"x":30572544,"y":0.85},{"x":30588928,"y":0.93},{"x":30605312,"y":1.11},{"x":30621696,"y":1.11},{"x":30638080,"y":1.21},{"x":30654464,"y":1.11},{"x":30670848,"y":0.94},{"x":30687232,"y":0.96},{"x":30703616,"y":1.10},{"x":30720000,"y":1.16},{"x":30736384,"y":1.12},{"x":30752768,"y":1.03},{"x":30769152,"y":1.27},{"x":30785536,"y":1.04},{"x":30801920,"y":1.11},{"x":30818304,"y":1.01},{"x":30834688,"y":1.25},{"x":30851072,"y":0.98},{"x":30867456,"y":1.21},{"x":30883840,"y":1.08},{"x":30900224,"y":1.07},{"x":30916608,"y":1.12},{"x":30932992,"y":1.14},{"x":30949376,"y":1.04},{"x":30965760,"y":1.11},{"x":30982144,"y":1.16},{"x":30998528,"y":1.10},{"x":31014912,"y":1.08},{"x":31031296,"y":1.06},{"x":31047680,"y":1.03},{"x":31064064,"y":1.09},{"x":31080448,"y":0.98},{"x":31096832,"y":1.15},{"x":31113216,"y":0.96},{"x":31129600,"y":1.16},{"x":31145984,"y":1.01},{"x":31162368,"y":1.01},{"x":31178752,"y":0.99},{"x":31195136,"y":0.96},{"x":31211520,"y":0.93},{"x":31227904,"y":0.97},{"x":31244288,"y":1.01},{"x":31260672,"y":0.97},{"x":31277056,"y":0.93},{"x":31293440,"y":1.07},{"x":31309824,"y":0.97},{"x":31326208,"y":0.96},{"x":31342592,"y":0.95},{"x":31358976,"y":0.93},{"x":31375360,"y":0.95},{"x":31391744,"y":0.96},{"x":31408128,"y":0.93},{"x":31424512,"y":0.98},{"x":31440896,"y":0.90},{"x":31457280,"y":0.93},{"x":31473664,"y":1.01},{"x":31490048,"y":0.91},{"x":31506432,"y":0.93},{"x":31522816,"y":0.92},{"x":31539200,"y":0.91},{"x":31555584,"y":0.89},{"x":31571968,"y":1.00},{"x":31588352,"y":0.89},{"x":31604736,"y":0.92},{"x":31621120,"y":0.90},{"x":31637504,"y":0.91},{"x":31653888,"y":0.90},{"x":31670272,"y":0.94},{"x":31686656,"y":0.96},{"x":31703040,"y":1.05},{"x":31719424,"y":0.94},{"x":31735808,"y":1.02},{"x":31752192,"y":0.98},{"x":31768576,"y":0.92},{"x":31784960,"y":0.97},{"x":31801344,"y":0.98},{"x":31817728,"y":0.98},{"x":31834112,"y":0.99},{"x":31850496,"y":0.98},{"x":31866880,"y":0.96},{"x":31883264,"y":0.98},{"x":31899648,"y":1.00},{"x":31916032,"y":1.07},{"x":31932416,"y":1.07},{"x":31948800,"y":1.04},{"x":31965184,"y":1.09},{"x":31981568,"y":1.05},{"x":31997952,"y":0.97},{"x":32014336,"y":1.00},{"x":32030720,"y":1.03},{"x":32047104,"y":1.06},{"x":32063488,"y":0.98},{"x":32079872,"y":0.96},{"x":32096256,"y":0.96},{"x":32112640,"y":0.99},{"x":32129024,"y":0.98},{"x":32145408,"y":0.98},{"x":32161792,"y":1.00},{"x":32178176,"y":1.01},{"x":32194560,"y":0.93},{"x":32210944,"y":1.02},{"x":32227328,"y":1.05},{"x":32243712,"y":0.97},{"x":32260096,"y":0.94},{"x":32276480,"y":1.01},{"x":32292864,"y":1.04},{"x":32309248,"y":0.99},{"x":32325632,"y":1.07},{"x":32342016,"y":1.02},{"x":32358400,"y":1.05},{"x":32374784,"y":1.00},{"x":32391168,"y":0.99},{"x":32407552,"y":1.05},{"x":32423936,"y":1.02},{"x":32440320,"y":0.85},{"x":32456704,"y":1.06},{"x":32473088,"y":0.87},{"x":32489472,"y":1.11},{"x":32505856,"y":1.11},{"x":32522240,"y":1.29},{"x":32538624,"y":1.37},{"x":32555008,"y":0.95},{"x":32571392,"y":0.75},{"x":32587776,"y":1.02},{"x":32604160,"y":1.08},{"x":32620544,"y":1.06},{"x":32636928,"y":1.12},{"x":32653312,"y":1.02},{"x":32669696,"y":1.05},{"x":32686080,"y":1.15},{"x":32702464,"y":1.33},{"x":32718848,"y":1.25},{"x":32735232,"y":1.24},{"x":32751616,"y":1.44},{"x":32768000,"y":1.03},{"x":32784384,"y":1.12},{"x":32800768,"y":1.26},{"x":32817152,"y":1.14},{"x":32833536,"y":1.19},{"x":32849920,"y":1.17},{"x":32866304,"y":1.35},{"x":32882688,"y":0.88},{"x":32899072,"y":1.09},{"x":32915456,"y":1.15},{"x":32931840,"y":0.99},{"x":32948224,"y":1.00},{"x":32964608,"y":1.03},{"x":32980992,"y":0.96},{"x":32997376,"y":0.95},{"x":33013760,"y":1.00},{"x":33030144,"y":1.03},{"x":33046528,"y":1.02},{"x":33062912,"y":1.00},{"x":33079296,"y":0.97},{"x":33095680,"y":1.04},{"x":33112064,"y":0.99},{"x":33128448,"y":1.03},{"x":33144832,"y":1.03},{"x":33161216,"y":1.04},{"x":33177600,"y":1.04},{"x":33193984,"y":1.01},{"x":33210368,"y":1.02},{"x":33226752,"y":1.00},{"x":33243136,"y":1.00},{"x":33259520,"y":1.02},{"x":33275904,"y":1.01},{"x":33292288,"y":1.06},{"x":33308672,"y":1.04},{"x":33325056,"y":1.04},{"x":33341440,"y":1.06},{"x":33357824,"y":0.98},{"x":33374208,"y":1.00},{"x":33390592,"y":0.97},{"x":33406976,"y":1.04},{"x":33423360,"y":1.03},{"x":33439744,"y":1.00},{"x":33456128,"y":1.01},{"x":33472512,"y":0.99},{"x":33488896,"y":0.97},{"x":33505280,"y":1.02},{"x":33521664,"y":1.00},{"x":33538048,"y":1.05},{"x":33554432,"y":1.03},{"x":33570816,"y":0.98},{"x":33587200,"y":0.99},{"x":33603584,"y":0.98},{"x":33619968,"y":1.00},{"x":33636352,"y":1.01},{"x":33652736,"y":0.98},{"x":33669120,"y":0.99},{"x":33685504,"y":1.03},{"x":33701888,"y":1.01},{"x":33718272,"y":1.03},{"x":33734656,"y":0.97},{"x":33751040,"y":0.97},{"x":33767424,"y":1.02},{"x":33783808,"y":0.98},{"x":33800192,"y":0.98},{"x":33816576,"y":1.00},{"x":33832960,"y":0.99},{"x":33849344,"y":1.03},{"x":33865728,"y":1.03},{"x":33882112,"y":1.02},{"x":33898496,"y":0.98},{"x":33914880,"y":1.03},{"x":33931264,"y":1.01},{"x":33947648,"y":1.02},{"x":33964032,"y":1.02},{"x":33980416,"y":1.01},{"x":33996800,"y":1.01},{"x":34013184,"y":0.97},{"x":34029568,"y":1.03},{"x":34045952,"y":0.97},{"x":34062336,"y":0.98},{"x":34078720,"y":0.99},{"x":34095104,"y":0.99},{"x":34111488,"y":1.02},{"x":34127872,"y":1.00},{"x":34144256,"y":1.00},{"x":34160640,"y":1.00},{"x":34177024,"y":1.04},{"x":34193408,"y":1.04},{"x":34209792,"y":0.98},{"x":34226176,"y":1.03},{"x":34242560,"y":1.02},{"x":34258944,"y":1.07},{"x":34275328,"y":1.02},{"x":34291712,"y":1.05},{"x":34308096,"y":1.02},{"x":34324480,"y":1.01},{"x":34340864,"y":0.95},{"x":34357248,"y":1.01},{"x":34373632,"y":1.03},{"x":34390016,"y":1.05},{"x":34406400,"y":0.99},{"x":34422784,"y":1.06},{"x":34439168,"y":1.02},{"x":34455552,"y":0.99},{"x":34471936,"y":0.95},{"x":34488320,"y":0.97},{"x":34504704,"y":1.00},{"x":34521088,"y":0.99},{"x":34537472,"y":0.99},{"x":34553856,"y":1.05},{"x":34570240,"y":1.02},{"x":34586624,"y":1.01},{"x":34603008,"y":1.08},{"x":34619392,"y":1.00},{"x":34635776,"y":0.91},{"x":34652160,"y":0.95},{"x":34668544,"y":1.09},{"x":34684928,"y":1.09},{"x":34701312,"y":0.79},{"x":34717696,"y":0.99},{"x":34734080,"y":1.07},{"x":34750464,"y":1.11},{"x":34766848,"y":1.04},{"x":34783232,"y":1.03},{"x":34799616,"y":1.00},{"x":34816000,"y":0.99},{"x":34832384,"y":1.07},{"x":34848768,"y":1.25},{"x":34865152,"y":1.04},{"x":34881536,"y":1.10},{"x":34897920,"y":1.04},{"x":34914304,"y":1.08},{"x":34930688,"y":1.01},{"x":34947072,"y":0.99},{"x":34963456,"y":1.00},{"x":34979840,"y":1.01},{"x":34996224,"y":1.02},{"x":35012608,"y":1.01},{"x":35028992,"y":1.03},{"x":35045376,"y":0.97},{"x":35061760,"y":0.99},{"x":35078144,"y":0.98},{"x":35094528,"y":1.04},{"x":35110912,"y":0.98},{"x":35127296,"y":1.01},{"x":35143680,"y":1.06},{"x":35160064,"y":1.04},{"x":35176448,"y":1.00},{"x":35192832,"y":1.05},{"x":35209216,"y":1.07},{"x":35225600,"y":1.03},{"x":35241984,"y":1.04},{"x":35258368,"y":0.96},{"x":35274752,"y":1.01},{"x":35291136,"y":0.98},{"x":35307520,"y":1.03},{"x":35323904,"y":0.96},{"x":35340288,"y":0.96},{"x":35356672,"y":0.99},{"x":35373056,"y":1.06},{"x":35389440,"y":1.01},{"x":35405824,"y":1.05},{"x":35422208,"y":1.01},{"x":35438592,"y":1.03},{"x":35454976,"y":1.01},{"x":35471360,"y":1.03},{"x":35487744,"y":1.05},{"x":35504128,"y":1.02},{"x":35520512,"y":0.93},{"x":35536896,"y":1.08},{"x":35553280,"y":1.05},{"x":35569664,"y":1.01},{"x":35586048,"y":1.02},{"x":35602432,"y":1.07},{"x":35618816,"y":1.04},{"x":35635200,"y":1.04},{"x":35651584,"y":1.00},{"x":35667968,"y":1.06},{"x":35684352,"y":1.03},{"x":35700736,"y":1.01},{"x":35717120,"y":1.03},{"x":35733504,"y":1.10},{"x":35749888,"y":1.03},{"x":35766272,"y":1.08},{"x":35782656,"y":1.03},{"x":35799040,"y":1.08},{"x":35815424,"y":1.04},{"x":35831808,"y":1.00},{"x":35848192,"y":1.07},{"x":35864576,"y":1.01},{"x":35880960,"y":1.03},{"x":35897344,"y":1.05},{"x":35913728,"y":1.02},{"x":35930112,"y":1.04},{"x":35946496,"y":1.05},{"x":35962880,"y":1.00},{"x":35979264,"y":1.02},{"x":35995648,"y":1.02},{"x":36012032,"y":1.02},{"x":36028416,"y":1.03},{"x":36044800,"y":1.06},{"x":36061184,"y":1.00},{"x":36077568,"y":1.10},{"x":36093952,"y":1.07},{"x":36110336,"y":1.01},{"x":36126720,"y":1.02},{"x":36143104,"y":1.00},{"x":36159488,"y":1.00},{"x":36175872,"y":1.02},{"x":36192256,"y":1.00},{"x":36208640,"y":1.02},{"x":36225024,"y":1.03},{"x":36241408,"y":1.01},{"x":36257792,"y":1.00},{"x":36274176,"y":1.04},{"x":36290560,"y":1.03},{"x":36306944,"y":1.00},{"x":36323328,"y":1.06},{"x":36339712,"y":1.02},{"x":36356096,"y":1.05},{"x":36372480,"y":1.04},{"x":36388864,"y":1.06},{"x":36405248,"y":1.06},{"x":36421632,"y":1.06},{"x":36438016,"y":1.04},{"x":36454400,"y":1.01},{"x":36470784,"y":1.08},{"x":36487168,"y":1.04},{"x":36503552,"y":1.04},{"x":36519936,"y":1.06},{"x":36536320,"y":1.03},{"x":36552704,"y":1.12},{"x":36569088,"y":1.02},{"x":36585472,"y":1.06},{"x":36601856,"y":1.09},{"x":36618240,"y":1.02},{"x":36634624,"y":1.04},{"x":36651008,"y":1.06},{"x":36667392,"y":1.04},{"x":36683776,"y":1.08},{"x":36700160,"y":1.03},{"x":36716544,"y":1.02},{"x":36732928,"y":1.05},{"x":36749312,"y":1.07},{"x":36765696,"y":1.09},{"x":36782080,"y":1.03},{"x":36798464,"y":1.03},{"x":36814848,"y":1.00},{"x":36831232,"y":1.04},{"x":36847616,"y":1.02},{"x":36864000,"y":1.03},{"x":36880384,"y":1.05},{"x":36896768,"y":1.01},{"x":36913152,"y":1.05},{"x":36929536,"y":1.04},{"x":36945920,"y":1.09},{"x":36962304,"y":1.04},{"x":36978688,"y":1.06},{"x":36995072,"y":1.05},{"x":37011456,"y":1.10},{"x":37027840,"y":1.02},{"x":37044224,"y":1.02},{"x":37060608,"y":1.02},{"x":37076992,"y":1.05},{"x":37093376,"y":1.01},{"x":37109760,"y":1.00},{"x":37126144,"y":1.05},{"x":37142528,"y":1.07},{"x":37158912,"y":1.00},{"x":37175296,"y":1.05},{"x":37191680,"y":1.05},{"x":37208064,"y":1.02},{"x":37224448,"y":1.05},{"x":37240832,"y":1.05},{"x":37257216,"y":1.02},{"x":37273600,"y":1.02},{"x":37289984,"y":1.04},{"x":37306368,"y":1.03},{"x":37322752,"y":1.02},{"x":37339136,"y":1.03},{"x":37355520,"y":1.01},{"x":37371904,"y":1.01},{"x":37388288,"y":0.98},{"x":37404672,"y":1.05},{"x":37421056,"y":1.04},{"x":37437440,"y":1.03},{"x":37453824,"y":1.01},{"x":37470208,"y":1.07},{"x":37486592,"y":1.06},{"x":37502976,"y":1.03},{"x":37519360,"y":1.06},{"x":37535744,"y":1.06},{"x":37552128,"y":1.01},{"x":37568512,"y":1.03},{"x":37584896,"y":1.08},{"x":37601280,"y":1.05},{"x":37617664,"y":1.04},{"x":37634048,"y":1.02},{"x":37650432,"y":1.05},{"x":37666816,"y":1.01},{"x":37683200,"y":1.08},{"x":37699584,"y":1.04},{"x":37715968,"y":1.06},{"x":37732352,"y":1.05},{"x":37748736,"y":1.06},{"x":37765120,"y":1.04},{"x":37781504,"y":1.00},{"x":37797888,"y":1.06},{"x":37814272,"y":1.01},{"x":37830656,"y":1.06},{"x":37847040,"y":1.07},{"x":37863424,"y":1.01},{"x":37879808,"y":1.01},{"x":37896192,"y":1.02},{"x":37912576,"y":1.01},{"x":37928960,"y":1.02},{"x":37945344,"y":1.02},{"x":37961728,"y":1.01},{"x":37978112,"y":1.01},{"x":37994496,"y":0.98},{"x":38010880,"y":1.05},{"x":38027264,"y":1.00},{"x":38043648,"y":1.02},{"x":38060032,"y":1.02},{"x":38076416,"y":1.07},{"x":38092800,"y":1.01},{"x":38109184,"y":1.04},{"x":38125568,"y":1.07},{"x":38141952,"y":1.05},{"x":38158336,"y":1.02},{"x":38174720,"y":1.00},{"x":38191104,"y":0.99},{"x":38207488,"y":1.04},{"x":38223872,"y":0.99},{"x":38240256,"y":1.04},{"x":38256640,"y":0.98},{"x":38273024,"y":1.01},{"x":38289408,"y":0.99},{"x":38305792,"y":1.00},{"x":38322176,"y":1.03},{"x":38338560,"y":0.97},{"x":38354944,"y":1.02},{"x":38371328,"y":1.00},{"x":38387712,"y":1.00},{"x":38404096,"y":1.04},{"x":38420480,"y":1.03},{"x":38436864,"y":1.06},{"x":38453248,"y":0.98},{"x":38469632,"y":1.08},{"x":38486016,"y":0.98},{"x":38502400,"y":1.03},{"x":38518784,"y":1.05},{"x":38535168,"y":0.97},{"x":38551552,"y":1.08},{"x":38567936,"y":1.06},{"x":38584320,"y":1.03},{"x":38600704,"y":1.08},{"x":38617088,"y":1.03},{"x":38633472,"y":1.10},{"x":38649856,"y":1.00},{"x":38666240,"y":1.06},{"x":38682624,"y":1.05},{"x":38699008,"y":1.02},{"x":38715392,"y":1.01},{"x":38731776,"y":1.02},{"x":38748160,"y":1.03},{"x":38764544,"y":1.03},{"x":38780928,"y":0.98},{"x":38797312,"y":1.02},{"x":38813696,"y":0.97},{"x":38830080,"y":1.00},{"x":38846464,"y":0.95},{"x":38862848,"y":1.05},{"x":38879232,"y":0.96},{"x":38895616,"y":0.98},{"x":38912000,"y":1.02},{"x":38928384,"y":1.00},{"x":38944768,"y":0.96},{"x":38961152,"y":0.97},{"x":38977536,"y":1.00},{"x":38993920,"y":1.00},{"x":39010304,"y":1.00},{"x":39026688,"y":1.01},{"x":39043072,"y":1.02},{"x":39059456,"y":0.99},{"x":39075840,"y":1.05},{"x":39092224,"y":0.98},{"x":39108608,"y":0.98},{"x":39124992,"y":1.01},{"x":39141376,"y":1.00},{"x":39157760,"y":0.97},{"x":39174144,"y":1.01},{"x":39190528,"y":1.01},{"x":39206912,"y":1.02},{"x":39223296,"y":1.03},{"x":39239680,"y":1.09},{"x":39256064,"y":1.04},{"x":39272448,"y":1.05},{"x":39288832,"y":0.99},{"x":39305216,"y":0.98},{"x":39321600,"y":1.04},{"x":39337984,"y":0.99},{"x":39354368,"y":1.05},{"x":39370752,"y":0.99},{"x":39387136,"y":1.02},{"x":39403520,"y":0.99},{"x":39419904,"y":1.04},{"x":39436288,"y":1.01},{"x":39452672,"y":0.99},{"x":39469056,"y":1.00},{"x":39485440,"y":1.01},{"x":39501824,"y":1.08},{"x":39518208,"y":1.03},{"x":39534592,"y":1.00},{"x":39550976,"y":0.99},{"x":39567360,"y":1.02},{"x":39583744,"y":0.97},{"x":39600128,"y":0.98},{"x":39616512,"y":0.99},{"x":39632896,"y":0.98},{"x":39649280,"y":0.98},{"x":39665664,"y":1.01},{"x":39682048,"y":0.99},{"x":39698432,"y":1.00},{"x":39714816,"y":1.02},{"x":39731200,"y":0.95},{"x":39747584,"y":0.94},{"x":39763968,"y":1.00},{"x":39780352,"y":0.98},{"x":39796736,"y":0.97},{"x":39813120,"y":0.93},{"x":39829504,"y":0.97},{"x":39845888,"y":0.99},{"x":39862272,"y":0.93},{"x":39878656,"y":1.02},{"x":39895040,"y":1.01},{"x":39911424,"y":0.96},{"x":39927808,"y":1.03},{"x":39944192,"y":1.01},{"x":39960576,"y":1.02},{"x":39976960,"y":0.99},{"x":39993344,"y":0.98},{"x":40009728,"y":1.00},{"x":40026112,"y":1.00},{"x":40042496,"y":1.00},{"x":40058880,"y":0.97},{"x":40075264,"y":0.96},{"x":40091648,"y":0.97},{"x":40108032,"y":0.94},{"x":40124416,"y":0.98},{"x":40140800,"y":1.01},{"x":40157184,"y":0.96},{"x":40173568,"y":0.99},{"x":40189952,"y":0.96},{"x":40206336,"y":0.96},{"x":40222720,"y":1.00},{"x":40239104,"y":1.00},{"x":40255488,"y":1.00},{"x":40271872,"y":0.98},{"x":40288256,"y":1.00},{"x":40304640,"y":0.95},{"x":40321024,"y":0.97},{"x":40337408,"y":0.97},{"x":40353792,"y":0.91},{"x":40370176,"y":0.93},{"x":40386560,"y":0.91},{"x":40402944,"y":0.95},{"x":40419328,"y":0.98},{"x":40435712,"y":0.92},{"x":40452096,"y":0.95},{"x":40468480,"y":0.99},{"x":40484864,"y":0.96},{"x":40501248,"y":0.97},{"x":40517632,"y":0.87},{"x":40534016,"y":0.88},{"x":40550400,"y":0.93},{"x":40566784,"y":0.82},{"x":40583168,"y":0.86},{"x":40599552,"y":0.91},{"x":40615936,"y":0.87},{"x":40632320,"y":0.87},{"x":40648704,"y":0.84},{"x":40665088,"y":0.89},{"x":40681472,"y":0.92},{"x":40697856,"y":0.85},{"x":40714240,"y":0.87},{"x":40730624,"y":0.90},{"x":40747008,"y":0.83},{"x":40763392,"y":0.89},{"x":40779776,"y":0.91},{"x":40796160,"y":0.87},{"x":40812544,"y":0.93},{"x":40828928,"y":0.89},{"x":40845312,"y":0.91},{"x":40861696,"y":0.91},{"x":40878080,"y":0.91},{"x":40894464,"y":0.93},{"x":40910848,"y":0.92},{"x":40927232,"y":0.95},{"x":40943616,"y":0.95},{"x":40960000,"y":1.01},{"x":40976384,"y":0.93},{"x":40992768,"y":0.92},{"x":41009152,"y":0.95},{"x":41025536,"y":0.88},{"x":41041920,"y":0.85},{"x":41058304,"y":0.85},{"x":41074688,"y":0.92},{"x":41091072,"y":0.87},{"x":41107456,"y":0.92},{"x":41123840,"y":0.87},{"x":41140224,"y":0.87},{"x":41156608,"y":0.85},{"x":41172992,"y":0.84},{"x":41189376,"y":0.87},{"x":41205760,"y":0.83},{"x":41222144,"y":0.84},{"x":41238528,"y":0.84},{"x":41254912,"y":0.88},{"x":41271296,"y":0.88},{"x":41287680,"y":0.95},{"x":41304064,"y":0.91},{"x":41320448,"y":0.96},{"x":41336832,"y":0.92},{"x":41353216,"y":0.94},{"x":41369600,"y":0.90},{"x":41385984,"y":0.94},{"x":41402368,"y":0.90},{"x":41418752,"y":0.90},{"x":41435136,"y":0.89},{"x":41451520,"y":0.94},{"x":41467904,"y":0.91},{"x":41484288,"y":0.91},{"x":41500672,"y":0.90},{"x":41517056,"y":0.90},{"x":41533440,"y":0.90},{"x":41549824,"y":0.87},{"x":41566208,"y":0.87},{"x":41582592,"y":0.94},{"x":41598976,"y":0.91},{"x":41615360,"y":0.92},{"x":41631744,"y":0.84},{"x":41648128,"y":0.92},{"x":41664512,"y":0.99},{"x":41680896,"y":0.90},{"x":41697280,"y":0.89},{"x":41713664,"y":1.02},{"x":41730048,"y":0.88},{"x":41746432,"y":0.93},{"x":41762816,"y":0.89},{"x":41779200,"y":0.85},{"x":41795584,"y":0.86},{"x":41811968,"y":0.83},{"x":41828352,"y":0.91},{"x":41844736,"y":0.89},{"x":41861120,"y":0.87},{"x":41877504,"y":0.93},{"x":41893888,"y":0.89},{"x":41910272,"y":0.91},{"x":41926656,"y":0.91},{"x":41943040,"y":0.93},{"x":41959424,"y":0.96},{"x":41975808,"y":0.95},{"x":41992192,"y":0.92},{"x":42008576,"y":0.94},{"x":42024960,"y":0.93},{"x":42041344,"y":0.95},{"x":42057728,"y":0.91},{"x":42074112,"y":0.91},{"x":42090496,"y":0.87},{"x":42106880,"y":0.85},{"x":42123264,"y":0.88},{"x":42139648,"y":0.81},{"x":42156032,"y":0.83},{"x":42172416,"y":0.87},{"x":42188800,"y":0.86},{"x":42205184,"y":0.90},{"x":42221568,"y":0.87},{"x":42237952,"y":0.90},{"x":42254336,"y":0.93},{"x":42270720,"y":0.92},{"x":42287104,"y":0.93},{"x":42303488,"y":0.86},{"x":42319872,"y":0.94},{"x":42336256,"y":0.91},{"x":42352640,"y":0.87},{"x":42369024,"y":0.92},{"x":42385408,"y":0.92},{"x":42401792,"y":0.96},{"x":42418176,"y":0.92},{"x":42434560,"y":0.85},{"x":42450944,"y":0.91},{"x":42467328,"y":0.97},{"x":42483712,"y":0.93},{"x":42500096,"y":0.92},{"x":42516480,"y":0.96},{"x":42532864,"y":0.98},{"x":42549248,"y":0.98},{"x":42565632,"y":0.93},{"x":42582016,"y":1.01},{"x":42598400,"y":0.99},{"x":42614784,"y":0.97},{"x":42631168,"y":0.91},{"x":42647552,"y":0.92},{"x":42663936,"y":0.89},{"x":42680320,"y":0.88},{"x":42696704,"y":0.88},{"x":42713088,"y":0.93},{"x":42729472,"y":0.93},{"x":42745856,"y":0.94},{"x":42762240,"y":0.95},{"x":42778624,"y":0.88},{"x":42795008,"y":0.91},{"x":42811392,"y":0.98},{"x":42827776,"y":0.92},{"x":42844160,"y":0.93},{"x":42860544,"y":0.94},{"x":42876928,"y":0.93},{"x":42893312,"y":0.90},{"x":42909696,"y":0.93},{"x":42926080,"y":0.91},{"x":42942464,"y":0.98},{"x":42958848,"y":0.94},{"x":42975232,"y":0.89},{"x":42991616,"y":0.94},{"x":43008000,"y":0.89},{"x":43024384,"y":0.92},{"x":43040768,"y":0.93},{"x":43057152,"y":0.94},{"x":43073536,"y":0.98},{"x":43089920,"y":0.93},{"x":43106304,"y":0.98},{"x":43122688,"y":0.97},{"x":43139072,"y":0.95},{"x":43155456,"y":0.96},{"x":43171840,"y":0.93},{"x":43188224,"y":0.94},{"x":43204608,"y":0.93},{"x":43220992,"y":0.93},{"x":43237376,"y":0.96},{"x":43253760,"y":0.97},{"x":43270144,"y":0.94},{"x":43286528,"y":1.00},{"x":43302912,"y":1.03},{"x":43319296,"y":0.94},{"x":43335680,"y":0.97},{"x":43352064,"y":0.96},{"x":43368448,"y":0.98},{"x":43384832,"y":0.94},{"x":43401216,"y":0.96},{"x":43417600,"y":0.92},{"x":43433984,"y":0.97},{"x":43450368,"y":0.96},{"x":43466752,"y":0.95},{"x":43483136,"y":0.93},{"x":43499520,"y":0.91},{"x":43515904,"y":0.95},{"x":43532288,"y":0.95},{"x":43548672,"y":0.94},{"x":43565056,"y":0.88},{"x":43581440,"y":0.95},{"x":43597824,"y":0.92},{"x":43614208,"y":0.95},{"x":43630592,"y":0.96},{"x":43646976,"y":0.93},{"x":43663360,"y":0.93},{"x":43679744,"y":0.93},{"x":43696128,"y":0.96},{"x":43712512,"y":0.94},{"x":43728896,"y":0.99},{"x":43745280,"y":0.94},{"x":43761664,"y":1.00},{"x":43778048,"y":0.93},{"x":43794432,"y":0.90},{"x":43810816,"y":0.90},{"x":43827200,"y":0.96},{"x":43843584,"y":0.99},{"x":43859968,"y":0.99},{"x":43876352,"y":1.01},{"x":43892736,"y":0.95},{"x":43909120,"y":0.98},{"x":43925504,"y":0.98},{"x":43941888,"y":1.01},{"x":43958272,"y":1.00},{"x":43974656,"y":1.01},{"x":43991040,"y":0.96},{"x":44007424,"y":0.98},{"x":44023808,"y":0.96},{"x":44040192,"y":0.99},{"x":44056576,"y":0.91},{"x":44072960,"y":0.91},{"x":44089344,"y":0.90},{"x":44105728,"y":0.91},{"x":44122112,"y":0.97},{"x":44138496,"y":0.93},{"x":44154880,"y":0.96},{"x":44171264,"y":0.92},{"x":44187648,"y":0.88},{"x":44204032,"y":0.92},{"x":44220416,"y":0.89},{"x":44236800,"y":0.95},{"x":44253184,"y":0.99},{"x":44269568,"y":0.91},{"x":44285952,"y":0.97},{"x":44302336,"y":0.96},{"x":44318720,"y":0.96},{"x":44335104,"y":0.97},{"x":44351488,"y":0.97},{"x":44367872,"y":0.95},{"x":44384256,"y":1.00},{"x":44400640,"y":0.97},{"x":44417024,"y":0.96},{"x":44433408,"y":0.97},{"x":44449792,"y":0.98},{"x":44466176,"y":0.95},{"x":44482560,"y":0.94},{"x":44498944,"y":0.94},{"x":44515328,"y":0.95},{"x":44531712,"y":0.94},{"x":44548096,"y":0.96},{"x":44564480,"y":0.89},{"x":44580864,"y":0.96},{"x":44597248,"y":0.92},{"x":44613632,"y":0.98},{"x":44630016,"y":0.92},{"x":44646400,"y":0.99},{"x":44662784,"y":0.93},{"x":44679168,"y":0.95},{"x":44695552,"y":0.95},{"x":44711936,"y":0.88},{"x":44728320,"y":0.93},{"x":44744704,"y":1.00},{"x":44761088,"y":0.93},{"x":44777472,"y":0.93},{"x":44793856,"y":0.94},{"x":44810240,"y":0.93},{"x":44826624,"y":0.92},{"x":44843008,"y":0.91},{"x":44859392,"y":0.89},{"x":44875776,"y":0.91},{"x":44892160,"y":0.96},{"x":44908544,"y":0.92},{"x":44924928,"y":0.95},{"x":44941312,"y":0.91},{"x":44957696,"y":0.90},{"x":44974080,"y":0.95},{"x":44990464,"y":0.93},{"x":45006848,"y":0.93},{"x":45023232,"y":0.95},{"x":45039616,"y":0.94},{"x":45056000,"y":0.95},{"x":45072384,"y":0.94},{"x":45088768,"y":0.96},{"x":45105152,"y":1.00},{"x":45121536,"y":0.94},{"x":45137920,"y":0.94},{"x":45154304,"y":0.93},{"x":45170688,"y":1.01},{"x":45187072,"y":0.99},{"x":45203456,"y":1.01},{"x":45219840,"y":1.00},{"x":45236224,"y":1.03},{"x":45252608,"y":1.00},{"x":45268992,"y":1.02},{"x":45285376,"y":0.98},{"x":45301760,"y":0.96},{"x":45318144,"y":0.98},{"x":45334528,"y":0.99},{"x":45350912,"y":0.99},{"x":45367296,"y":0.96},{"x":45383680,"y":0.91},{"x":45400064,"y":0.86},{"x":45416448,"y":0.96},{"x":45432832,"y":0.88},{"x":45449216,"y":0.93},{"x":45465600,"y":0.91},{"x":45481984,"y":0.94},{"x":45498368,"y":0.94},{"x":45514752,"y":0.98},{"x":45531136,"y":1.00},{"x":45547520,"y":1.01},{"x":45563904,"y":0.97},{"x":45580288,"y":0.97},{"x":45596672,"y":0.99},{"x":45613056,"y":0.94},{"x":45629440,"y":0.95},{"x":45645824,"y":1.00},{"x":45662208,"y":0.96},{"x":45678592,"y":0.94},{"x":45694976,"y":1.00},{"x":45711360,"y":1.00},{"x":45727744,"y":0.91},{"x":45744128,"y":1.14},{"x":45760512,"y":0.97},{"x":45776896,"y":1.00},{"x":45793280,"y":0.98},{"x":45809664,"y":0.95},{"x":45826048,"y":0.97},{"x":45842432,"y":0.96},{"x":45858816,"y":0.96},{"x":45875200,"y":0.99},{"x":45891584,"y":0.99},{"x":45907968,"y":0.93},{"x":45924352,"y":0.93},{"x":45940736,"y":0.95},{"x":45957120,"y":0.98},{"x":45973504,"y":0.99},{"x":45989888,"y":1.02},{"x":46006272,"y":0.97},{"x":46022656,"y":0.95},{"x":46039040,"y":1.05},{"x":46055424,"y":1.02},{"x":46071808,"y":1.01},{"x":46088192,"y":0.98},{"x":46104576,"y":1.04},{"x":46120960,"y":0.99},{"x":46137344,"y":1.01},{"x":46153728,"y":1.02},{"x":46170112,"y":0.96},{"x":46186496,"y":1.03},{"x":46202880,"y":1.03},{"x":46219264,"y":1.01},{"x":46235648,"y":1.02},{"x":46252032,"y":1.02},{"x":46268416,"y":1.01},{"x":46284800,"y":1.04},{"x":46301184,"y":1.06},{"x":46317568,"y":0.99},{"x":46333952,"y":1.06},{"x":46350336,"y":1.01},{"x":46366720,"y":1.02},{"x":46383104,"y":1.03},{"x":46399488,"y":1.01},{"x":46415872,"y":1.05},{"x":46432256,"y":1.03},{"x":46448640,"y":1.05},{"x":46465024,"y":1.02},{"x":46481408,"y":1.05},{"x":46497792,"y":1.03},{"x":46514176,"y":0.94},{"x":46530560,"y":1.03},{"x":46546944,"y":1.03},{"x":46563328,"y":1.03},{"x":46579712,"y":1.01},{"x":46596096,"y":0.99},{"x":46612480,"y":1.03},{"x":46628864,"y":1.02},{"x":46645248,"y":1.04},{"x":46661632,"y":1.02},{"x":46678016,"y":1.05},{"x":46694400,"y":1.03},{"x":46710784,"y":1.05},{"x":46727168,"y":1.01},{"x":46743552,"y":1.00},{"x":46759936,"y":1.05},{"x":46776320,"y":1.03},{"x":46792704,"y":1.03},{"x":46809088,"y":1.05},{"x":46825472,"y":1.04},{"x":46841856,"y":1.02},{"x":46858240,"y":1.06},{"x":46874624,"y":1.02},{"x":46891008,"y":1.05},{"x":46907392,"y":1.08},{"x":46923776,"y":1.03},{"x":46940160,"y":1.03},{"x":46956544,"y":1.03},{"x":46972928,"y":1.04},{"x":46989312,"y":1.05},{"x":47005696,"y":1.07},{"x":47022080,"y":1.07},{"x":47038464,"y":1.05},{"x":47054848,"y":1.01},{"x":47071232,"y":0.99},{"x":47087616,"y":1.09},{"x":47104000,"y":1.04},{"x":47120384,"y":1.04},{"x":47136768,"y":1.02},{"x":47153152,"y":1.04},{"x":47169536,"y":1.07},{"x":47185920,"y":1.02},{"x":47202304,"y":1.07},{"x":47218688,"y":1.07},{"x":47235072,"y":1.04},{"x":47251456,"y":1.10},{"x":47267840,"y":1.03},{"x":47284224,"y":1.04},{"x":47300608,"y":1.04},{"x":47316992,"y":1.04},{"x":47333376,"y":1.08},{"x":47349760,"y":1.13},{"x":47366144,"y":1.18},{"x":47382528,"y":1.13},{"x":47398912,"y":1.05},{"x":47415296,"y":1.06},{"x":47431680,"y":1.07},{"x":47448064,"y":1.07},{"x":47464448,"y":1.06},{"x":47480832,"y":1.06},{"x":47497216,"y":1.01},{"x":47513600,"y":1.03},{"x":47529984,"y":1.04},{"x":47546368,"y":1.05},{"x":47562752,"y":1.01},{"x":47579136,"y":1.00},{"x":47595520,"y":1.00},{"x":47611904,"y":1.01},{"x":47628288,"y":1.04},{"x":47644672,"y":1.01},{"x":47661056,"y":1.03},{"x":47677440,"y":1.03},{"x":47693824,"y":1.02},{"x":47710208,"y":1.02},{"x":47726592,"y":1.00},{"x":47742976,"y":1.03},{"x":47759360,"y":1.01},{"x":47775744,"y":0.99},{"x":47792128,"y":0.97},{"x":47808512,"y":1.01},{"x":47824896,"y":1.03},{"x":47841280,"y":0.99},{"x":47857664,"y":1.05},{"x":47874048,"y":1.03},{"x":47890432,"y":1.02},{"x":47906816,"y":1.05},{"x":47923200,"y":1.05},{"x":47939584,"y":1.07},{"x":47955968,"y":1.02},{"x":47972352,"y":1.02},{"x":47988736,"y":1.04},{"x":48005120,"y":0.97},{"x":48021504,"y":1.02},{"x":48037888,"y":1.02},{"x":48054272,"y":1.03},{"x":48070656,"y":1.01},{"x":48087040,"y":1.00},{"x":48103424,"y":1.01},{"x":48119808,"y":1.06},{"x":48136192,"y":1.02},{"x":48152576,"y":0.98},{"x":48168960,"y":0.99},{"x":48185344,"y":1.03},{"x":48201728,"y":1.00},{"x":48218112,"y":1.05},{"x":48234496,"y":1.01},{"x":48250880,"y":0.98},{"x":48267264,"y":1.06},{"x":48283648,"y":0.99},{"x":48300032,"y":1.04},{"x":48316416,"y":0.97},{"x":48332800,"y":1.04},{"x":48349184,"y":0.98},{"x":48365568,"y":0.99},{"x":48381952,"y":0.98},{"x":48398336,"y":1.03},{"x":48414720,"y":1.02},{"x":48431104,"y":1.04},{"x":48447488,"y":1.04},{"x":48463872,"y":1.05},{"x":48480256,"y":1.03},{"x":48496640,"y":1.03},{"x":48513024,"y":1.04},{"x":48529408,"y":0.98},{"x":48545792,"y":1.03},{"x":48562176,"y":1.02},{"x":48578560,"y":1.03},{"x":48594944,"y":1.00},{"x":48611328,"y":0.96},{"x":48627712,"y":1.03},{"x":48644096,"y":0.98},{"x":48660480,"y":0.98},{"x":48676864,"y":0.94},{"x":48693248,"y":0.99},{"x":48709632,"y":1.00},{"x":48726016,"y":1.02},{"x":48742400,"y":1.03},{"x":48758784,"y":1.00},{"x":48775168,"y":0.98},{"x":48791552,"y":1.01},{"x":48807936,"y":1.00},{"x":48824320,"y":1.01},{"x":48840704,"y":0.97},{"x":48857088,"y":1.06},{"x":48873472,"y":1.03},{"x":48889856,"y":0.98},{"x":48906240,"y":1.03},{"x":48922624,"y":0.99},{"x":48939008,"y":1.02},{"x":48955392,"y":1.00},{"x":48971776,"y":1.02},{"x":48988160,"y":1.02},{"x":49004544,"y":1.02},{"x":49020928,"y":1.01},{"x":49037312,"y":1.04},{"x":49053696,"y":1.06},{"x":49070080,"y":1.00},{"x":49086464,"y":1.07},{"x":49102848,"y":0.98},{"x":49119232,"y":1.00},{"x":49135616,"y":1.01},{"x":49152000,"y":1.02},{"x":49168384,"y":1.00},{"x":49184768,"y":1.00},{"x":49201152,"y":1.02},{"x":49217536,"y":1.04},{"x":49233920,"y":1.02},{"x":49250304,"y":0.98},{"x":49266688,"y":0.98},{"x":49283072,"y":1.03},{"x":49299456,"y":1.02},{"x":49315840,"y":1.06},{"x":49332224,"y":0.98},{"x":49348608,"y":1.00},{"x":49364992,"y":0.98},{"x":49381376,"y":0.98},{"x":49397760,"y":1.02},{"x":49414144,"y":1.05},{"x":49430528,"y":1.08},{"x":49446912,"y":0.99},{"x":49463296,"y":1.02},{"x":49479680,"y":1.04},{"x":49496064,"y":1.00},{"x":49512448,"y":1.02},{"x":49528832,"y":1.00},{"x":49545216,"y":0.90},{"x":49561600,"y":0.99},{"x":49577984,"y":1.01},{"x":49594368,"y":1.01},{"x":49610752,"y":0.96},{"x":49627136,"y":1.02},{"x":49643520,"y":1.01},{"x":49659904,"y":1.09},{"x":49676288,"y":1.00},{"x":49692672,"y":0.99},{"x":49709056,"y":1.01},{"x":49725440,"y":0.95},{"x":49741824,"y":1.03},{"x":49758208,"y":1.10},{"x":49774592,"y":1.06},{"x":49790976,"y":1.02},{"x":49807360,"y":0.99},{"x":49823744,"y":1.05},{"x":49840128,"y":1.01},{"x":49856512,"y":1.01},{"x":49872896,"y":1.03},{"x":49889280,"y":1.04},{"x":49905664,"y":0.98},{"x":49922048,"y":1.02},{"x":49938432,"y":1.02},{"x":49954816,"y":0.97},{"x":49971200,"y":1.01},{"x":49987584,"y":0.97},{"x":50003968,"y":0.99},{"x":50020352,"y":0.99},{"x":50036736,"y":1.03},{"x":50053120,"y":1.00},{"x":50069504,"y":1.02},{"x":50085888,"y":1.03},{"x":50102272,"y":1.01},{"x":50118656,"y":1.00},{"x":50135040,"y":0.98},{"x":50151424,"y":1.02},{"x":50167808,"y":0.96},{"x":50184192,"y":1.01},{"x":50200576,"y":1.02},{"x":50216960,"y":0.99},{"x":50233344,"y":1.02},{"x":50249728,"y":1.01},{"x":50266112,"y":0.99},{"x":50282496,"y":0.96},{"x":50298880,"y":0.98},{"x":50315264,"y":0.98},{"x":50331648,"y":0.97},{"x":50348032,"y":0.99},{"x":50364416,"y":1.00},{"x":50380800,"y":0.98},{"x":50397184,"y":0.93},{"x":50413568,"y":1.00},{"x":50429952,"y":0.98},{"x":50446336,"y":1.03},{"x":50462720,"y":0.96},{"x":50479104,"y":0.96},{"x":50495488,"y":0.95},{"x":50511872,"y":0.98},{"x":50528256,"y":0.95},{"x":50544640,"y":0.92},{"x":50561024,"y":0.99},{"x":50577408,"y":0.96},{"x":50593792,"y":0.96},{"x":50610176,"y":0.96},{"x":50626560,"y":0.95},{"x":50642944,"y":0.94},{"x":50659328,"y":0.98},{"x":50675712,"y":0.90},{"x":50692096,"y":0.97},{"x":50708480,"y":0.98},{"x":50724864,"y":0.97},{"x":50741248,"y":0.95},{"x":50757632,"y":0.96},{"x":50774016,"y":0.96},{"x":50790400,"y":0.97},{"x":50806784,"y":0.96},{"x":50823168,"y":1.01},{"x":50839552,"y":0.99},{"x":50855936,"y":1.01},{"x":50872320,"y":1.00},{"x":50888704,"y":0.99},{"x":50905088,"y":1.00},{"x":50921472,"y":1.00},{"x":50937856,"y":0.98},{"x":50954240,"y":0.93},{"x":50970624,"y":0.92},{"x":50987008,"y":0.99},{"x":51003392,"y":0.95},{"x":51019776,"y":1.00},{"x":51036160,"y":0.98},{"x":51052544,"y":0.90},{"x":51068928,"y":0.91},{"x":51085312,"y":0.95},{"x":51101696,"y":0.99},{"x":51118080,"y":1.02},{"x":51134464,"y":0.95},{"x":51150848,"y":0.96},{"x":51167232,"y":0.97},{"x":51183616,"y":1.00},{"x":51200000,"y":0.95},{"x":51216384,"y":1.00},{"x":51232768,"y":1.02},{"x":51249152,"y":0.99},{"x":51265536,"y":1.02},{"x":51281920,"y":1.01},{"x":51298304,"y":0.98},{"x":51314688,"y":1.01},{"x":51331072,"y":0.98},{"x":51347456,"y":0.92},{"x":51363840,"y":1.00},{"x":51380224,"y":0.96},{"x":51396608,"y":0.94},{"x":51412992,"y":0.95},{"x":51429376,"y":1.01},{"x":51445760,"y":0.95},{"x":51462144,"y":0.98},{"x":51478528,"y":0.95},{"x":51494912,"y":0.95},{"x":51511296,"y":0.96},{"x":51527680,"y":0.97},{"x":51544064,"y":0.96},{"x":51560448,"y":1.01},{"x":51576832,"y":0.91},{"x":51593216,"y":0.96},{"x":51609600,"y":0.96},{"x":51625984,"y":0.95},{"x":51642368,"y":0.96},{"x":51658752,"y":0.91},{"x":51675136,"y":0.95},{"x":51691520,"y":0.95},{"x":51707904,"y":1.07},{"x":51724288,"y":0.98},{"x":51740672,"y":0.99},{"x":51757056,"y":1.04},{"x":51773440,"y":1.04},{"x":51789824,"y":1.01},{"x":51806208,"y":1.00},{"x":51822592,"y":1.02},{"x":51838976,"y":0.98},{"x":51855360,"y":1.02},{"x":51871744,"y":1.01},{"x":51888128,"y":0.99},{"x":51904512,"y":0.99},{"x":51920896,"y":0.98},{"x":51937280,"y":0.97},{"x":51953664,"y":1.00},{"x":51970048,"y":0.99},{"x":51986432,"y":0.96},{"x":52002816,"y":0.98},{"x":52019200,"y":0.94},{"x":52035584,"y":0.96},{"x":52051968,"y":0.92},{"x":52068352,"y":1.02},{"x":52084736,"y":0.99},{"x":52101120,"y":0.96},{"x":52117504,"y":0.99},{"x":52133888,"y":0.97},{"x":52150272,"y":0.98},{"x":52166656,"y":0.99},{"x":52183040,"y":0.96},{"x":52199424,"y":0.96},{"x":52215808,"y":0.94},{"x":52232192,"y":0.91},{"x":52248576,"y":0.94},{"x":52264960,"y":0.90},{"x":52281344,"y":0.93},{"x":52297728,"y":0.96},{"x":52314112,"y":0.93},{"x":52330496,"y":0.97},{"x":52346880,"y":0.96},{"x":52363264,"y":0.94},{"x":52379648,"y":0.98},{"x":52396032,"y":0.90},{"x":52412416,"y":0.99},{"x":52428800,"y":0.96},{"x":52445184,"y":0.96},{"x":52461568,"y":0.90},{"x":52477952,"y":0.96},{"x":52494336,"y":0.96},{"x":52510720,"y":0.96},{"x":52527104,"y":0.92},{"x":52543488,"y":0.94},{"x":52559872,"y":0.93},{"x":52576256,"y":0.97},{"x":52592640,"y":1.01},{"x":52609024,"y":0.97},{"x":52625408,"y":1.02},{"x":52641792,"y":1.00},{"x":52658176,"y":0.94},{"x":52674560,"y":1.01},{"x":52690944,"y":1.01},{"x":52707328,"y":1.03},{"x":52723712,"y":0.97},{"x":52740096,"y":1.06},{"x":52756480,"y":1.02},{"x":52772864,"y":1.01},{"x":52789248,"y":1.03},{"x":52805632,"y":1.00},{"x":52822016,"y":0.97},{"x":52838400,"y":1.04},{"x":52854784,"y":0.98},{"x":52871168,"y":1.05},{"x":52887552,"y":1.05},{"x":52903936,"y":0.99},{"x":52920320,"y":0.97},{"x":52936704,"y":0.99},{"x":52953088,"y":1.01},{"x":52969472,"y":1.00},{"x":52985856,"y":1.01},{"x":53002240,"y":0.99},{"x":53018624,"y":0.99},{"x":53035008,"y":1.03},{"x":53051392,"y":1.00},{"x":53067776,"y":0.96},{"x":53084160,"y":0.95},{"x":53100544,"y":1.02},{"x":53116928,"y":1.03},{"x":53133312,"y":1.04},{"x":53149696,"y":0.96},{"x":53166080,"y":1.00},{"x":53182464,"y":1.04},{"x":53198848,"y":1.01},{"x":53215232,"y":1.07},{"x":53231616,"y":0.99},{"x":53248000,"y":1.01},{"x":53264384,"y":0.99},{"x":53280768,"y":1.01},{"x":53297152,"y":1.01},{"x":53313536,"y":1.05},{"x":53329920,"y":1.02},{"x":53346304,"y":1.01},{"x":53362688,"y":1.01},{"x":53379072,"y":1.07},{"x":53395456,"y":1.00},{"x":53411840,"y":1.01},{"x":53428224,"y":1.01},{"x":53444608,"y":0.98},{"x":53460992,"y":1.02},{"x":53477376,"y":1.02},{"x":53493760,"y":1.06},{"x":53510144,"y":1.03},{"x":53526528,"y":1.01},{"x":53542912,"y":1.01},{"x":53559296,"y":1.04},{"x":53575680,"y":1.05},{"x":53592064,"y":1.01},{"x":53608448,"y":1.02},{"x":53624832,"y":1.00},{"x":53641216,"y":0.99},{"x":53657600,"y":0.99},{"x":53673984,"y":1.00},{"x":53690368,"y":1.00},{"x":53706752,"y":1.02},{"x":53723136,"y":1.02},{"x":53739520,"y":0.99},{"x":53755904,"y":1.01},{"x":53772288,"y":1.02},{"x":53788672,"y":1.04},{"x":53805056,"y":1.03},{"x":53821440,"y":1.08},{"x":53837824,"y":1.04},{"x":53854208,"y":1.05},{"x":53870592,"y":1.08},{"x":53886976,"y":1.06},{"x":53903360,"y":0.99},{"x":53919744,"y":1.04},{"x":53936128,"y":1.07},{"x":53952512,"y":1.03},{"x":53968896,"y":1.05},{"x":53985280,"y":1.03},{"x":54001664,"y":1.04},{"x":54018048,"y":1.00},{"x":54034432,"y":1.04},{"x":54050816,"y":1.03},{"x":54067200,"y":1.02},{"x":54083584,"y":1.06},{"x":54099968,"y":1.06},{"x":54116352,"y":1.00},{"x":54132736,"y":1.05},{"x":54149120,"y":1.01},{"x":54165504,"y":1.03},{"x":54181888,"y":1.04},{"x":54198272,"y":1.03},{"x":54214656,"y":1.06},{"x":54231040,"y":1.01},{"x":54247424,"y":1.05},{"x":54263808,"y":1.01},{"x":54280192,"y":1.02},{"x":54296576,"y":1.04},{"x":54312960,"y":1.04},{"x":54329344,"y":1.08},{"x":54345728,"y":1.07},{"x":54362112,"y":1.01},{"x":54378496,"y":1.06},{"x":54394880,"y":1.09},{"x":54411264,"y":1.07},{"x":54427648,"y":1.09},{"x":54444032,"y":1.08},{"x":54460416,"y":1.05},{"x":54476800,"y":1.05},{"x":54493184,"y":1.02},{"x":54509568,"y":1.04},{"x":54525952,"y":1.06},{"x":54542336,"y":1.03},{"x":54558720,"y":1.08},{"x":54575104,"y":1.05},{"x":54591488,"y":1.04},{"x":54607872,"y":1.03},{"x":54624256,"y":1.07},{"x":54640640,"y":1.07},{"x":54657024,"y":1.01},{"x":54673408,"y":1.04},{"x":54689792,"y":1.11},{"x":54706176,"y":1.01},{"x":54722560,"y":1.02},{"x":54738944,"y":1.06},{"x":54755328,"y":1.05},{"x":54771712,"y":1.03},{"x":54788096,"y":1.06},{"x":54804480,"y":1.01},{"x":54820864,"y":1.06},{"x":54837248,"y":1.06},{"x":54853632,"y":1.06},{"x":54870016,"y":1.02},{"x":54886400,"y":1.03},{"x":54902784,"y":1.04},{"x":54919168,"y":1.04},{"x":54935552,"y":1.06},{"x":54951936,"y":1.05},{"x":54968320,"y":1.06},{"x":54984704,"y":1.07},{"x":55001088,"y":1.05},{"x":55017472,"y":1.09},{"x":55033856,"y":1.05},{"x":55050240,"y":1.02},{"x":55066624,"y":1.04},{"x":55083008,"y":1.03},{"x":55099392,"y":1.03},{"x":55115776,"y":1.01},{"x":55132160,"y":1.01},{"x":55148544,"y":1.13},{"x":55164928,"y":1.02},{"x":55181312,"y":1.03},{"x":55197696,"y":1.04},{"x":55214080,"y":1.55},{"x":55230464,"y":1.03},{"x":55246848,"y":0.97},{"x":55263232,"y":1.01},{"x":55279616,"y":1.02},{"x":55296000,"y":1.00},{"x":55312384,"y":1.00},{"x":55328768,"y":1.01},{"x":55345152,"y":1.05},{"x":55361536,"y":1.04},{"x":55377920,"y":1.01},{"x":55394304,"y":1.04},{"x":55410688,"y":0.99},{"x":55427072,"y":1.00},{"x":55443456,"y":1.04},{"x":55459840,"y":1.00},{"x":55476224,"y":1.02},{"x":55492608,"y":1.05},{"x":
gitextract_3n5h5hp9/
├── .gitignore
├── .nojekyll
├── .travis.yml
├── HISTORY.md
├── LICENSE
├── README.md
├── cmd/
│ └── goleft/
│ └── goleft.go
├── cnveval/
│ ├── cmd/
│ │ └── cnveval/
│ │ └── cnveval.go
│ └── cnveval.go
├── covstats/
│ ├── README.md
│ └── covstats.go
├── dcnv/
│ ├── dcnv.go
│ ├── debiaser/
│ │ ├── debiaser.go
│ │ └── debiaser_test.go
│ └── scalers/
│ ├── scalers.go
│ └── scalers_test.go
├── depth/
│ ├── README.md
│ ├── depth.go
│ ├── functional-test.sh
│ ├── intervals.go
│ └── test/
│ ├── cmp.py
│ ├── fake.fa
│ ├── fake.fa.fai
│ ├── hg19.fa
│ ├── hg19.fa.fai
│ ├── hla.bam
│ ├── hla.bam.bai
│ ├── run.sh
│ ├── t-empty.bam
│ ├── t-empty.bam.bai
│ ├── t.bam
│ └── t.bam.bai
├── depthwed/
│ └── depthwed.go
├── docs/
│ ├── index.html
│ └── indexcov/
│ ├── ex-indexcov-depth-15.html
│ ├── ex-indexcov-depth-X.html
│ ├── ex-indexcov-depth-Y.html
│ ├── ex-indexcov-roc.html
│ ├── ex-indexcov-sex.html
│ ├── help-bin.md
│ ├── help-counts.md
│ ├── help-depth.md
│ ├── help-pca.md
│ ├── help-sex.md
│ └── index.html
├── emdepth/
│ ├── README.md
│ ├── emdepth.go
│ ├── emdepth_test.go
│ ├── mops/
│ │ ├── mops.go
│ │ └── mops_test.go
│ └── stats.go
├── go.mod
├── go.sum
├── goleft.go
├── indexcov/
│ ├── README.md
│ ├── anonymize/
│ │ ├── README.md
│ │ └── main.go
│ ├── crai/
│ │ ├── README.md
│ │ ├── crai.go
│ │ ├── crai_test.go
│ │ ├── plot-vs-with-st-depth.py
│ │ └── st-depth-to-bins.py
│ ├── functional-tests.sh
│ ├── indexcov.go
│ ├── indexcov_test.go
│ ├── paper/
│ │ ├── cmp.py
│ │ ├── cmp.sh
│ │ ├── plot-bins.py
│ │ ├── plot-eiee-15.py
│ │ ├── plot-simons-sex.py
│ │ └── scripts/
│ │ ├── cmp.py
│ │ └── cmp.sh
│ ├── plot.go
│ ├── template.go
│ ├── test-data/
│ │ ├── sample_issue_27_0001.bam
│ │ ├── sample_issue_27_0001.bam.bai
│ │ ├── viral.crai
│ │ └── viral.fa.fai
│ └── types.go
├── indexsplit/
│ ├── README.md
│ ├── functional-tests.sh
│ └── indexsplit.go
├── multidepth/
│ └── multidepth.go
└── samplename/
├── README.md
├── functional-tests.sh
└── samplename.go
SYMBOL INDEX (308 symbols across 33 files)
FILE: cmd/goleft/goleft.go
type progPair (line 19) | type progPair struct
function printProgs (line 33) | func printProgs(ret int) {
function main (line 56) | func main() {
FILE: cnveval/cmd/cnveval/cnveval.go
type cliargs (line 17) | type cliargs struct
function main (line 24) | func main() {
function asCNV (line 56) | func asCNV(ts []cnveval.Truth) []cnveval.CNV {
function parseTruth (line 65) | func parseTruth(p string, cnt bool, samples map[string]bool) []cnveval.T...
function mustAtoi (line 109) | func mustAtoi(s string) int {
function parseLine (line 117) | func parseLine(l string) cnveval.Truth {
FILE: cnveval/cnveval.go
type CNV (line 11) | type CNV struct
method String (line 34) | func (c CNV) String() string {
type Truth (line 21) | type Truth struct
method String (line 30) | func (t Truth) String() string {
method equals (line 38) | func (t Truth) equals(o Truth) bool {
type SC (line 43) | type SC
method Order (line 53) | func (s SC) Order() int {
method String (line 68) | func (s SC) String() string {
type TS (line 84) | type TS struct
type Stat (line 89) | type Stat struct
method String (line 93) | func (s Stat) String() string {
method Recall (line 98) | func (s Stat) Recall() float64 {
method Precision (line 101) | func (s Stat) Precision() float64 {
type CohortStats (line 105) | type CohortStats
method TP (line 107) | func (c CohortStats) TP(class SC) int {
method Tabulate (line 118) | func (c CohortStats) Tabulate() [4]Stat {
method Precision (line 135) | func (c CohortStats) Precision(class SC) float64 {
method Recall (line 148) | func (c CohortStats) Recall(class SC) float64 {
function Evaluate (line 163) | func Evaluate(cnvs []CNV, truths []Truth, po float64) CohortStats {
function notin (line 214) | func notin(a string, bs []string) bool {
function fromMap (line 223) | func fromMap(samples map[string]bool) []string {
function updateFP (line 231) | func updateFP(stat map[TS]*Stat, others []Truth, cnvs []CNV, truths []Tr...
function updatePositive (line 289) | func updatePositive(stat map[TS]*Stat, truths []Truth, cnvs []CNV, po fl...
function sizeClass (line 343) | func sizeClass(t Truth) SC {
function sameCN (line 354) | func sameCN(a, b int) bool {
function imin (line 364) | func imin(a, b int) int {
function imax (line 371) | func imax(a, b int) int {
function poverlap (line 378) | func poverlap(a CNV, b Truth) float64 {
FILE: covstats/covstats.go
function pcheck (line 28) | func pcheck(e error) {
constant N_MADS (line 34) | N_MADS = 10
function readCoverage (line 36) | func readCoverage(path string) int {
function madFilter (line 57) | func madFilter(arr []int, nmads int) []int {
function meanStd (line 78) | func meanStd(arr []int) (mean, std float64) {
type Stats (line 92) | type Stats struct
method String (line 114) | func (s Stats) String() string {
constant skipReads (line 119) | skipReads = 100000
function BamStats (line 122) | func BamStats(br *bam.Reader, n int, skipReads int) Stats {
function Main (line 223) | func Main() {
FILE: dcnv/dcnv.go
type Intervals (line 25) | type Intervals struct
method NSamples (line 45) | func (ivs Intervals) NSamples() int {
method addFromLine (line 78) | func (ivs *Intervals) addFromLine(l string, fa *faidx.Faidx, fp *faidx...
method SampleMedians (line 108) | func (ivs *Intervals) SampleMedians() []float64 {
method NormalizeBySampleMedian (line 128) | func (ivs *Intervals) NormalizeBySampleMedian() {
method ReadRegions (line 153) | func (ivs *Intervals) ReadRegions(path string, fasta string) {
method Write (line 188) | func (ivs *Intervals) Write(n int) {
function mustAtoi (line 50) | func mustAtoi(a string) uint32 {
function mustAtof (line 58) | func mustAtof(a string) float64 {
function imin (line 66) | func imin(a, b int) int {
type GcBounds (line 73) | type GcBounds struct
function median (line 138) | func median(b []float64) float64 {
type MatFn (line 151) | type MatFn
function Pipeliner (line 210) | func Pipeliner(mat *mat.Dense, fns ...MatFn) {
constant cnMax (line 217) | cnMax = 2.5
type vs (line 219) | type vs struct
method Xs (line 224) | func (v *vs) Xs() []float64 {
method Ys (line 228) | func (v *vs) Ys() []float64 {
method Rs (line 232) | func (v *vs) Rs() []float64 {
method Len (line 236) | func (v *vs) Len() int {
method XY (line 242) | func (v *vs) XY(i int) (x, y float64) {
function asValues (line 246) | func asValues(vals []float64, multiplier float64) chartjs.Values {
function randomColor (line 265) | func randomColor(s int) *types.RGBA {
function plotDepths (line 274) | func plotDepths(depths *mat.Dense, samples []string, chrom string, base ...
function main (line 323) | func main() {
FILE: dcnv/debiaser/debiaser.go
type Debiaser (line 16) | type Debiaser interface
type Sorter (line 21) | type Sorter interface
type SortedDebiaser (line 28) | type SortedDebiaser interface
type GeneralDebiaser (line 37) | type GeneralDebiaser struct
method setTmp (line 44) | func (g *GeneralDebiaser) setTmp(r, c int) {
method Sort (line 56) | func (g *GeneralDebiaser) Sort(mat *mat.Dense) {
method Unsort (line 79) | func (g *GeneralDebiaser) Unsort(mat *mat.Dense) {
method Debias (line 98) | func (g *GeneralDebiaser) Debias(imat *mat.Dense) {
type ChunkDebiaser (line 125) | type ChunkDebiaser struct
method Debias (line 133) | func (cd *ChunkDebiaser) Debias(imat *mat.Dense) {
type SVD (line 173) | type SVD struct
method Debias (line 177) | func (isvd *SVD) Debias(imat *mat.Dense) {
function extractSVD (line 202) | func extractSVD(svd *mat.SVD) (s []float64, u, v *mat.Dense) {
FILE: dcnv/debiaser/debiaser_test.go
function fillMatrix (line 15) | func fillMatrix(mat *mat.Dense) {
function printMatrix (line 24) | func printMatrix(imat *mat.Dense) {
function TestGeneralDebiasSort (line 40) | func TestGeneralDebiasSort(t *testing.T) {
function TestGeneralDebias (line 89) | func TestGeneralDebias(t *testing.T) {
FILE: dcnv/scalers/scalers.go
type Scaler (line 15) | type Scaler interface
type ZScore (line 25) | type ZScore struct
method UnScale (line 31) | func (z *ZScore) UnScale(a *mat.Dense) {
method Scale (line 42) | func (z *ZScore) Scale(a *mat.Dense) {
type RowCentered (line 58) | type RowCentered struct
method Scale (line 68) | func (rc *RowCentered) Scale(a *mat.Dense) {
method UnScale (line 102) | func (rc *RowCentered) UnScale(a *mat.Dense) {
type ColCentered (line 63) | type ColCentered struct
method Scale (line 84) | func (cc *ColCentered) Scale(a *mat.Dense) {
method UnScale (line 113) | func (cc *ColCentered) UnScale(a *mat.Dense) {
function gmean (line 126) | func gmean(vs []float64) float64 {
type Log2 (line 135) | type Log2 struct
method Scale (line 140) | func (l *Log2) Scale(a *mat.Dense) {
method UnScale (line 155) | func (l *Log2) UnScale(a *mat.Dense) {
FILE: dcnv/scalers/scalers_test.go
constant eps (line 15) | eps = 0.001
function TestZScoreRoundTrip (line 17) | func TestZScoreRoundTrip(t *testing.T) {
function TestLog2RoundTrip (line 49) | func TestLog2RoundTrip(t *testing.T) {
FILE: depth/depth.go
type dargs (line 27) | type dargs struct
constant command (line 45) | command = "echo '%s'; samtools depth -Q %d -d %d -r '%s' '%s'"
function pcheck (line 52) | func pcheck(e error) {
function min (line 58) | func min(a, b int) int {
function max (line 65) | func max(a, b int) int {
function chromStartEndFromLine (line 75) | func chromStartEndFromLine(line []byte) (string, int, int) {
function regionFromLine (line 96) | func regionFromLine(line []byte) string {
function genFromBed (line 103) | func genFromBed(ch chan string, args dargs) {
function genCommands (line 122) | func genCommands(args dargs) chan string {
function Main (line 162) | func Main() {
type ipos (line 177) | type ipos struct
function mean (line 181) | func mean(sl []int, l int) (avg float64) {
function getStats (line 191) | func getStats(fa *faidx.Faidx, chrom string, start, end int) string {
function getPosDepth (line 202) | func getPosDepth(rline string) (int, int, error) {
function getCovClass (line 223) | func getCovClass(depth, minCov, maxMeanDepth int) string {
function run (line 236) | func run(args dargs) {
FILE: depth/intervals.go
type irange (line 12) | type irange struct
method Overlap (line 17) | func (i irange) Overlap(b interval.IntRange) bool {
method ID (line 21) | func (i irange) ID() uintptr { return i.UID }
method Range (line 22) | func (i irange) Range() interval.IntRange { return interval.IntRange{i...
function Overlaps (line 25) | func Overlaps(tree *interval.IntTree, start, end int) bool {
function ReadTree (line 42) | func ReadTree(ps ...string) map[string]*interval.IntTree {
FILE: depthwed/depthwed.go
type cliargs (line 18) | type cliargs struct
function pcheck (line 23) | func pcheck(e error) {
function Main (line 30) | func Main() {
function getNameFromFile (line 37) | func getNameFromFile(f string) string {
function run (line 48) | func run(args cliargs) {
type depth (line 75) | type depth struct
function mustAtoi (line 82) | func mustAtoi(s string) int {
function mustAtof (line 87) | func mustAtof(s string) float64 {
function sFromLine (line 93) | func sFromLine(l string) depth {
function getNextChrom (line 108) | func getNextChrom(r *bufio.Reader) string {
function next (line 117) | func next(beds []*xopen.Reader, size int) (depths []depth, eof bool) {
FILE: emdepth/emdepth.go
function median32 (line 18) | func median32(a []float32) float64 {
function mean32 (line 32) | func mean32(a []float32) float32 {
function mean64 (line 40) | func mean64(a []float64) float64 {
function abs (line 51) | func abs(a float64) float64 {
function abs32 (line 58) | func abs32(a float32) float32 {
constant maxCN (line 65) | maxCN = 8
constant maxiter (line 66) | maxiter = 10
constant eps (line 67) | eps = 0.01
function summaxdiff (line 71) | func summaxdiff(a, b []float64) (float64, float64) {
function getBins (line 83) | func getBins(nSamples int) [][]float64 {
function init (line 97) | func init() {
type Position (line 103) | type Position struct
method String (line 108) | func (p *Position) String() string {
function EMDepth (line 117) | func EMDepth(depths []float32, p Position) *EMD {
type EMD (line 209) | type EMD struct
method Same (line 227) | func (e *EMD) Same(o *EMD) (non2 []int, changed []int, pct float64) {
method Log2FC (line 250) | func (e *EMD) Log2FC() []float64 {
method CN (line 263) | func (e *EMD) CN() []int {
method Type (line 272) | func (e *EMD) Type(d float32) int {
method adjustCN (line 293) | func (e *EMD) adjustCN(cn int, depth float64) int {
constant lower (line 224) | lower = -0.80
constant upper (line 225) | upper = 0.40
type Cache (line 310) | type Cache struct
method Add (line 330) | func (c *Cache) Add(e *EMD) []*CNV {
method Clear (line 348) | func (c *Cache) Clear(p *Position) []*CNV {
type CNV (line 317) | type CNV struct
method String (line 326) | func (c *CNV) String() string {
function makecnvs (line 376) | func makecnvs(es []*EMD, sampleI int) *CNV {
FILE: emdepth/emdepth_test.go
function TestDepth (line 11) | func TestDepth(t *testing.T) {
function TestBig (line 28) | func TestBig(t *testing.T) {
function BenchmarkEMDepth (line 56) | func BenchmarkEMDepth(b *testing.B) {
FILE: emdepth/mops/mops.go
function mean32 (line 7) | func mean32(a []float32) float32 {
function abs (line 15) | func abs(a float64) float64 {
function abs32 (line 22) | func abs32(a float32) float32 {
constant maxCN (line 29) | maxCN = 8
constant delta (line 30) | delta = 0.001
constant maxiter (line 31) | maxiter = 10
constant eps (line 33) | eps = 0.001
function pmf (line 35) | func pmf(k int, pmean float64) float64 {
function pdepth (line 41) | func pdepth(depths []float32, cn int, lambda float32, out []float32) {
function estep (line 54) | func estep(alpha []float32, depths []float32, lambda float32, aik [][]fl...
function mstep (line 90) | func mstep(depths []float32, adepths [][]float32) (alpha []float32, lamb...
type Mopped (line 121) | type Mopped struct
method Gain (line 126) | func (m *Mopped) Gain() float32 {
function Mops (line 139) | func Mops(depths []float32) *Mopped {
function CNINI (line 163) | func CNINI(cns []int, depths []float32, centers []float64) float32 {
FILE: emdepth/mops/mops_test.go
function TestDepth (line 10) | func TestDepth(t *testing.T) {
function TestBig (line 27) | func TestBig(t *testing.T) {
function TestMops (line 37) | func TestMops(t *testing.T) {
FILE: emdepth/stats.go
function init (line 7) | func init() {
function pmf (line 14) | func pmf(k int, mu float64) float64 {
function cdf (line 25) | func cdf(mu float64, k int) float64 {
FILE: goleft.go
constant Version (line 3) | Version = "0.2.6"
FILE: indexcov/anonymize/main.go
function main (line 16) | func main() {
FILE: indexcov/crai/crai.go
type Slice (line 17) | type Slice struct
method Start (line 27) | func (s Slice) Start() int64 {
method SliceBytes (line 31) | func (s Slice) SliceBytes() int32 {
method Span (line 35) | func (s Slice) Span() int64 {
type Index (line 39) | type Index struct
method Sizes (line 45) | func (idx *Index) Sizes() [][]int64 {
method makeSizes (line 56) | func (idx *Index) makeSizes(slices []Slice) []int64 {
constant TileWidth (line 43) | TileWidth = 16384
function ReadIndex (line 129) | func ReadIndex(r io.Reader) (*Index, error) {
FILE: indexcov/crai/crai_test.go
function TestCrai (line 11) | func TestCrai(t *testing.T) {
function TestSizes (line 1040) | func TestSizes(t *testing.T) {
FILE: indexcov/crai/plot-vs-with-st-depth.py
function read (line 6) | def read(path):
FILE: indexcov/crai/st-depth-to-bins.py
function gen (line 6) | def gen():
FILE: indexcov/indexcov.go
type Index (line 57) | type Index struct
method Path (line 69) | func (i *Index) Path() string {
method Sizes (line 74) | func (i *Index) Sizes() [][]int64 {
method init (line 83) | func (x *Index) init() {
method NormalizedDepth (line 129) | func (x *Index) NormalizedDepth(refID int) []float32 {
function vOffset (line 78) | func vOffset(o bgzf.Offset) int64 {
constant slots (line 153) | slots = 70
constant slotsMid (line 157) | slotsMid = float64(2) / float64(3)
function tint (line 159) | func tint(f float32) int {
function CountsAtDepth (line 170) | func CountsAtDepth(depths []float32, counts []int) {
function CountsROC (line 181) | func CountsROC(counts []int) []float32 {
function getRef (line 195) | func getRef(b *bam.Reader, chrom string) *sam.Reference {
function GetShortName (line 213) | func GetShortName(b string, isCrai bool) (string, error) {
function getWriter (line 248) | func getWriter(base string) (*bgzf.Writer, error) {
function zero (line 259) | func zero(ints []int) {
function getDirectory (line 265) | func getDirectory(path string) (bool, error) {
function ReadFai (line 278) | func ReadFai(path string, chrom string) []*sam.Reference {
function RefsFromBam (line 320) | func RefsFromBam(path string, chrom string) []*sam.Reference {
function getReferences (line 344) | func getReferences() []*sam.Reference {
function expandGlobs (line 376) | func expandGlobs(paths []string) []string {
function Main (line 392) | func Main() {
type rdi (line 458) | type rdi struct
function ReadIndex (line 464) | func ReadIndex(path string) *Index {
function readIndex (line 471) | func readIndex(r rdi) (*Index, string, int) {
constant maxSamples (line 528) | maxSamples = 100
function sameChrom (line 530) | func sameChrom(as []string, b string) bool {
function normalizeAcrossSamples (line 549) | func normalizeAcrossSamples(depths [][]float32) {
function run (line 599) | func run(refs []*sam.Reference, idxs []*Index, names []string, base stri...
function updateSlopes (line 739) | func updateSlopes(rocs [][]float32, scalar float32, slopes []float32) {
function keys (line 752) | func keys(o map[string][]float64) []string {
function checkSexes (line 760) | func checkSexes(obs map[string][]float64, exp []string) {
function pca (line 773) | func pca(pca8 [][]uint8, samples []string) (*mat.Dense, []chartjs.Chart,...
function getBase (line 809) | func getBase(directory string) string {
function writeIndex (line 815) | func writeIndex(sexes map[string][]float64, counts []*counter, samples [...
function GetCN (line 957) | func GetCN(depths [][]float32) []float64 {
function saveCharts (line 993) | func saveCharts(path string, customjs string, customHTML string, charts ...
function getROCs (line 1008) | func getROCs(counts [][]int) [][]float32 {
function writeROCs (line 1018) | func writeROCs(counts [][]int, names []string, chrom string, fh io.Write...
function depthsFor (line 1038) | func depthsFor(depths [][]float32, i int) string {
type counter (line 1050) | type counter struct
method count (line 1062) | func (c *counter) count(depths []float32, n int) {
FILE: indexcov/indexcov_test.go
function TestShortName (line 7) | func TestShortName(t *testing.T) {
FILE: indexcov/paper/cmp.py
function gen (line 15) | def gen(fh):
FILE: indexcov/paper/scripts/cmp.py
function gen (line 13) | def gen(fh):
FILE: indexcov/plot.go
type vs (line 24) | type vs struct
method Xs (line 29) | func (v *vs) Xs() []float64 {
method Ys (line 33) | func (v *vs) Ys() []float64 {
method Rs (line 37) | func (v *vs) Rs() []float64 {
method Len (line 41) | func (v *vs) Len() int {
method XY (line 47) | func (v *vs) XY(i int) (x, y float64) {
method Sample (line 51) | func (v *vs) Sample(nth int) *vs {
constant cnMax (line 64) | cnMax = 2.5
function asValues (line 66) | func asValues(vals []float32, multiplier float64) chartjs.Values {
function init (line 89) | func init() {
function randomColor (line 98) | func randomColor(s int, check bool) *types.RGBA {
function plotDepths (line 110) | func plotDepths(depths [][]float32, samples []string, chrom string, base...
function plotBins (line 166) | func plotBins(counts []*counter, samples []string) (chartjs.Chart, strin...
function plotBinsSet (line 240) | func plotBinsSet(chart *chartjs.Chart, xys *vs, c *types.RGBA, xa string...
function plotPCA (line 251) | func plotPCA(imat *mat.Dense, samples []string, vars []float64) ([]chart...
function plotROCs (line 318) | func plotROCs(rocs [][]float32, samples []string, chrom string) (chartjs...
function plotMapped (line 355) | func plotMapped(mapped []uint64, unmapped []uint64, samples []string) (*...
function plotSex (line 412) | func plotSex(sexes map[string][]float64, chroms []string, samples []stri...
function asPng (line 476) | func asPng(path string, chart chartjs.Chart, wInches float64, hInches fl...
type ydticks (line 539) | type ydticks struct
method Ticks (line 542) | func (ydticks) Ticks(min, max float64) []plot.Tick {
type xdticks (line 540) | type xdticks struct
method Ticks (line 551) | func (xdticks) Ticks(min, max float64) []plot.Tick {
function makeMillions (line 564) | func makeMillions(v float64) string {
FILE: indexcov/template.go
constant chartTemplate (line 3) | chartTemplate = `<!DOCTYPE html>
FILE: indexcov/types.go
constant TileWidth (line 15) | TileWidth = 0x4000
constant StatsDummyBin (line 19) | StatsDummyBin = 0x924a
type oRefIndex (line 22) | type oRefIndex struct
type bin (line 28) | type bin struct
type referenceStats (line 33) | type referenceStats struct
function getSizes (line 45) | func getSizes(idx *bam.Index) ([][]int64, uint64, uint64) {
FILE: indexsplit/indexsplit.go
type cliargs (line 24) | type cliargs struct
function imin (line 31) | func imin(a, b int) int {
function chop (line 38) | func chop(sizes [][]float64) {
function getPercents (line 52) | func getPercents(sizes [][]float64) ([]float64, []float64) {
type Chunk (line 69) | type Chunk struct
method String (line 77) | func (c Chunk) String() string {
function Split (line 82) | func Split(paths []string, refs []*sam.Reference, N int, probs map[strin...
function Main (line 197) | func Main() {
FILE: multidepth/multidepth.go
type dargs (line 18) | type dargs struct
function chromSize (line 32) | func chromSize(path string, chrom string) int {
function main (line 49) | func main() {
function writeOut (line 95) | func writeOut(ch chan []block) *sync.WaitGroup {
type region (line 116) | type region struct
method String (line 122) | func (r region) String() string {
function genRegions (line 126) | func genRegions(l int, chrom string) chan region {
type site (line 139) | type site struct
function parseLine (line 144) | func parseLine(line string) site {
function sufficientDepth (line 163) | func sufficientDepth(s site, a *dargs) bool {
type block (line 173) | type block struct
method String (line 180) | func (b block) String() string {
function splitBlocks (line 184) | func splitBlocks(chrom string, cache []site, a *dargs) []block {
function aggregate (line 201) | func aggregate(a *dargs, r region, out chan []block) {
function means (line 270) | func means(sites []site) []string {
FILE: samplename/samplename.go
function Names (line 14) | func Names(h *sam.Header) []string {
type cliargs (line 39) | type cliargs struct
method Version (line 44) | func (c cliargs) Version() string {
function Main (line 48) | func Main() {
Condensed preview — 86 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (5,817K chars).
[
{
"path": ".gitignore",
"chars": 143,
"preview": "*.png\n_test.cov\n*.bed\n*_linux64\n*_osx\n*_darwin\n*pprof*\n*.gz\nindexcov/*.bam\nindexcov/*.cram\nindexcov/*.bai\nindexcov/*.cra"
},
{
"path": ".nojekyll",
"chars": 2,
"preview": "#\n"
},
{
"path": ".travis.yml",
"chars": 486,
"preview": "language: go\n\nos:\n - linux\n\ngo:\n - 1.16.x\n\nbefore_install:\n - cd indexcov && go get ./... ; cd ..\n - cd depth && go "
},
{
"path": "HISTORY.md",
"chars": 4844,
"preview": "v0.2.6\n======\n+ covstats: fix denominator in unmapped\n\n\nv0.2.4\n======\n+ `indexcov`: protect against empty chroms\n\nv0.2.3"
},
{
"path": "LICENSE",
"chars": 1088,
"preview": "MIT License\n\nCopyright (c) 2016 Brent Pedersen - Bioinformatics\n\nPermission is hereby granted, free of charge, to any pe"
},
{
"path": "README.md",
"chars": 1999,
"preview": "<!--\n#CGO_ENABLED=0 GOARCH=amd64 go build -o goleft_linux64 --ldflags '-extldflags \"-static\"' cmd/goleft/goleft.go\n#GOOS"
},
{
"path": "cmd/goleft/goleft.go",
"chars": 1578,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"sort\"\n\t\"strconv\"\n\n\t\"github.com/brentp/goleft\"\n\t\"github.com/brentp/goleft/cov"
},
{
"path": "cnveval/cmd/cnveval/cnveval.go",
"chars": 2867,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"log\"\n\t\"os\"\n\t\"runtime/pprof\"\n\t\"strconv\"\n\t\"strings\"\n\n\targ \"github.com/alexflint/go-a"
},
{
"path": "cnveval/cnveval.go",
"chars": 8702,
"preview": "// Package cnveval provides a way to evalute CNVs based on a truth-set.\npackage cnveval\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"sort\""
},
{
"path": "covstats/README.md",
"chars": 132,
"preview": "## covstats\n\nget estimates for coverage, instert size, duplicate, from a bam file by sampling read-length and looking at"
},
{
"path": "covstats/covstats.go",
"chars": 7173,
"preview": "package covstats\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"log\"\n\t\"math\"\n\t\"os\"\n\t\"sort\"\n\t\"strconv\"\n\t\"strings\"\n\n\targ \"github.com/alexflint/g"
},
{
"path": "dcnv/dcnv.go",
"chars": 8049,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"html/template\"\n\t\"io\"\n\t\"math\"\n\t\"math/rand\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"gonum.org/v1/go"
},
{
"path": "dcnv/debiaser/debiaser.go",
"chars": 4955,
"preview": "package debiaser\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"math\"\n\t\"sort\"\n\n\t\"gonum.org/v1/gonum/floats\"\n\t\"gonum.org/v1/gonum/mat\"\n\n\t\"gith"
},
{
"path": "dcnv/debiaser/debiaser_test.go",
"chars": 2599,
"preview": "package debiaser_test\n\nimport (\n\t\"fmt\"\n\t\"math/rand\"\n\t\"reflect\"\n\t\"testing\"\n\n\t\"gonum.org/v1/gonum/mat\"\n\n\t\"github.com/brent"
},
{
"path": "dcnv/scalers/scalers.go",
"chars": 3254,
"preview": "// Package scalers holds the interface for scaling depths to standardized scores.\npackage scalers\n\nimport (\n\t\"math\"\n\t\"so"
},
{
"path": "dcnv/scalers/scalers_test.go",
"chars": 1579,
"preview": "package scalers_test\n\nimport (\n\t\"log\"\n\t\"math\"\n\t\"testing\"\n\n\t\"gonum.org/v1/gonum/floats\"\n\t\"gonum.org/v1/gonum/mat\"\n\t\"gonum"
},
{
"path": "depth/README.md",
"chars": 1487,
"preview": "depth\n=====\n\ndepth parallelizes calls to [samtools](https://samtools.github.io) in user-defined windows.\nIt outputs a be"
},
{
"path": "depth/depth.go",
"chars": 11695,
"preview": "// Package depth parallelizes calls to samtools depths and outputs:\n// 1) $prefix.callable.bed that contains collapsed p"
},
{
"path": "depth/functional-test.sh",
"chars": 4663,
"preview": "#!/bin/bash\n\ntest -e ssshtest || wget -q https://raw.githubusercontent.com/ryanlayer/ssshtest/master/ssshtest\n\n. ssshtes"
},
{
"path": "depth/intervals.go",
"chars": 1600,
"preview": "package depth\n\nimport (\n\t\"bufio\"\n\t\"io\"\n\n\t\"github.com/biogo/store/interval\"\n\t\"github.com/brentp/xopen\"\n)\n\n// Integer-spec"
},
{
"path": "depth/test/cmp.py",
"chars": 562,
"preview": "import subprocess as sp\nimport sys\n\ngoleft_bed = sys.argv[1]\nbam = sys.argv[2]\n\nfor toks in (l.rstrip().split(\"\\t\") for "
},
{
"path": "depth/test/fake.fa",
"chars": 16867,
"preview": ">HLA-A*01:01:01:01\nGATCACAGGTCTATCACCCTATTAACCACTCACGGGAGCTCTCCATGCATTTGGTATTTT\nCGTCTGGGGGGTGTGCACGCGATAGCATTGCGAGACGCTG"
},
{
"path": "depth/test/fake.fa.fai",
"chars": 33,
"preview": "HLA-A*01:01:01:01\t16571\t19\t60\t61\n"
},
{
"path": "depth/test/hg19.fa",
"chars": 37196,
"preview": ">chrM\nGATCACAGGTCTATCACCCTATTAACCACTCACGGGAGCTCTCCATGCATTTGGTATTTT\nCGTCTGGGGGGTGTGCACGCGATAGCATTGCGAGACGCTGGAGCCGGAGCACC"
},
{
"path": "depth/test/hg19.fa.fai",
"chars": 43,
"preview": "chrM\t16571\t6\t60\t61\nchr22\t20001\t16861\t60\t61\n"
},
{
"path": "depth/test/run.sh",
"chars": 180,
"preview": "#!/bin/bash\n\ngoleft depth --windowsize 10 --q 1 --mincov 4 --reference hg19.fa --processes 1 --stats --bed Test1-coverag"
},
{
"path": "depthwed/depthwed.go",
"chars": 3406,
"preview": "// Package depthwed combines files from goleft depth into matrices.\npackage depthwed\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"fmt\"\n"
},
{
"path": "docs/index.html",
"chars": 98,
"preview": "<html>\n <body>\n <h1><a href=\"indexcov/index.html\">IndexCov</a></h1>\n </body>\n</html>\n"
},
{
"path": "docs/indexcov/ex-indexcov-depth-15.html",
"chars": 1230379,
"preview": "<!DOCTYPE html>\n<html>\n <head>\n\t\t<script src=\"https://code.jquery.com/jquery-2.2.4.min.js\"></script>\n\t\t<script src=\"h"
},
{
"path": "docs/indexcov/ex-indexcov-depth-X.html",
"chars": 2320474,
"preview": "<!DOCTYPE html>\n<html>\n <head>\n\t\t<script src=\"https://code.jquery.com/jquery-2.2.4.min.js\"></script>\n\t\t<script src=\"h"
},
{
"path": "docs/indexcov/ex-indexcov-depth-Y.html",
"chars": 840973,
"preview": "<!DOCTYPE html>\n<html>\n <head>\n\t\t<script src=\"https://code.jquery.com/jquery-2.2.4.min.js\"></script>\n\t\t<script src=\"h"
},
{
"path": "docs/indexcov/ex-indexcov-roc.html",
"chars": 70719,
"preview": "<!DOCTYPE html>\n<html>\n <head>\n\t\t<script src=\"https://code.jquery.com/jquery-2.2.4.min.js\"></script>\n\t\t<script src=\"h"
},
{
"path": "docs/indexcov/ex-indexcov-sex.html",
"chars": 18250,
"preview": "<!DOCTYPE html>\n<html>\n <head>\n\t\t<script src=\"https://code.jquery.com/jquery-2.2.4.min.js\"></script>\n\t\t<script src=\"h"
},
{
"path": "docs/indexcov/help-bin.md",
"chars": 1543,
"preview": "Bins\n====\n\nA \"*bin*\" in `indexcov` terms is a 16,384 base window for which coverage was estimated.\nFor a *good* sample, "
},
{
"path": "docs/indexcov/help-counts.md",
"chars": 220,
"preview": "Mapped Counts\n=============\n\nThe bam index reports the number of mapped and unmapped reads (without regard for quality o"
},
{
"path": "docs/indexcov/help-depth.md",
"chars": 2029,
"preview": "Depth\n=====\n\nDepth plots are very intuitive. The x-value indicates the position on the chromosome and\nthe y-value indica"
},
{
"path": "docs/indexcov/help-pca.md",
"chars": 1277,
"preview": "Principal Components Analysis\n=============================\n\nIn `indexcov` we use PCA as a means of dimensionality reduc"
},
{
"path": "docs/indexcov/help-sex.md",
"chars": 1446,
"preview": "Inferred Sex\n============\n\nSince we have scaled coverage to have a median of 1, chromosomes with a value of ~0.5 have a "
},
{
"path": "docs/indexcov/index.html",
"chars": 560,
"preview": "<html>\n <body>\n<a href=\"ex-indexcov-depth-15.html\">depth plot: autosomal chromosome with large deletion in one sample"
},
{
"path": "emdepth/README.md",
"chars": 669,
"preview": "[![GoDoc] (https://godoc.org/github.com/brentp/goleft/emdepth?status.png)](https://godoc.org/github.com/brentp/goleft/em"
},
{
"path": "emdepth/emdepth.go",
"chars": 10044,
"preview": "// Package emdepth uses a simplified EM algorithm to assign copy-number given a set of depths.\n// it is based off the im"
},
{
"path": "emdepth/emdepth_test.go",
"chars": 1616,
"preview": "package emdepth\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\t\"testing\"\n)\n\nvar p = Position{123, 456}\n\nfunc TestDepth(t *testing.T) {\n\tv "
},
{
"path": "emdepth/mops/mops.go",
"chars": 3839,
"preview": "// Package mops implements the EM algorithm described in the cn.mops paper.\npackage mops\n\nimport \"math\"\n\n// mean of all "
},
{
"path": "emdepth/mops/mops_test.go",
"chars": 857,
"preview": "package mops_test\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n\n\t\"github.com/brentp/goleft/emdepth/mops\"\n)\n\nfunc TestDepth(t *testing"
},
{
"path": "emdepth/stats.go",
"chars": 520,
"preview": "package emdepth\n\nimport \"math\"\n\nvar gammas []float64\n\nfunc init() {\n\tgammas = make([]float64, 1000)\n\tfor i := 0; i < 100"
},
{
"path": "go.mod",
"chars": 1483,
"preview": "module github.com/brentp/goleft\n\ngo 1.21.5\n\nrequire (\n\tgithub.com/JaderDias/movingmedian v0.0.0-20220813210630-d8c6b6de8"
},
{
"path": "go.sum",
"chars": 39754,
"preview": "cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.34.0/go.mod h1"
},
{
"path": "goleft.go",
"chars": 40,
"preview": "package goleft\n\nconst Version = \"0.2.6\"\n"
},
{
"path": "indexcov/README.md",
"chars": 6095,
"preview": "indexcov\n========\n\n<img src=\"https://user-images.githubusercontent.com/1739/29233991-66509a72-7eb1-11e7-903e-6c1ac57f45a"
},
{
"path": "indexcov/anonymize/README.md",
"chars": 484,
"preview": "this is a small tool to create a new stub bam file with **all real readgroups and data removed** \nso users can share the"
},
{
"path": "indexcov/anonymize/main.go",
"chars": 1871,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\t\"os/exec\"\n\t\"strconv\"\n\t\"time\"\n\n\t\"github.com/biogo/hts/bam\"\n\t\"github.com/biogo"
},
{
"path": "indexcov/crai/README.md",
"chars": 453,
"preview": "\nread a crai and output sizes.\n\nthe python scripts in this directory simplify comparing the output of samtools depth\n\nwi"
},
{
"path": "indexcov/crai/crai.go",
"chars": 5183,
"preview": "package crai\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"io\"\n\t\"log\"\n\t\"strconv\"\n\t\"strings\"\n)\n\n// note: for index cov, just need alnStart,"
},
{
"path": "indexcov/crai/crai_test.go",
"chars": 40534,
"preview": "package crai_test\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/brentp/goleft/indexcov/crai\"\n)\n\nfunc TestCrai(t *"
},
{
"path": "indexcov/crai/plot-vs-with-st-depth.py",
"chars": 1014,
"preview": "import sys\n\nfreal = sys.argv[1]\nfcram = sys.argv[2]\n\ndef read(path):\n xs, ys = [], []\n for toks in (l.rstrip().spl"
},
{
"path": "indexcov/crai/st-depth-to-bins.py",
"chars": 665,
"preview": "import sys\nfrom itertools import groupby\nimport numpy as np\n\n\ndef gen():\n for l in sys.stdin:\n chrom, p, d = l"
},
{
"path": "indexcov/functional-tests.sh",
"chars": 3407,
"preview": "#!/bin/bash\n\ntest -e ssshtest || wget -q https://raw.githubusercontent.com/ryanlayer/ssshtest/master/ssshtest\n\n. ssshtes"
},
{
"path": "indexcov/indexcov.go",
"chars": 27534,
"preview": "package indexcov\n\nimport (\n\t\"bufio\"\n\t\"compress/gzip\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"io\"\n\t\"log\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepa"
},
{
"path": "indexcov/indexcov_test.go",
"chars": 346,
"preview": "package indexcov\n\nimport (\n\t\"testing\"\n)\n\nfunc TestShortName(t *testing.T) {\n\n\tr, err := GetShortName(\"asdf.cram\", true)\n"
},
{
"path": "indexcov/paper/cmp.py",
"chars": 2366,
"preview": "import sys\nimport gzip\nimport itertools as it\nimport numpy as np\nimport scipy.stats as ss\nfrom matplotlib import pyplot "
},
{
"path": "indexcov/paper/cmp.sh",
"chars": 722,
"preview": "ref=Homo_sapiens.GRCh38.dna.toplevel.fa\nbam=NA12878_S1.bam\nset -eu\nchrom=chr1\nif [[ ! -e st.depth.$chrom.depth.bed ]]; t"
},
{
"path": "indexcov/paper/plot-bins.py",
"chars": 875,
"preview": "from matplotlib import pyplot as plt\nplt.rcParams['pdf.fonttype'] = 42\n\nimport pandas as pd\nimport seaborn as sns\nsns.se"
},
{
"path": "indexcov/paper/plot-eiee-15.py",
"chars": 1375,
"preview": "from matplotlib import pyplot as plt\nimport pandas as pd\nimport seaborn as sns\nsns.set_style('white')\n\ndf = pd.read_tabl"
},
{
"path": "indexcov/paper/plot-simons-sex.py",
"chars": 1897,
"preview": "from matplotlib import pyplot as plt\nimport pandas as pd\nimport seaborn as sns\nsns.set_style('whitegrid')\n\ndf = pd.read_"
},
{
"path": "indexcov/paper/scripts/cmp.py",
"chars": 1625,
"preview": "import sys\nimport gzip\nimport itertools as it\nimport numpy as np\nimport scipy.stats as ss\nfrom matplotlib import pyplot "
},
{
"path": "indexcov/paper/scripts/cmp.sh",
"chars": 418,
"preview": "ref=Homo_sapiens.GRCh38.dna.toplevel.fa\nbam=NA12878_S1.bam\nset -eu\nchrom=chr1\nif [[ ! -e st.depth.$chrom.depth.bed ]]; t"
},
{
"path": "indexcov/plot.go",
"chars": 17501,
"preview": "package indexcov\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"image/color\"\n\t\"log\"\n\t\"math\"\n\t\"math/rand\"\n\t\"os\"\n\t\"s"
},
{
"path": "indexcov/template.go",
"chars": 6496,
"preview": "package indexcov\n\nconst chartTemplate = `<!DOCTYPE html>\n<html>\n <head>\n{{ $name := index . \"name\" }}\n{{ $has_sex := "
},
{
"path": "indexcov/test-data/viral.fa.fai",
"chars": 214279,
"preview": "1\t249250621\t52\t60\t61\n2\t243199373\t253404903\t60\t61\n3\t198022430\t500657651\t60\t61\n4\t191154276\t701980507\t60\t61\n5\t180915260\t896"
},
{
"path": "indexcov/types.go",
"chars": 1798,
"preview": "package indexcov\n\nimport (\n\t\"log\"\n\t\"reflect\"\n\t\"unsafe\"\n\n\t\"github.com/biogo/hts/bam\"\n\t\"github.com/biogo/hts/bgzf\"\n)\n\ncons"
},
{
"path": "indexsplit/README.md",
"chars": 1597,
"preview": "indexsplit\n----------\n\n`indexsplit` quickly generates evenly sized (by amount of data) regions across\na cohort. It does "
},
{
"path": "indexsplit/functional-tests.sh",
"chars": 1295,
"preview": "#!/bin/bash\n\ntest -e ssshtest || wget -q https://raw.githubusercontent.com/ryanlayer/ssshtest/master/ssshtest\n\n. ssshtes"
},
{
"path": "indexsplit/indexsplit.go",
"chars": 6078,
"preview": "// Package indexsplit is used to quickly generate evenly sized (by amount of data) regions across\n// a cohort. It does t"
},
{
"path": "multidepth/multidepth.go",
"chars": 6803,
"preview": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"os\"\n\t\"os/exec\"\n\t\"runtime\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\n\targ \"github.com/alexf"
},
{
"path": "samplename/README.md",
"chars": 415,
"preview": "samplename\n==========\n\nreport the samplename(s) from a bam using the read-group info.\n\n```\nUsage: goleft samplename [--e"
},
{
"path": "samplename/functional-tests.sh",
"chars": 484,
"preview": "#!/bin/bash\n\ntest -e ssshtest || wget -q https://raw.githubusercontent.com/ryanlayer/ssshtest/master/ssshtest\n\n. ssshtes"
},
{
"path": "samplename/samplename.go",
"chars": 1316,
"preview": "package samplename\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"strings\"\n\n\targ \"github.com/alexflint/go-arg\"\n\t\"github.com/biogo/hts/bam\"\n\t\"g"
}
]
// ... and 9 more files (download for full content)
About this extraction
This page contains the full source code of the brentp/goleft GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 86 files (4.8 MB), approximately 1.3M tokens, and a symbol index with 308 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.