Liking cljdoc? Tell your friends :D

cljam.io.vcf

Functions to read and write the VCF (Variant Call Format) format and BCF (its binary equivalent). See https://samtools.github.io/hts-specs/ for the detail VCF/BCF specifications.

Functions to read and write the VCF (Variant Call Format) format and BCF (its
binary equivalent). See https://samtools.github.io/hts-specs/ for the detail
VCF/BCF specifications.
raw docstring

bcf-readerclj

(bcf-reader f)

Returns an open cljam.io.bcf.reader.BCFReader of f. Should be used inside with-open to ensure the reader is properly closed. Throws IOException if failed to parse BCF file format.

Returns an open cljam.io.bcf.reader.BCFReader of f. Should be used inside
with-open to ensure the reader is properly closed. Throws IOException if
failed to parse BCF file format.
sourceraw docstring

bcf-writerclj

(bcf-writer f meta-info header)

Returns an open cljam.io.bcf.writer.BCFWriter of f. Meta-information lines and a header line will be written in this function. Should be used inside with-open to ensure the writer is properly closed. e.g.

(with-open [wtr (bcf-writer "out.bcf" {:file-date "20090805", :source "myImpu..." ...} ["CHROM" "POS" "ID" "REF" "ALT" ...])] (WRITING-BCF))

Returns an open cljam.io.bcf.writer.BCFWriter of f. Meta-information lines
and a header line will be written in this function. Should be used inside
with-open to ensure the writer is properly closed. e.g.

   (with-open [wtr (bcf-writer "out.bcf"
                               {:file-date "20090805", :source "myImpu..." ...}
                               ["CHROM" "POS" "ID" "REF" "ALT" ...])]
     (WRITING-BCF))
sourceraw docstring

clone-bcf-readerclj

(clone-bcf-reader rdr)

Clones bcf reader sharing persistent objects.

Clones bcf reader sharing persistent objects.
sourceraw docstring

clone-readerclj

(clone-reader rdr)

Clones vcf/bcf reader sharing persistent objects.

Clones vcf/bcf reader sharing persistent objects.
sourceraw docstring

clone-vcf-readerclj

(clone-vcf-reader rdr)

Clones vcf reader sharing persistent objects.

Clones vcf reader sharing persistent objects.
sourceraw docstring

(header rdr)

Returns header of VCF/BCF file as a sequence of strings.

Returns header of VCF/BCF file as a sequence of strings.
sourceraw docstring

meta-infoclj

(meta-info rdr)

Returns meta-info section of VCF/BCF file as a map.

Returns meta-info section of VCF/BCF file as a map.
sourceraw docstring

read-file-offsetsclj

(read-file-offsets rdr)

Reads offsets {:file-beg :file-end :beg :end :chr } from VCF/BCF file.

Reads offsets {:file-beg :file-end :beg :end :chr } from VCF/BCF file.
sourceraw docstring

read-variantsclj

(read-variants rdr)
(read-variants rdr option)

Reads variants of the VCF/BCF file, returning them as a lazy sequence. rdr must implement cljam.io.protocols/IVariantReader. Can take an option :depth to specify parsing level, default :deep. <:deep|:vcf|:bcf|:shallow|:raw> :deep - Fully parsed variant map. FORMAT, FILTER, INFO and samples columns are parsed. :vcf - VCF-style map. FORMAT, FILTER, INFO and samples columns are strings. :bcf - BCF-style map. CHROM, FILTER, INFO and :genotype contains indices to meta-info. :shallow - Only CHROM, POS and ref-length are parsed. :raw - Raw map of ByteBufers.

Reads variants of the VCF/BCF file, returning them as a lazy sequence. rdr
must implement cljam.io.protocols/IVariantReader. Can take an option :depth to
specify parsing level, default :deep. <:deep|:vcf|:bcf|:shallow|:raw>
  :deep - Fully parsed variant map. FORMAT, FILTER, INFO and samples columns are parsed.
  :vcf - VCF-style map. FORMAT, FILTER, INFO and samples columns are strings.
  :bcf - BCF-style map. CHROM, FILTER, INFO and :genotype contains indices to meta-info.
  :shallow - Only CHROM, POS and ref-length are parsed.
  :raw - Raw map of ByteBufers.
sourceraw docstring

read-variants-randomlyclj

(read-variants-randomly rdr span-option depth-option)

Reads variants of the VCF/BCF file randomly, returning them as a lazy sequence.

Reads variants of the VCF/BCF file randomly, returning them as a lazy sequence.
sourceraw docstring

readerclj

(reader f)

Selects suitable reader from f's extension, returning the open reader. This function supports VCF and BCF formats.

Selects suitable reader from f's extension, returning the open reader. This
function supports VCF and BCF formats.
sourceraw docstring

vcf-readerclj

(vcf-reader f)

Returns an open cljam.io.vcf.reader.VCFReader of f. Should be used inside with-open to ensure the reader is properly closed.

Returns an open cljam.io.vcf.reader.VCFReader of f. Should be used inside
with-open to ensure the reader is properly closed.
sourceraw docstring

vcf-writerclj

(vcf-writer f meta-info header)

Returns an open cljam.io.vcf.writer.VCFWriter of f. Meta-information lines and a header line will be written in this function. Should be used inside with-open to ensure the writer is properly closed. e.g.

(with-open [wtr (vcf-writer "out.vcf" {:file-date "20090805", :source "myImpu..." ...} ["CHROM" "POS" "ID" "REF" "ALT" ...])] (WRITING-VCF))

Returns an open cljam.io.vcf.writer.VCFWriter of f. Meta-information lines
and a header line will be written in this function. Should be used inside
with-open to ensure the writer is properly closed. e.g.

  (with-open [wtr (vcf-writer "out.vcf"
                              {:file-date "20090805", :source "myImpu..." ...}
                              ["CHROM" "POS" "ID" "REF" "ALT" ...])]
    (WRITING-VCF))
sourceraw docstring

write-variantsclj

(write-variants wtr variants)

Writes variants to the VCF/BCF file. wtr must implement cljam.io.protocols/IVariantWriter. variants must be a sequence of parsed or VCF-style maps. e.g.

(write-variants [{:chr "19", :pos 111, :id nil, :ref "A", :alt ["C"], :qual 9.6, :filter [:PASS], :info {:DP 4}, :FORMAT [:GT :HQ] ...} ...])

Writes variants to the VCF/BCF file. wtr must implement
cljam.io.protocols/IVariantWriter. variants must be a sequence of parsed or
VCF-style maps. e.g.

  (write-variants [{:chr "19", :pos 111, :id nil, :ref "A",
                    :alt ["C"], :qual 9.6, :filter [:PASS], :info {:DP 4},
                    :FORMAT [:GT :HQ] ...} ...])
sourceraw docstring

writerclj

(writer f meta-info header)

Selects suitable writer from f's extension, returning the open writer. This function supports VCF and BCF formats.

Selects suitable writer from f's extension, returning the open writer. This
function supports VCF and BCF formats.
sourceraw docstring

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

× close