API reference¶
Random access of Cortex graphs¶
This module contains classes for inspecting Cortex graphs with random access to their kmers.
-
class
cortexpy.graph.parser.random_access.
RandomAccess
(graph_handle, kmer_cache_size=None)[source]¶ Provide fast k-mer access to Cortex graph in log(n) time (n = number of kmers in graph)
-
__getitem__
(lexlo_string)[source]¶ Return kmer associated with kmer string
No check is performed to make sure that the input string is a lexicographically-lowest kmer string. Use
get_kmer_for_string()
in order to convert a kmer string to its lexlo form before retrieving it from the cortex object.
-
Cortex graph headers¶
This module contains classes for parsing and representing a Cortex file header
-
class
cortexpy.graph.parser.header.
Header
(version=6, kmer_size=1, kmer_container_size=None, num_colors=None, mean_read_lengths=None, total_sequences=None, sample_names=None, error_rates=None, color_info_blocks=NOTHING)[source]¶ Cortex header object
This object allows access to header information contained in a cortex file
Cortex kmers¶
This module provides classes and functions for working with Cortex kmers.
-
class
cortexpy.graph.parser.kmer.
Kmer
(kmer_data, num_colors, kmer_size, revcomp=None)[source]¶ Represents a Cortex kmer
This class wraps a kmer data object with attributes and methods for inspecting and manipulating the underlying kmer data object.
-
class
cortexpy.graph.parser.kmer.
StringKmerConverter
(kmer_size)[source]¶ Converts kmer strings to various binary representations
Utility functions¶
This module contains utility functions that are used inside cortexpy. These functions may also be useful outside of cortexpy.