seqwalk.generation ================== .. py:module:: seqwalk.generation Functions --------- .. autoapisummary:: seqwalk.generation.rc seqwalk.generation.partition_path seqwalk.generation.is_necklace seqwalk.generation.f seqwalk.generation.simple_shift seqwalk.generation.out_edges seqwalk.generation.adapted_hierholzer Module Contents --------------- .. py:function:: rc(seq) reverse complement of DNA sequence :param seq: string with letters in {A, C, G, T} :returns: string corresponding to reverse complement .. py:function:: partition_path(seq, L, k) partitions self-avoiding walk into appropriate length sequences :param seq: self avoiding walk (string or list) :param L: length of desired sequences :param k: SSM k-value :returns: list of strings, each a length L seq :rtype: seqs .. py:function:: is_necklace(seq) computes if a sequence is a necklace (as defined in Wong 2017) :param seq: typically list of ints .. py:function:: f(seq, k) helper function defined in Wong 2017 * note confusing notation switch :param seq: list of ints :param k: alphabet length :returns: int corresponding to next element of seq .. py:function:: simple_shift(n, k) simple shift rule from Wong 2017 * note confusing notation switch :param n: SSM k value :param k: alphabet size :returns: list of integers corresponding to H. path .. py:function:: out_edges(v, alphabet) lists outedges for a node in a kmer graph :param v: string corresponding to node :param alphabet: string containing all valid letters :returns: list of outedges represented as strings .. py:function:: adapted_hierholzer(k, alphabet) finds RC-free path through 4-letter kmer graph using modified hierholzer (see Supplementary Note X) :param k: SSM k (integer) :param alphabet: string containing all valid letters :returns: string corresponding to RC-free self-avoiding walk :rtype: path