API: MerCount

Types

KmerAnalysis.MerCountType

A simple mer count struct.

MerCount is a simple struct that binds a mer value to a count of the number of times it has been observed.

This type, (sorted) vectors of them, and some additional utility methods, can form the basic building blocks of the higher-level mer counting functionality. This struct can also be an eltype of kmer hashes or more involved specialized types that store counts of Kmers.

Note

The count is stored as an UInt8 because often once the count is more than 255 we hardly care anymore.

Public / Safe methods

KmerAnalysis.freqFunction

Get the count from a MerCount.

Get the count from a MerCount, and convert it to type R.

Missing docstring.

Missing docstring for merge. Check Documenter's build log for details.

Missing docstring.

Missing docstring for collect_mers. Check Documenter's build log for details.

Missing docstring.

Missing docstring for collect_mers!. Check Documenter's build log for details.

Missing docstring.

Missing docstring for collapse_into_counts. Check Documenter's build log for details.

KmerAnalysis.collapse_into_counts!Function
collapse_into_counts!(result::Vector{MerCount{M}}, mers::Vector{M}) where {M<:AbstractMer}

Build a vector of sorted MerCounts from a Vector of a mer type.

This is a basic kernel function used for any higher level and more complex kmer counting procedures.

This is like collapse_into_counts, except it's first argument is a result vector that is cleared and filled with the result.

Note

The input vector mers will be sorted by this method.

collapse_into_counts(mers::Vector{M}) where {M<:AbstractMer}

Build a vector of sorted MerCounts from a Vector of a mer type.

This is a basic kernel function used for any higher level and more complex kmer counting procedures.

Note

The input vector mers will be sorted by this method.

KmerAnalysis.merge_into!Function
merge_into!(a::Vector{MerCount{M}}, b::Vector{MerCount{M}}) where {M<:AbstractMer}

Merge the MerCounts from vector b into the vector a.

Note

This will sort the input vectors a and b.

Missing docstring.

Missing docstring for collapse!. Check Documenter's build log for details.

Internal / Unsafe methods

KmerAnalysis.unsafe_collapse_into_counts!Function
unsafe_collapse_into_counts!(result::Vector{MerCount{M}}, mers::Vector{M}) where {M<:AbstractMer}
Warning

This method is internal and marked as unsafe because it assumes that the mers input vector is already sorted.

KmerAnalysis.unsafe_merge_into!Function
unsafe_merge_into!(a::Vector{MerCount{M}}, b::Vector{MerCount{M}}) where {M<:AbstractMer}

Merge the MerCounts from vector b into the vector a.

Warning

This method is marked as unsafe as it assumes both of the input vectors a and b are already sorted.