Home

BioGenerics

Abstract formatted input/output type.

Abstract data reader type.

See subtypes(AbstractReader) for all available data readers.

Abstract data writer type.

See subtypes(AbstractWriter) for all available data writers.

Base.openMethod.
Base.open(f, ios::Vararg{AbstractFormattedIO})

Execute f(ios...), then close each io. close is run even if f(ios...) throws an exception.

Examples

julia> open(rdr"path/to/seqs.fna") do reader
           # do something with reader
       end
readertype(::Val{S}, arg)::T

Determine the type of reader that opens extension named by SymbolS. For example, readertype(::Val{:fa}, arg) = FASTA.Reader. Should be extended by developers making new biological file format readers.

The extra argument arg can be passed like so rdr"path.ext"arg, and defaults to the empty string. This can be used to pass an additional argument that is specific to the person implementing the reader.

BioGenerics.IO.streamFunction.
stream(io::AbstractFormattedIO)

Return the underlying IO object; subtypes of AbstractFormattedIO must implement this method.

tryread!(reader::AbstractReader, output)

Try to read the next element into output from reader.

If the result could not be read, then nothing will be returned instead.

writertype(::Val{S}, arg)::T

Determine the type of reader that can write a file with an extension named by SymbolS. For example, writertype(::Val{:fa}, arg) = FASTA.Writer. Should be extended by developers making new biological file format writers.

The extra argument arg can be passed like so wtr"path.ext"arg, and defaults to the empty string. This can be used to pass an additional argument that is specific to the person implementing the writer.

MissingFieldException <: Exception

An exception type thrown when a missing field of a record is accessed.

intempdir(fn::Function, parent = tempdir())

Execute some function fn in a temporary directory. After the function is executed, the directory is cleaned by doing the equivalent of rm -r.

random_aa(n, probs = [0.24, 0.24, 0.24, 0.24, 0.04])

Create a random amino acid sequence of length n, by sampling the possible amino acid characters.

random_array(n::Integer, elements, probs)

Create a random array of length n, composed of possible elements, which are selected according to their prob.

random_dna(n, probs = [0.24, 0.24, 0.24, 0.24, 0.04])

Create a random DNA sequence of length n, by sampling the nucleotides A, C, G, T, and N, according to their probability in probs.

random_interval(minstart, maxstop)

Create a random interval between a minimum starting point, and a maximum stop point.

random_rna(n, probs = [0.24, 0.24, 0.24, 0.24, 0.04])

Create a random RNA sequence of length n, by sampling the nucleotides A, C, G, U, and N, according to their probability in probs.

random_seq(n::Integer, nts, probs)

Create a random sequence of length n, composed of nts, according to their prob.