Liking cljdoc? Tell your friends :D

cljam.io.vcf.util


biallelic-collclj

(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`.
sourceraw docstring

biallelic-genotypeclj

(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`.
sourceraw docstring

dot-or-nil?clj

(dot-or-nil? s)

Checks if given string is equal to "." or nil.

Checks if given string is equal to "." or nil.
sourceraw docstring

genotype->intsclj

(genotype->ints gt)

Convert genotype to a sequence of integers.

Convert genotype to a sequence of integers.
sourceraw docstring

genotype-indexclj

(genotype-index genotype)

Returns an index for given genotype.

Returns an index for given genotype.
sourceraw docstring

genotype-seqclj

(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.
sourceraw docstring

info-parserclj

(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.
sourceraw docstring

info-stringifierclj

(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.
sourceraw docstring

inspect-alleleclj

(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 malformed
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 malformed
sourceraw docstring

ints->genotypeclj

(ints->genotype vs)

Convert a sequence of integers to genotype string.

Convert a sequence of integers to genotype string.
sourceraw docstring

parse-breakendclj

(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.
sourceraw docstring

parse-filterclj

(parse-filter s)

Parses FILTER field and returns a sequence of keywords.

Parses FILTER field and returns a sequence of keywords.
sourceraw docstring

parse-formatclj

(parse-format s)

Parses FORMAT field and returns as a sequence of keywords.

Parses FORMAT field and returns as a sequence of keywords.
sourceraw docstring

parse-genotypeclj

(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.
sourceraw docstring

sample-parserclj

(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.
sourceraw docstring

stringify-breakendclj

(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.
sourceraw docstring

stringify-filterclj

(stringify-filter fltr)

Stringifies FILTER field. Takes a sequence of keywords or strings.

Stringifies FILTER field. Takes a sequence of keywords or strings.
sourceraw docstring

stringify-formatclj

(stringify-format formats)

Stringifies FORMAT field. Takes a sequence of keywords or strings.

Stringifies FORMAT field. Takes a sequence of keywords or strings.
sourceraw docstring

stringify-genotypeclj

(stringify-genotype gt-seq)

Stringifies genotype map into VCF-style GT string.

Stringifies genotype map into VCF-style GT string.
sourceraw docstring

stringify-sampleclj

(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.
sourceraw docstring

variant-parserclj

(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.
sourceraw docstring

variant-vals-stringifierclj

(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.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close