bioin
latest

Contents:

  • Getting Started
  • API Documentation
    • bioin.pattern_count
    • bioin.frequency_map
    • bioin.frequent_words
    • bioin.reverse
    • bioin.complement
    • bioin.reverse_complement
    • bioin.motif.count_motif
    • bioin.motif.profile_motif
    • bioin.motif.consensus_motif
    • bioin.motif.score_motif
    • bioin.motif.probability_profile
    • bioin.motif.profile_most_probable_kmer
    • bioin.motif.greedy_motif_search
    • bioin.motif.count_with_pseudocount
    • bioin.motif.profile_with_pseudocount
    • bioin.motif.consensus_with_pseudocount
    • bioin.motif.score_with_pseudocount
    • bioin.motif.probability_with_pseudocount
    • bioin.motif.profile_most_probable_kmer_with_pseudocount
    • bioin.motif.greedy_motif_search_with_pseudocount
    • bioin.motif.profile_probable_motifs
    • bioin.motif.random_motifs
    • bioin.motif.randomized_motif_search
    • bioin.motif.normalize_probability
    • bioin.motif.weighted_die
    • bioin.motif.profile_generated_string
    • bioin.motif.GibbsSampler
    • bioin.replication.pattern_matching
    • bioin.replication.symbol_array
    • bioin.replication.faster_symbol_array
    • bioin.replication.skew_array
    • bioin.replication.minimum_skew
    • bioin.replication.hamming_distance
    • bioin.replication.approximate_pattern_matching
    • bioin.replication.approximate_pattern_count
bioin
  • Docs »
  • API Documentation »
  • bioin.motif.randomized_motif_search
  • Edit on GitHub

bioin.motif.randomized_motif_search¶

bioin.motif.randomized_motif_search(dna, k, t)[source]¶

Return a list of best k-mers from each of t different strings dna. Compare score_pseudo of the k-mer.

Parameters:
  • dna (list) – matrix, has t rows.
  • k (int) – k-mer.
  • t (integer) – t is the number of k-mers in dna to return, also equal to the row number of dna 2D matrix.
Returns:

List, a list of t k-mers strings, each k-mer from each of t different strings dna.

Examples

RandomMotifs(Dna, k, t) that uses random.randint to choose a random k-mer from each of t different strings Dna, and returns a list of t strings.

>>> dna = ['CGCCCCTCTCGGGGGTGTTCAGTAAACGGCCA', 'GGGCGAGGTATGTGTAAGTGCCAAGGTGCCAG', 'TAGTACCGAGACCGAAAGAAGTATACAGGCGT', 'TAGATCAAGTTTCAGGTGCACGTCGGTGAACC', 'AATCCACCAGCTCCACGTGCAATGTTGGCCTA']
>>> k = 8
>>> t = 5
>>> random_best_t_kmers = randomized_motif_search(dna, k, t)
>>> random_best_t_kmers
    ['CGGGGGTG', 'TGTAAGTG', 'TACAGGCG', 'TTCAGGTG', 'TCCACGTG']
Next Previous

© Copyright 2020, Lihua. Project structure based on the Computational Molecular Science Python Cookiecutter version 1.2 Revision 2241df70.

Built with Sphinx using a theme provided by Read the Docs.