(biallelic-coll ploidy n-alt-alleles target-allele coll)
Picks up elements in multiallelic coll
and make a biallelic one. Ignores
all alleles other than the reference allele and the target-allele
.
Picks up elements in multiallelic `coll` and make a biallelic one. Ignores all alleles other than the reference allele and the `target-allele`.
(biallelic-genotype genotype target-allele)
Converts a multiallelic genotype
string into a biallelic one. Ignores all
alleles other than the reference allele and the target-allele
.
Converts a multiallelic `genotype` string into a biallelic one. Ignores all alleles other than the reference allele and the `target-allele`.
(dot-or-nil? s)
Checks if given string is equal to "." or nil.
Checks if given string is equal to "." or nil.
(genotype->ints gt)
Convert genotype to a sequence of integers.
Convert genotype to a sequence of integers.
(genotype-index genotype)
Returns an index for given genotype.
Returns an index for given genotype.
(genotype-seq ploidy n-alt-alleles)
(genotype-seq ploidy n-alt-alleles s)
Returns a sequence of genotypes represented as sequences of integers.
Returns a sequence of genotypes represented as sequences of integers.
(info-parser info-meta)
Returns a parser function defined by meta-info. info-meta must be a sequence of map containing keys :id, :number and :type. The parser takes a string and returns a map.
Returns a parser function defined by meta-info. info-meta must be a sequence of map containing keys :id, :number and :type. The parser takes a string and returns a map.
(info-stringifier info-meta)
Returns a stringifier function of INFO field. Takes a vector of maps from info rows of meta-info. The stringifier takes a map and returns a string.
Returns a stringifier function of INFO field. Takes a vector of maps from info rows of meta-info. The stringifier takes a map and returns a string.
(inspect-allele ref alt)
Inspects an alt
allele by comparing to a ref
allele string.
Returns a map containing :type
and other detailed information.
A value of the key :type
can be one of the followings:
:no-call
No variant called:spanning-deletion
Placeholder to signify an absent sequence:unspecified
Unspecified non-ref allele:ref
Duplicated allele of REF:id
Symbolic reference:snv
Single nucleotide variant:mnv
Multiple nucleotide variants:insertion
Insertion of a short base sequence:deletion
Deletion of a short base sequence:complete-insertion
Complete insertion of a long sequence:breakend
Breakend of a complex rearrangement:complex
Complex nucleotide variants other than snv/mnv/indel:other
Can't categorize the allele, might be malformedInspects an `alt` allele by comparing to a `ref` allele string. Returns a map containing `:type` and other detailed information. A value of the key `:type` can be one of the followings: - `:no-call` No variant called - `:spanning-deletion` Placeholder to signify an absent sequence - `:unspecified` Unspecified non-ref allele - `:ref` Duplicated allele of REF - `:id` Symbolic reference - `:snv` Single nucleotide variant - `:mnv` Multiple nucleotide variants - `:insertion` Insertion of a short base sequence - `:deletion` Deletion of a short base sequence - `:complete-insertion` Complete insertion of a long sequence - `:breakend` Breakend of a complex rearrangement - `:complex` Complex nucleotide variants other than snv/mnv/indel - `:other` Can't categorize the allele, might be malformed
(ints->genotype vs)
Convert a sequence of integers to genotype string.
Convert a sequence of integers to genotype string.
(parse-breakend alt)
Parses an ALT allele string of SVTYPE=BND. Returns a map with mandatory keys:
:bases
bases that replaces the reference place:join
:before
or :after
and optional keys for a mate::chr
chromosome name of the mate sequence:pos
genomic position of the mate sequence:strand
strand of the mate sequence
Returns nil
if input alt
is not a breakend.Parses an ALT allele string of SVTYPE=BND. Returns a map with mandatory keys: - `:bases` bases that replaces the reference place - `:join` `:before` or `:after` and optional keys for a mate: - `:chr` chromosome name of the mate sequence - `:pos` genomic position of the mate sequence - `:strand` strand of the mate sequence Returns `nil` if input `alt` is not a breakend.
(parse-filter s)
Parses FILTER field and returns a sequence of keywords.
Parses FILTER field and returns a sequence of keywords.
(parse-format s)
Parses FORMAT field and returns as a sequence of keywords.
Parses FORMAT field and returns as a sequence of keywords.
(parse-genotype gt)
Parses genotype (GT) format and returns a vector of pairs: [allele, phased]. Allele 0 indicates REF allele. 1,2,3... for 1st, 2nd, 3rd allele of ALT.
Parses genotype (GT) format and returns a vector of pairs: [allele, phased]. Allele 0 indicates REF allele. 1,2,3... for 1st, 2nd, 3rd allele of ALT.
(sample-parser formats-meta)
Returns a parser function defined by meta-formats. info must be a sequence of map containing keys :id, :number and :type. The parser takes two string (format-line and sample-line) and returns a map.
Returns a parser function defined by meta-formats. info must be a sequence of map containing keys :id, :number and :type. The parser takes two string (format-line and sample-line) and returns a map.
(stringify-breakend {:keys [chr pos strand join] s :bases})
Returns a string representation of a breakend. If the input is malformed,
returns nil
. See the docstring of parse-breakend
for the format.
Returns a string representation of a breakend. If the input is malformed, returns `nil`. See the docstring of `parse-breakend` for the format.
(stringify-filter fltr)
Stringifies FILTER field. Takes a sequence of keywords or strings.
Stringifies FILTER field. Takes a sequence of keywords or strings.
(stringify-format formats)
Stringifies FORMAT field. Takes a sequence of keywords or strings.
Stringifies FORMAT field. Takes a sequence of keywords or strings.
(stringify-genotype gt-seq)
Stringifies genotype map into VCF-style GT string.
Stringifies genotype map into VCF-style GT string.
(stringify-sample formats sample-map)
Converts sample map into string. formats must be a sequence of keys in sample-map.
Converts sample map into string. formats must be a sequence of keys in sample-map.
(variant-parser meta-info header)
Returns a parser function to parse :filter, :info, :FORMAT and sample columns of VCF. Takes meta-info and header of VCF. The parser takes a variant map and returns a parsed map.
Returns a parser function to parse :filter, :info, :FORMAT and sample columns of VCF. Takes meta-info and header of VCF. The parser takes a variant map and returns a parsed map.
(variant-vals-stringifier meta-info header)
Returns a stringifier function to stringify :filter, :info, :FORMAT and sample columns of VCF. Takes meta-info and header of VCF. The stringifier takes a parsed variant map and returns a map.
Returns a stringifier function to stringify :filter, :info, :FORMAT and sample columns of VCF. Takes meta-info and header of VCF. The stringifier takes a parsed variant map and returns a map.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close