Functions to read and write formats representing sequences such as FASTA and TwoBit.
Functions to read and write formats representing sequences such as FASTA and TwoBit.
(fasta-reader f)
Returns an open cljam.io.fasta.reader.FASTAReader of f. Should be used inside with-open to ensure the reader is properly closed.
Returns an open cljam.io.fasta.reader.FASTAReader of f. Should be used inside with-open to ensure the reader is properly closed.
(fasta-writer f)
(fasta-writer f options)
Returns an open cljam.io.fasta.writer.FASTAWriter of f with options: :cols - Maximum number of characters written in one row. :create-index? - If true, .fai will be created simultaneously. Should be used inside with-open to ensure the writer is properly closed.
Returns an open cljam.io.fasta.writer.FASTAWriter of f with options: :cols - Maximum number of characters written in one row. :create-index? - If true, .fai will be created simultaneously. Should be used inside with-open to ensure the writer is properly closed.
(indexed? rdr)
Returns true if the reader can be randomly accessed, false if not. Note this function immediately realizes a delayed index.
Returns true if the reader can be randomly accessed, false if not. Note this function immediately realizes a delayed index.
(read-all-sequences rdr)
(read-all-sequences rdr option)
Reads all sequences of FASTA/TwoBit file.
Reads all sequences of FASTA/TwoBit file.
(read-indices rdr)
Reads metadata of indexed sequences. Returns a vector of maps containing
:name
, :len
and other format-specific keys. Forces loading all indices.
Reads metadata of indexed sequences. Returns a vector of maps containing `:name`, `:len` and other format-specific keys. Forces loading all indices.
(read-seq-summaries rdr)
Returns summaries of sequences in FASTA/TwoBit file. Returns a vector of maps
containing :name
and :len
.
Returns summaries of sequences in FASTA/TwoBit file. Returns a vector of maps containing `:name` and `:len`.
(read-sequence rdr region)
(read-sequence rdr region option)
Reads sequence in region of FASTA/TwoBit file.
Reads sequence in region of FASTA/TwoBit file.
(reader f)
Selects suitable reader from f's extension, returning the open reader. Opens a new reader if the arg represents a file such as String path, java.io.File, or java.net.URL. If a reader is given, clones the reader. This function supports FASTA and TwoBit formats.
Selects suitable reader from f's extension, returning the open reader. Opens a new reader if the arg represents a file such as String path, java.io.File, or java.net.URL. If a reader is given, clones the reader. This function supports FASTA and TwoBit formats.
(twobit-reader f)
Returns an open cljam.io.twobit.reader.TwoBitReader of f. Should be used inside with-open to ensure the reader is properly closed.
Returns an open cljam.io.twobit.reader.TwoBitReader of f. Should be used inside with-open to ensure the reader is properly closed.
(twobit-writer f)
(twobit-writer f options)
Returns an open cljam.io.twobit.writer.TwoBitWriter of f with options: :index - metadata of indexed sequences. The amount of memory usage can be reduced if index is supplied. Should be used inside with-open to ensure the writer is properly closed.
Returns an open cljam.io.twobit.writer.TwoBitWriter of f with options: :index - metadata of indexed sequences. The amount of memory usage can be reduced if index is supplied. Should be used inside with-open to ensure the writer is properly closed.
(write-sequences wtr seqs)
Writes all sequences to FASTA/TwoBit file.
Writes all sequences to FASTA/TwoBit file.
(writer f & options)
Selects suitable writer from f's extension, returning the open writer. This function supports FASTA and TwoBit format.
Selects suitable writer from f's extension, returning the open writer. This function supports FASTA and TwoBit format.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close