API: MerCount
Types
KmerAnalysis.MerCount — TypeA 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.
The count is stored as an UInt8 because often once the count is more than 255 we hardly care anymore.
KmerAnalysis.DNAMerCount — TypeShorthand for MerCount{DNAMer{K}}
KmerAnalysis.RNAMerCount — TypeShorthand for MerCount{RNAMer{K}}
Public / Safe methods
KmerAnalysis.mer — FunctionGet the mer from a MerCount.
KmerAnalysis.freq — FunctionGet the count from a MerCount.
Get the count from a MerCount, and convert it to type R.
Missing docstring for merge. Check Documenter's build log for details.
Missing docstring for collect_mers. Check Documenter's build log for details.
Missing docstring for collect_mers!. Check Documenter's build log for details.
Missing docstring for collapse_into_counts. Check Documenter's build log for details.
KmerAnalysis.collapse_into_counts! — Functioncollapse_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.
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.
The input vector mers will be sorted by this method.
KmerAnalysis.merge_into! — Functionmerge_into!(a::Vector{MerCount{M}}, b::Vector{MerCount{M}}) where {M<:AbstractMer}Merge the MerCounts from vector b into the vector a.
This will sort the input vectors a and b.
Missing docstring for collapse!. Check Documenter's build log for details.
Internal / Unsafe methods
KmerAnalysis.unsafe_collapse_into_counts! — Functionunsafe_collapse_into_counts!(result::Vector{MerCount{M}}, mers::Vector{M}) where {M<:AbstractMer}This method is internal and marked as unsafe because it assumes that the mers input vector is already sorted.
KmerAnalysis.unsafe_merge_into! — Functionunsafe_merge_into!(a::Vector{MerCount{M}}, b::Vector{MerCount{M}}) where {M<:AbstractMer}Merge the MerCounts from vector b into the vector a.
This method is marked as unsafe as it assumes both of the input vectors a and b are already sorted.