sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
6ed83957fb8c8fef5efa6c237749deb2537d3d4a25aee766190b1565134412ed
Go
7,921
190
// Command Group: "FASTA and Multi-FASTA Tools" // Returns a filtered fasta based on option parameters package main import ( "flag" "fmt" "log" "path" "strings" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/fasta" ) type settings struct { InFile string OutFile string ...
4ab7918a58d3a0b665a494833f170a63c523effa2e9d576bcc448f1a51d2e105
Go
7,926
264
package pFasta import ( "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/dna/pDna" "github.com/vertgenlab/gonomics/fasta" "github.com/vertgenlab/gonomics/vcf" "log" "math/rand" "strings" ) // checks if input pFasta has a sequence with chrom as name and returns its index func checkIfChromInP...
2c2e4c909881cc6449baa04f2c5da2dfaf0202c9a96c684bb3d2cb90de01c0d0
Go
8,037
256
// Command Group: "Variant Calling & Annotation" // Annotate a vcf file by querying various databases via CellBase package main import ( "bytes" "encoding/json" "errors" "flag" "fmt" "io" "log" "net/http" "os" "strings" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fileio" "...
381e696e7f586b44d4a85d5dbae9f9319e51c6fb294de78920818e5262a18ac3
Go
8,159
182
// Command Group: "Sequence Evolution & Reconstruction" // Reconstruct ancient sequences using extant genomes and a newick tree with branch lengths package main import ( "flag" "fmt" "log" "strings" "github.com/vertgenlab/gonomics/dna/pDna" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gon...
c28a6e361c943578cba1873d14ee869eb501eb1baad1d853cd0788034629de5c
Go
8,160
259
package bed import ( "errors" "log" "sort" "strings" "github.com/vertgenlab/gonomics/numbers" ) // SortByCoord sorts in place a slice of Bed structs by their genomic position. func SortByCoord(bedFile []Bed) { sort.Slice(bedFile, func(i, j int) bool { return Compare(bedFile[i], bedFile[j]) == -1 }) } // SortB...
ad882d15112e6dd332e7a0ccee3e97f757cc9a8abddd0aa9b46ea5dae147a43a
Go
8,203
201
// Command Group: "VCF Tools" // Use the variant data in the vcf to edit an input fasta of the reference package main import ( "flag" "fmt" "log" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/fasta" "github.com/vertgenlab/gonomics/vcf" ) // addAnotherCopyOfRef takes an alignment and a n...
6fbbe131c6759d273cfda4de4317f8bb2d167aa0b7c90f04d1d618866da43c6c
Go
8,435
280
package binaryGiraf import ( "bytes" "encoding/binary" "io" "log" "math" "github.com/vertgenlab/gonomics/bgzf" "github.com/vertgenlab/gonomics/cigar" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/dna/dnaThreeBit" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonom...
784a92efae9c937fb3c3d54bd2dba9315e39ad3d20f03376d9405a2dc868e3a0
Go
8,445
264
package bigWig import ( "testing" ) var readHeaderTests = []struct { InFile string ExpectedBbiHeader BbiHeader ExpectedZoomHeaders []ZoomHeader ExpectedTotalSummary TotalSummaryBlock ExpectedChromTreeHeader ChromTreeHeader ExpectedChromTreeNodes []ChromTreeNode }{ {InFile: "test...
b3769ec727468c8bca6322bf5d21c47ebe216e1e045d7ac3e6eead9e9fc2a146
Go
8,480
236
package main import ( "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/fasta" "github.com/vertgenlab/gonomics/fasta/pFasta" "github.com/vertgenlab/gonomics/fileio" "testing" ) var ReconstructSeqTests = []struct { NewickFile string FastaFile string OutFile ...
414b28eff4242e07b48dc5c6ae1cbfd08ff959731fc746862e83fe7742f55bb0
Go
8,490
218
// Package wig provides functions to read, write, and manipulate wig files. // more information on the WIG file format can be found at https://genome.ucsc.edu/goldenPath/help/wiggle.html package wig import ( "errors" "fmt" "github.com/vertgenlab/gonomics/chromInfo" "github.com/vertgenlab/gonomics/exception" "gith...
a502dbf9a3d6839da65a2643980cd1eedc2ad6090864cd86e6c73781fb7be54f
Go
8,494
201
// Package gene contains structs and functions to help understand protein-coding genes. package gene import ( "errors" "github.com/vertgenlab/gonomics/dna" ) type Feature int32 type MutationType byte const ( Intron Feature = -1 UtrThree Feature = -3 UtrFive Feature = -5 // All positive values refer to cDN...
4f9e5753e7dc7b6c0212c8fb2ac6db73b4b602fae49bfab70c83a921eee0e080
Go
8,677
228
package lift import ( "log" "math" "strings" "github.com/vertgenlab/gonomics/numbers" "github.com/vertgenlab/gonomics/numbers/logspace" ) // ElementOverlapProbabilities returns a slice of float64 representing the probabilities that an element in elements2 overlaps an element in elements1. func ElementOverlapPro...
3e1319b806cad430aaf672f2014fadc4a3d48936fdb5ee1c4c7924bdffabfecd
Go
8,698
315
// Notes: // set divBedDir = "/work/yl726/pfaDivBedOutputs", files like chr5.107183644.107184616.Consensus_HAQER_0316.bed // set vcfDir = "/hpc/group/vertgenlab/raven/PrimateT2T_20way/selection_hs1/populationData/Filtered", files like chr22.segSite.vcf.gz // (only for reference now, not used in program) divSegDir = ...
4c4f052444054248b0461575806f213062a635be487cda4189ca583108b9a08f
Go
8,743
209
// Command Group: "Variant Calling & Annotation" // A tool to find variation between multiple alignment files package main import ( "errors" "flag" "fmt" "log" "path/filepath" "strings" "sync" "time" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fasta" "github.com/vertgenlab/g...
c1df30e2ac63da2e6b9ba3bfb0aa3810c8d670e1df2665f1b8df4b1289613cc0
Go
8,748
196
package main import ( "os" "testing" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fasta" "github.com/vertgenlab/gonomics/fileio" ) func TestAllPossibleOneHumanNonGeneric(t *testing.T) { var err error var hum fasta.Fasta = fasta.Fasta{Name: "h...
038d6b530e3b0e1d7e550ca834854be2f0b85864bde571796b04048833ef1000
Go
8,774
238
package sam import ( "testing" "github.com/vertgenlab/gonomics/dna" ) var DiploidBaseCallFromPileTests = []struct { P Pile RefBase dna.Base Delta float64 Gamma float64 Epsilon float64 Lambda float64 Expected DiploidBase }{ {P: Pile{CountF: [13]int{16, 14, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}},...
f2158a3e3c6e3c72903fd24f3c78619412e58b79e75bb310184f0dd56183fa32
Go
8,849
342
package sam import ( "bytes" "encoding/hex" "io" "log" "math" "strconv" "strings" "github.com/vertgenlab/gonomics/bgzf" "github.com/vertgenlab/gonomics/cigar" "github.com/vertgenlab/gonomics/exception" ) // BamWriter wraps a bgzf.BlockWriter and provides functions to write // a Sam struct to a binary Bam f...
f8b5bc9785cced3da398cb3e712ba8997bbc986d00d4b2b43b2f4d61ca706fb0
Go
8,917
218
package popgen import ( "fmt" "log" "math" "math/rand" "os" "runtime/pprof" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fileio" "github.com/vertgenlab/gonomics/numbers" "github.com/vertgenlab/gonomics/numbers/logspace" "golang.org/x/exp/slices" ) // To access debug prints, s...
d3f8f8c948ccb8a91deb356dec9a31dec987ec45b4740d86c3f860f5d44f79b1
Go
8,923
311
// Command Group: "Sorting" // Executes an external merge sort of the input file based on desired sort criteria package main import ( "flag" "fmt" "github.com/vertgenlab/gonomics/fastq" "log" "os" "path" "path/filepath" "strings" "github.com/vertgenlab/gonomics/axt" "github.com/vertgenlab/gonomics/bed" "g...
96841fd64577871a8c9a5030437b5e1d666c02660d8032b8590ebc62608f44f2
Go
8,928
265
package main import ( "flag" "fmt" "github.com/vertgenlab/gonomics/bed" "log" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fasta" "github.com/vertgenlab/gonomics/fileio" ) type Settings struct { InFa string //input fasta file with 2 ali...
341ab4cb5d777e67493d02dd89f776b9f30213c7a4b48bb7d86892eb4833d6c5
Go
9,028
234
// Package lift provides an interface and utilities for working with genomic regions and offer flexibility to modify their coordinates. package lift import ( "github.com/vertgenlab/gonomics/axt" "github.com/vertgenlab/gonomics/dna" "io" "log" "path" "github.com/vertgenlab/gonomics/bed" "github.com/vertgenlab/g...
6717c0085d7c445483fc6ab3ba9cc90b1fe4fef8b6c2ade68effa1cca5ce8b38
Go
9,055
202
// Command Group: "FASTA and Multi-FASTA Tools" // Using a four-way multiple alignment (including the reference species followed by three successive outgroups), // this program calculates branch lengths in units of estimate substitutions for regions in the alignment specified by an input bed file package main import ...
5eee25b3dfab82f7697a1b39c85feaecc7fd799e1a44b473c31118396a492ed3
Go
9,163
239
package genomeGraph import ( "fmt" "math" "strings" "sync" "github.com/vertgenlab/gonomics/cigar" "github.com/vertgenlab/gonomics/fastq" "github.com/vertgenlab/gonomics/fileio" "github.com/vertgenlab/gonomics/giraf" "github.com/vertgenlab/gonomics/numbers/parse" "github.com/vertgenlab/gonomics/sam" ) func ...
853217486b0a9048df39f0baee53f3316139234a83b6910d5d54ad1dd7863954
Go
9,189
285
package fit import ( "github.com/vertgenlab/gonomics/numbers" "log" "math" "math/rand" ) // MixtureModel holds data, results, and working memory for running the EM algorithm. type MixtureModel struct { Data []float64 // 1d data slice K int // number of component distributions M...
51da3e3e3e71bd406d9b0d3a1bb2eb1168e1bf43e221cb50b41bdfa77a3082e1
Go
9,202
242
//Command Group: BED Tools // geneAssignmentStats compares a bedpe containing a gene symbol in the name field to a test set of output from // assignGenomeSpace command which assigns every base in the genome a closest gene either from proximity or from a 3d contact map. package main import ( "flag" "fmt" "github.co...
c4782efcdafe869af03c6024af4368816fc4106e603f60a1357cd42956bd45f0
Go
9,209
275
// Package chain declares the Chain struct that describes an alignment block and contains functions that operates on chain structs. package chain import ( "fmt" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fasta" "github.com/vertgenlab/gonomics/fi...
24a9ec533285c426918780b556dcd447b621085d8a9793cd1c1dd15ce044c732
Go
9,239
244
// Command Group: "General Tools" // Lifts a compatible file format between assembly coordinates package main import ( "flag" "fmt" "io" "log" "strings" "unicode/utf8" "github.com/vertgenlab/gonomics/chain" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenl...
7518f2315ae4f0d7e8e03d1a395eee153475907a6d4ce34249bbc058f5845049
Go
9,529
255
// Package ontology provides functions for gene ontology enrichment analysis. package ontology import ( "fmt" "github.com/vertgenlab/gonomics/bed" "github.com/vertgenlab/gonomics/bed/bedpe" "github.com/vertgenlab/gonomics/chromInfo" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/filei...
c88e719493e14151315a8e8e8b87a9f7ced59bc04e0e85bbb58bd33ebf13b462
Go
9,585
299
package binaryGiraf import ( "bytes" "encoding/binary" "fmt" "io" "log" "strings" "github.com/vertgenlab/gonomics/bgzf" "github.com/vertgenlab/gonomics/cigar" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/dna/dnaThreeBit" "github.com/vertgenlab/gonomics/exception" "github.com/vertge...
c722e13750cdfb9b4c95ddfc3480a8d5184eb8b554cc793472bb9a5f41f33f90
Go
9,590
271
// Command Group: "Variant Calling & Annotation" // Separates a sam alignment from a heterozygous individual package main import ( "flag" "fmt" "log" "strings" "github.com/vertgenlab/gonomics/fileio" "github.com/vertgenlab/gonomics/vcf" ) func usage() { fmt.Print( "alleleSplit - separates a sam alignment f...
10f2ff364ef1d8d2ae873f0c46eda527fd748af8c0b0e086c05a49b967a82b19
Go
9,656
262
// Command Group: "BED Tools" // Options to alter bed formatting package main import ( "flag" "fmt" "github.com/vertgenlab/gonomics/bed" "github.com/vertgenlab/gonomics/chromInfo" "github.com/vertgenlab/gonomics/convert" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fileio" "githu...
349ba4a065f4ba8fcae9bcd484a9e197a00380d05dbb8577fc9a0f5d929a0ee4
Go
9,663
319
package gene import ( "errors" "log" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/numbers" ) // Insertion adds bases to the Gene, predicts the effect, and updates the Gene struct to reflect the change. // The position should be the base-zero genomic coordinate of the base directly BEFORE ...
d2d92128bf38b014fe181adccc421e0d508c194ed8081aa2ea415666cddbce8c
Go
9,784
352
package main import ( "fmt" "os" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fasta/pFasta" "github.com/vertgenlab/gonomics/fileio" "testing" ) var extractTests = []struct { InFile string Chrom string OutName string OutFile string Start int End ...
23c5a7d440cc00ccc7cce73039b8271f7fab8ecc6945c5877e328ac49e9c2087
Go
9,810
266
package dna import ( "fmt" "log" "strings" "testing" ) var dnaStrings = []string{ "ACGTacgtNn", "AAAAAACCCCCGGGGTTTTT", "aaaaaCCCCTTTaaaaa", "NNNNNAAAaaaTTT", } func TestDnaToFromString(t *testing.T) { for _, input := range dnaStrings { bases := StringToBases(input) answer := BasesToString(bases) if i...
10ac70917d45ff515da7cc075e94d0df1c409f4c0a50f6a5fb653b898b871c07
Go
9,849
259
package simulate import ( "fmt" "log" "math/rand" "strings" "github.com/vertgenlab/gonomics/cigar" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/fileio" "github.com/vertgenlab/gonomics/numbers" "github.com/vertgenlab/gonomics/sam" ) // IlluminaPairedSam generates pairs of sam reads ra...
1e8a541e9fb95fd8d51665b8d14b90a4311e32586171cd5159da5eeb458ee082
Go
9,882
305
package sam import ( "bytes" "encoding/binary" "log" "math" "sort" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fileio" ) // bai files are an index format for bam files // Specs for bai can be found in section 5.2 on page 19 of: // https://raw.githubusercontent.com/samtools/hts-s...
86d170e83321df4034851914008e9fdf811a77d28f15c10309411e73815aafcb
Go
9,931
272
package browser import ( "fmt" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fasta/pFasta" "github.com/vertgenlab/gonomics/fileio" "log" "strings" "unicode/utf8" ) // PFaVisualizer produces command line visualizations of pFasta format alignments from a specified start and end posit...
28e7aa065ab1100fd8cd069ada3a236de1e6d7efad93f2b7e572fcf3818a73d2
Go
10,044
290
// Command Group: "BED Tools" // Filters bedpe entries based on overlaps from the select file. package main import ( "flag" "fmt" "log" "github.com/vertgenlab/gonomics/bed" "github.com/vertgenlab/gonomics/bed/bedpe" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fileio" "github.co...
138212287a393f435154fc3fd26dc36480946fda9c323165bab762492a7f4ded
Go
10,121
219
package numbers import ( "log" "math" "github.com/vertgenlab/gonomics/numbers/logspace" ) // LogIntegrate evaluates log(int_a^b f(x)dx) in cases where f returns log(f(x)). Uses the rectangle rule. func LogIntegrate(f func(float64) float64, a float64, b float64, n int) float64 { if a >= b { log.Fatalf("logInteg...
7ad33dfbf4ff9d03589d5eb3d688a345119dc977473e62fab8db23d8353497f9
Go
10,124
357
package browser import ( "testing" "github.com/vertgenlab/gonomics/dna/pDna" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fasta/pFasta" "github.com/vertgenlab/gonomics/fileio" ) var PrintOneSetLinesTests = []struct { LineLength int SetOfLinesIdx int NumIters int LineA ...
1c847256351869ce1851e2148b2ad73ed9628afeffffb72100f8d0c5a82e1744
Go
10,225
356
// Package maf provides structs and functions for processing alignments in maf format. // The file format is described more here: https://genome.ucsc.edu/FAQ/FAQformat.html package maf import ( "fmt" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fil...
181e587b641e0982f0e3d7ba61d4e84f99ed174bec1b5730c1148ca1fd4c7702
Go
10,269
264
package simulate import ( "fmt" "log" "math" "math/rand" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fasta" "github.com/vertgenlab/gonomics/fileio" "github.com/vertgenlab/gonomics/numbers" ) // RandIntergenicSeq makes a randomly generated D...
d346a0bd7be077623daa1802071e3cf7b095df585d7408d6176149ed5033d921
Go
10,302
287
// Package obo provides functions for reading, writing, and manipulating Open Biomedical Ontologies (obo) format files. // This package follows the OBO Flat File Format 1.4, as specified here: http://owlcollab.github.io/oboformat/doc/obo-syntax.html package obo import ( "fmt" "io" "log" "strings" "github.com/ver...
9ec6968e5a0f6bc1224a6036c1e516146b3b5f80a1f2ca352d54c14ac56f27d5
Go
10,343
311
// Package expandedTree contains structs and functions that build and utilize information in a binary tree format that can be used for genome simulation and reconstruction package expandedTree import ( "errors" "fmt" "log" "strconv" "strings" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics...
f76f0ee333c9a110d4cb3e943bcd547a785a864e211315bab8e8f40e4163185a
Go
10,379
189
// Command Group: "Data Conversion" // Uses globalAlignment, affineGap (instead of constGap) to align 2 .fasta files, each with only 1 sequence, then convert cigars to ins and del beds package main import ( "flag" "fmt" "github.com/vertgenlab/gonomics/align" "github.com/vertgenlab/gonomics/bed" "github.com/vertg...
4175d3a8024f4bfb023424dc5671ce7b186be74e571e44976d7d77c92d057e16
Go
10,442
336
package sam import ( "bytes" "errors" "io" "log" "strings" "github.com/vertgenlab/gonomics/bgzf" "github.com/vertgenlab/gonomics/chromInfo" "github.com/vertgenlab/gonomics/cigar" "github.com/vertgenlab/gonomics/dna" ) // bam is a binary version of sam compressed as a bgzf file // specs can be found in the s...
e6198e5272636faf91eca8e3a170d36a58d712066f018ee0e1320339eacdce18
Go
10,503
266
package main import ( "flag" "fmt" "github.com/vertgenlab/gonomics/numbers" "log" "os" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fasta" "github.com/vertgenlab/gonomics/fileio" "github.com/vertgenlab/gonomics/sam" ) // PriorSettings defin...
c045be32101361aff0d93e7eef41f67094ce8728382e9586832ae7eb41d32a2d
Go
10,794
375
// Command Group: "VCF Tools" // Provides summary statistics on an input VCF file package main import ( "flag" "fmt" "io" "log" "strings" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fasta" "github.com/vertgenlab/gonomics/fileio" "github.co...
2cba2e3d8bac193e50fc50bf6cc3df0ab8c3cf2dd87b5d40793837514bb8adf6
Go
10,865
284
package variant import ( "github.com/vertgenlab/gonomics/dna" ) // CodingChange describes a change of a protein sequence caused by // a mutation affecting the coding sequence of the corresponding gene. // CodingPos and ProteinPos refer to the zero-based start position of // the change. The CodingPos always refers to...
0684b077742648357d3899a6c5647282e53147523140880538c8177557aa7b51
Go
10,961
402
package sam import ( "bytes" "encoding/hex" "errors" "fmt" "github.com/vertgenlab/gonomics/exception" "log" "math" "strconv" "strings" ) // QueryTag returns the value of tag t for read s. Currently QueryTag // is only supported if the sam was read from a bam file. If no tag // data is present, or if the reco...
79bd10fc6cb834081682fc2f72f0745add8779ea8e2daeb24c9e2aae2fe7cd2e
Go
10,980
431
package dna import ( "errors" "log" "strings" ) // Codon is an array of three DNA bases for genetic analysis of proteins and amino acids. type Codon [3]Base // AminoAcid converts the twenty canonical amino acids and stop codon into bytes. type AminoAcid byte const ( Ala AminoAcid = 0 Arg AminoAcid = 1 Asn ...
7fdfa098c95f13c6fe378fc3bba6acfa90c9dac933e98598a87b26aa050458e2
Go
11,068
254
package popgen import ( "log" "math" "strings" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/fasta" "github.com/vertgenlab/gonomics/numbers" "github.com/vertgenlab/gonomics/numbers/logspace" "github.com/vertgenlab/gonomics/vcf" ) /* This file implements functions to construct a Hierarc...
7cfc5132ad43f652e4c124b831d396e7157c8e560663a2a9c053223515e48452
Go
11,250
392
package interval import ( "io" "math/rand" "testing" "time" "github.com/vertgenlab/gonomics/bed" "github.com/vertgenlab/gonomics/numbers" ) func TestQuery(t *testing.T) { type testQuery struct { query *bed.Bed relationship string hasOverlap bool } var targetIntervals []Interval = []Interval{...
1fc4808c430a9f72177a7a6542f1619c76f8c28c708d5b6b34d8246377e99e14
Go
11,375
244
// Command Group: "Statistics & Population Genetics" // Performs velocity and acceleration on a four way multiple alignment in multiFa format package main import ( "flag" "fmt" "log" "github.com/vertgenlab/gonomics/bed" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/exception" "github.co...
37e5c6f5d43597704ec9237449e806b42270712bdb106f45863beb53219b987d
Go
11,387
339
package main import ( "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fileio" "math" "os" "testing" ) var WigMathTests = []struct { InFile string OutFile string ChromSizes string BedMask string MinValue float6...
0b0a23153d66b3193cf5f71e3fa70cd0b8187c2656204971ce96b4c85796e0a0
Go
11,438
246
// Command Group: "Statistics & Population Genetics" // Returns the p-value of enrichment and depletion for overlaps between the elements in two input files package main import ( "flag" "fmt" "github.com/vertgenlab/gonomics/bed" "github.com/vertgenlab/gonomics/numbers" "log" "github.com/vertgenlab/gonomics/exc...
1bcc29b2521ddb9c6d0f4d9c7826f2f466d882c6a558f66b1fa46fca7854e3c0
Go
11,463
318
// Notes: // CLI inputs below // bedFile == /hpc/group/vertgenlab/raven/PrimateT2T_20way/aqers/T2T/niceName/human.bed, Consensus HAQER bed, 1596 lines, column 4 is HAQER name/ID // pfaDir == /hpc/group/vertgenlab/raven/PrimateT2T_20way/work/yl726/PrimateT2T_20way/haqerTmp.humanT2T, files like chr22.pFa.gz // outDir == ...
f4587b783ecb9df9013a43a5a0efa01ffec4fab6af22b7fa7551111f3b1a5ae0
Go
11,514
246
// Command Group: "Statistics & Population Genetics" // Returns a tab separated list of function evaluations for plotting functions package main import ( "flag" "fmt" "github.com/vertgenlab/gonomics/numbers" "github.com/vertgenlab/gonomics/numbers/parse" "github.com/vertgenlab/gonomics/popgen" "log" "strings" ...
a0b8bb45d29c2b8fdbe99fd0f9c433c1be6ef5631041af19fa5386edd35f775a
Go
11,551
378
package gene import ( "testing" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/fasta" "github.com/vertgenlab/gonomics/gtf" ) func TestDeletion(t *testing.T) { g := gtf.Read("testdata/test.gtf") f := fasta.Read("testdata/test.fasta") var err error gene := GtfToGene(g["test_gene_id"], f)...
cae6386f1e0cdbfcfd5525911a805cab9b90dcd46e507a09ccba769eed0c6eca
Go
11,688
202
package sam import ( "log" "math" "github.com/vertgenlab/gonomics/numbers/logspace" ) // AncientLikelihoodCache stores the following short expressions from the likelihood functions to // save on repeated logspace.Pow calls. type AncientLikelihoodCache struct { EpsilonOverThree []f...
1617cd570c176ed0bd16a4f4c79cc70af5ce7d64bb270be2eaa68512c649133d
Go
11,756
258
// Command Group: "General Tools" // Write out lastZ pairwise inputs using contig alignment where multiple references are being used package main import ( "flag" "fmt" "log" "os" "path" "path/filepath" "strings" "github.com/vertgenlab/gonomics/fileio" "github.com/vertgenlab/gonomics/lastZWriter" ) // MakeA...
c974b418049e3205824e641fd3f84904b89abbc80daaf4e626446b2c0770ec4b
Go
11,858
334
// Package gtf contains functions for reading, writing, and manipulating GTF format files. // More information on the GTF file format can be found at http://genomewiki.ucsc.edu/index.php/Genes_in_gtf_or_gff_format // Structs in the GTF package are organized hierarchically, with the gene struct containing the underlying...
9a980a7974983404943d667048fdbca673b2191612e60b91dae9c0d24bd2ea5d
Go
11,875
303
package motif import ( "fmt" "github.com/vertgenlab/gonomics/bed" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/dna/dnaTwoBit" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fasta" "github.com/vertgenlab/gonomics/fileio" "log" "math" ) // ScoreWindow returns...
d69957a37021824244d903312a3e216fa29394c2fdddc4e7a26e90e3a7d1f6ef
Go
11,898
336
package genomeGraph import ( "log" "sync" "testing" "time" "github.com/vertgenlab/gonomics/fastq" "github.com/vertgenlab/gonomics/fileio" "github.com/vertgenlab/gonomics/giraf" ) func TestWorkerWithWriting(t *testing.T) { var output string = "testdata/pairedTest.giraf" var tileSize int = 32 var stepSize in...
e9979b1fb1ac23a8dc1898987e84f4ec6cd76c2312a14568b7dda8f98396bdf3
Go
11,920
343
package genomeGraph import ( "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/fasta" "github.com/vertgenlab/gonomics/numbers" "github.com/vertgenlab/gonomics/numbers/parse" "github.com/vertgenlab/gonomics/vcf" "log" "strings" ) func VariantGraph(ref <-chan fasta.Fasta, vcfMap map[string][]v...
9bc0553e0fbd14995c3cf9612f224f96910402d4e175ee05fdf5f7551a01fbcb
Go
11,966
384
package vcf import ( "fmt" "io" "log" "strconv" "strings" "github.com/vertgenlab/gonomics/chromInfo" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fileio" ) // Header contains all information present in the header section of a VCF. // Info, Filter, Format, and Contig lines are pa...
f20f0972d354f19d12947be0f9aa684535c34f492de8faa42fe52e7f069c388d
Go
12,113
324
// Command Group: "Statistics & Population Genetics" // Command line statistics calculator package main import ( "flag" "fmt" "log" "math/rand" "strings" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fileio" "github.com/vertgenlab/gonomics/numbers" "github.com/vertgenlab/gonomic...
aa39796a02bdd2733afce3ebebf11e4eae60d9ed538ce7ee2abf16860950a1c7
Go
12,430
338
// Command Group: "Data Conversion" // Generates a fasta file from a sam over a reference sequence package main import ( "flag" "fmt" "log" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/fasta" "github.com/vertgenlab/gonomics/sam" ) type Settings struct { SamFileName string RefF...
c28e3f330bc098c64470dc35adc740cdadfbe205a9c81b0e62512d92816f7346
Go
12,487
382
package gene import ( "testing" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/fasta" "github.com/vertgenlab/gonomics/gtf" ) func TestInsertion(t *testing.T) { g := gtf.Read("testdata/test.gtf") f := fasta.Read("testdata/test.fasta") var err error gene := GtfToGene(g["test_gene_id"], f...
692d3973c292b500f12b28d60f31ba5c981f5af27f9890f77a6edb534d392c22
Go
12,544
382
package vcf import ( "log" "strconv" "strings" "github.com/vertgenlab/gonomics/exception" ) // ParseInfo parses the data stored in vcf.Info. // Fills an unexported map in the Vcf struct // that can be queried with Query(type) functions. func ParseInfo(v Vcf, header Header) Vcf { v.parsedInfo = make(map[string]i...
7ac91026c07a6f28d4f3713623ffd3b1cb03d817a5b0ef8c069723a72a38c6af
Go
12,756
311
package ontology import ( "github.com/vertgenlab/gonomics/bed" "github.com/vertgenlab/gonomics/bed/bedpe" "github.com/vertgenlab/gonomics/chromInfo" "github.com/vertgenlab/gonomics/interval" "github.com/vertgenlab/gonomics/numbers" "log" ) // Fill3dSpace takes in a set of Bedpe format contact points, single-bas...
ec1264b69949affe0cc6b7e8f2056995f19d828e3b3225c616671c57265e3c97
Go
12,874
312
// Command Group: "Data Conversion" // Convert HiC contact maps in straw format to bedpe contact peak calls package main import ( "flag" "fmt" "github.com/vertgenlab/gonomics/bed" "github.com/vertgenlab/gonomics/bed/bedpe" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fileio" "gith...
c9c3d1fc54e7a27c84fe6b6d7799a0038170bd7a0203f86a4fa466e165a01ae8
Go
13,022
316
package sam import ( "fmt" "log" "math" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/numbers" "github.com/vertgenlab/gonomics/numbers/logspace" ) // InsertionType encodes the insertion genotype state, which can be one of the four constant values explained below. type InsertionType byte ...
45c835a737a193d76b6a16cf6316da7efa5e9f9f339b74fbd1f9b842e0551394
Go
13,413
410
package main import ( "fmt" "log" "math/rand" "strconv" "strings" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fasta" "github.com/vertgenlab/gonomics/popgen" "github.com/vertgenlab/gonomics/simulate" ) // SimMain function to be called in si...
277ad609bb4bda9d632dccace327da5ab0b4afba4e574c4e71a0aa0ee5b9f9d7
Go
13,716
374
package numbers import ( "fmt" "log" "math" "github.com/vertgenlab/gonomics/numbers/logspace" "github.com/vertgenlab/gonomics/numbers/parse" ) // NormalDist returns the normal distribution value x for a distribution with mean mu and standard deviation sigma. func NormalDist(x float64, mu float64, sigma float64)...
a3a9f7cf32b97056b288827d34241b67fe920622c187553a87567d2403926111
Go
13,919
448
// Package interval provides functions for manipulating and analyzing intervals including // sorting, calculating overlaps, and liftover functions. package interval // Adapted from Mao, Eran & Luo 2019 // DOI: 10.1038/s41598-019-41451-3 import ( "fmt" "sort" "golang.org/x/exp/slices" ) // Interval is a type inte...
b20ad2a315ea63ab28b43965e7c2564cdcbc4b0a5c1120262400244c9f79ead8
Go
13,991
342
package main import ( "flag" "fmt" "github.com/vertgenlab/gonomics/bed" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fileio" "github.com/vertgenlab/gonomics/numbers" "github.com/vertgenlab/gonomics/wig" "log" "math" "math/rand" "os" "sort" ) // MathSettings defines the usage ...
2a11efaefcf15e9a04f8230d3c2fff6d23f8b6e8192e8c571814be52abcd929f
Go
14,052
351
package genomeGraph import ( "log" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/dna/dnaTwoBit" "github.com/vertgenlab/gonomics/fastq" "github.com/vertgenlab/gonomics/numbers" ) func extendToTheRight(node *Node, read fastq.FastqBig, readStart int, nodeStart int, posStrand bool) []*SeedDev...
da02bff1565738f3c05b30027bd572b221ee173d8645c02f2fee135fc82a83f3
Go
14,165
477
package main import ( "flag" "fmt" "log" "os" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fasta" "github.com/vertgenlab/gonomics/fileio" "github.com/vertgenlab/gonomics/sam" ) type ScoreSettings struct { ScoreType string InFileList strin...
c955d2a93b5789a86a43592d1a74dcde24237977cdde282a482c6118a2891b5c
Go
14,641
320
package motif import ( "fmt" "github.com/vertgenlab/gonomics/bed" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fasta" "github.com/vertgenlab/gonomics/fileio" "github.com/vertgenlab/gonomics/numbers" "log" "math" ) type MatchCompSettings struc...
17aea9a47a3dc195fe74141265596e78a42152abe9285ab40f073d054f1e2216
Go
14,664
361
package main import ( "flag" "fmt" "github.com/vertgenlab/gonomics/bed" "github.com/vertgenlab/gonomics/convert" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fasta" "github.com/vertgenlab/gonomics/fileio" "log" "strings" ) type Settings stru...
3b0e1b4beac77ef1a34d490b54e593a1c665aa2d8648967029ef924f56e629bc
Go
14,677
458
package sam import ( "fmt" "io" "log" "strconv" "strings" "sync" "github.com/vertgenlab/gonomics/chromInfo" "github.com/vertgenlab/gonomics/cigar" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fileio" ) // readSamToChan streams the input Sa...
dd46b31a930d565036474f1ad17973e437267929ae2498ea4c5413578016c7b0
Go
15,182
476
package sam import ( "fmt" "log" "github.com/vertgenlab/gonomics/chromInfo" "github.com/vertgenlab/gonomics/cigar" "github.com/vertgenlab/gonomics/dna" ) // Pile stores the number of each base observed across multiple reads. // The number of a particular base can be retrieved by using the dna.Base // as the ind...
9bac007cd3f626d44ee862d4df8d71f4497620329354e87e7614b18025e452bf
Go
15,483
364
package sam import ( "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/fileio" "github.com/vertgenlab/gonomics/numbers" "github.com/vertgenlab/gonomics/numbers/logspace" "github.com/vertgenlab/gonomics/numbers/parse" "log" "math" "strings" ) type DiploidBase byte const ( AA DiploidBase = ...
3e64a73dfcfd260797b281e9a7a00b7c467f62a30102da22df10043b63cdd842
Go
15,656
482
// Command Group: "VCF Tools" // Filter vcf records package main import ( "flag" "fmt" "log" "math" "math/rand" "strings" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fileio" "github.com/vertgenlab/gonomics/popgen" "github.com/vertgenlab/gonomics/vcf" ) // coordinate is a chr...
c4ccdc8e6e4d25883c94191b4ffcb94093b45b16069b79f21a3e04d4df11646a
Go
15,816
521
// Copyright 2020 Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wr...
68f199927622f18a99b16c4446eaa644f5aa1b3010f57742d9e3c5675370b799
Go
16,006
453
package fasta import ( "github.com/vertgenlab/gonomics/dna" "log" // "fmt" ) // RefPosToAlnPos returns the alignment position associated with a given reference position for an input MultiFa. 0 based. func RefPosToAlnPos(record Fasta, RefPos int) int { var refStart, alnStart = 0, 0 for t := alnStart; refStart < R...
2045e7e2d1a1c252b308c34a4c20531e17abc61883a640af2a2e9866496f6077
Go
16,120
457
package gene import ( "errors" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/numbers" ) var ( ErrNoStopFound = errors.New("frameshift was unable to find a stop before the end of the gene") ) // Deletion removes bases from the Gene, predicts the effect, and updates the Gene struct to refle...
3d631d33f64e50e764799d9fa1b41546adf6a70761c4b18e4f541b8d720275df
Go
16,326
343
package fit import ( "github.com/vertgenlab/gonomics/numbers" "github.com/vertgenlab/gonomics/numbers/logspace" "log" "math" "math/rand" ) // direction is a type used to define the heading in coordinate ascent. type direction byte const ( neutral direction = 0 north direction = 1 northeast direction = ...
eab62dded1b9138158b67aeb9f30fd1db9cd8499349b212fb69cb685de2fad95
Go
16,425
385
package align import ( "fmt" "log" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/fasta" ) // the trace data structure is a 3d slice where the first index is 0,1,2 and represents the match, gap in x (first seq), and gap in y (second seq). // m used to have the same data structure as trace, ...
77295e3f97fc16342c2ded6a36da280d9734b4ff88c732fff70955a00307354d
Go
16,530
400
// Package reconstruct has tools for reconstructing ancient genomes from the genomes of extant species using newick trees and fasta files. package reconstruct import ( "log" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/dna/pDna" "github.com/vertgenlab/gonomics/expandedTree" "github.com/ve...
0439f37701b7acef5fc74596cdd22dfac5f34c9ea9c435175543b1ef51200a8f
Go
16,650
369
// Package convert contains functions for converting data between standard file formats. This is a high level package that avoids circular dependencies. package convert import ( "log" "github.com/vertgenlab/gonomics/bed" "github.com/vertgenlab/gonomics/bed/bedGraph" "github.com/vertgenlab/gonomics/chromInfo" "gi...
99f575c13a5b5f29f00f486e2a031e35a5e5a589774ba2c01cdecb8655fb511e
Go
16,791
346
// Package phylo contains functions related to phylogenetic analysis from multiple sequence alignment data. package phylo import ( "log" "math" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/fasta" "github.com/vertgenlab/gonomics/numbers" ) // AccelDistancesAndWeights represents a set of a...
d0db2ab53ece3c6a8d0a1a2bc531c7c2a5b791da51674ae9c3c1f74bdec57c65
Go
16,915
520
package main import ( "fmt" "sort" "strconv" "strings" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fasta" "github.com/vertgenlab/gonomics/numbers" "github.com/vertgenlab/gonomics/sam" "github.com/vertgenlab/gonomics/vcf" ) type variantType...
1460dd06a5c10524bd1910d87359a507fcb8eab31f36bc88965fab6507d1ae65
Go
17,138
507
package gtf import ( "fmt" "math" "strings" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/numbers" ) // VariantToAnnotation generates an annotation which can be appended to the INFO field of a VCF // Annotation format is: GoEP= Genomic | Gene | cDNA | Protein | VariantType // Genomic cDNA...
2e994739291fcdd55d61e892387e2422a381a19f0f616aa4ff9dda0e9b100c35
Go
17,381
427
// Command Group: "Sequence Evolution & Reconstruction" // WARNING: this program is now deprecated. Please use 'reconstructSeq' as its replacement. // Returns maximum likelihood sequence from an HBCGO primate alignment package main import ( "flag" "fmt" "log" "github.com/vertgenlab/gonomics/dna" "github.com/ver...
8c08771adf22912106ab47072a8b940f22861ffeadfe22591a438e590b31388d
Go
18,209
546
package gtf import ( "fmt" "math" "reflect" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/interval" "github.com/vertgenlab/gonomics/vcf" ) type vcfEffectPrediction struct { vcf.Vcf RefId string // e.g. NC_000023.10, LRG_199, NG_012232.1, NM_004006.2, LRG-199t1, NR_002196.1, NP...
659b204f190e22081363ac116fd323d5f152a2c67d48a268dc6fc2d5d41a7e5e
Go
19,036
289
package main import ( "fmt" "github.com/vertgenlab/gonomics/dna" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fasta" "github.com/vertgenlab/gonomics/fileio" "github.com/vertgenlab/gonomics/numbers" "github.com/vertgenlab/gonomics/numbers/logspace" "log" "math" ) // incrementWind...
a33d8378b404331c722357ccddc219ca4e4eee2fcd81e2b2dd31bcd723139083
Go
19,436
456
package variant import "github.com/vertgenlab/gonomics/dna" // Reference sequence used in the following tests // // Seq Idx : 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 // CDS Idx : 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 // Seq : C A A T G C A...
f42f746213091ff67450dc1f0ad3fa078254d61aa3ff0bdfd387990004f7de53
Go
19,702
322
package main import ( "fmt" "log" "math" "strings" "github.com/vertgenlab/gonomics/dna/pDna" "github.com/vertgenlab/gonomics/exception" "github.com/vertgenlab/gonomics/fasta/pFasta" "github.com/vertgenlab/gonomics/fileio" "github.com/vertgenlab/gonomics/numbers" "github.com/vertgenlab/gonomics/numbers/logsp...