Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(10)  |  Call(8)  |  Derive(0)  |  Import(2)

src/c/o/cogent-1.5.3/tests/test_maths/test_stats/test_period.py   cogent(Download)
import numpy
from cogent.util.unit_test import TestCase, main
 
from cogent.maths.stats.period import chi_square, factorial, g_statistic, \
        circular_indices, _seq_to_symbols, seq_to_symbols, blockwise_bootstrap, \
    def test_seq_to_symbol_factory(self):
        """checks factory function for conversion works"""
        motifs = ['AA', 'AT', 'TT']
        seq_to_symbols = SeqToSymbols(motifs)
        self.assertEqual(seq_to_symbols('AATGGTTA'),
    def test_permutation(self):
        s = 'ATCGTTGGGACCGGTTCAAGTTTTGGAACTCGCAAGGGGTGAATGGTCTTCGTCTAACGCTGG'\
            'GGAACCCTGAATCGTTGTAACGCTGGGGTCTTTAACCGTTCTAATTTAACGCTGGGGGGTTCT'\
            'AATTTTTAACCGCGGAATTGCGTC'
        seq_to_symbol = SeqToSymbols(self.motifs, length=len(s))
            'GGAACCCTGAATCGTTGTAACGCTGGGGTCTTTAACCGTTCTAATTTAACGCTGGGGGGTTCT'\
            'AATTTTTAACCGCGGAATTGCGTC'
        seq_to_symbol = SeqToSymbols(self.motifs, length=len(s))
        hybrid_calc = Hybrid(len(s), period = 4, return_all=True)
        stat, p = blockwise_bootstrap(s, hybrid_calc, block_size=10,
    def test_permutation_skips(self):
        """permutation test correctly handles data without symbols"""
        s = 'N' * 150
        seq_to_symbol = SeqToSymbols(self.motifs, length=len(s))
        ipdft_calc = Ipdft(len(s), llim=2, period = 4)

src/p/y/pycogent-HEAD/tests/test_maths/test_stats/test_period.py   pycogent(Download)
import numpy
from cogent.util.unit_test import TestCase, main
 
from cogent.maths.stats.period import chi_square, factorial, g_statistic, \
        circular_indices, _seq_to_symbols, seq_to_symbols, blockwise_bootstrap, \
    def test_seq_to_symbol_factory(self):
        """checks factory function for conversion works"""
        motifs = ['AA', 'AT', 'TT']
        seq_to_symbols = SeqToSymbols(motifs)
        self.assertEqual(seq_to_symbols('AATGGTTA'),
    def test_permutation(self):
        s = 'ATCGTTGGGACCGGTTCAAGTTTTGGAACTCGCAAGGGGTGAATGGTCTTCGTCTAACGCTGG'\
            'GGAACCCTGAATCGTTGTAACGCTGGGGTCTTTAACCGTTCTAATTTAACGCTGGGGGGTTCT'\
            'AATTTTTAACCGCGGAATTGCGTC'
        seq_to_symbol = SeqToSymbols(self.motifs, length=len(s))
            'GGAACCCTGAATCGTTGTAACGCTGGGGTCTTTAACCGTTCTAATTTAACGCTGGGGGGTTCT'\
            'AATTTTTAACCGCGGAATTGCGTC'
        seq_to_symbol = SeqToSymbols(self.motifs, length=len(s))
        hybrid_calc = Hybrid(len(s), period = 4, return_all=True)
        stat, p = blockwise_bootstrap(s, hybrid_calc, block_size=10,
    def test_permutation_skips(self):
        """permutation test correctly handles data without symbols"""
        s = 'N' * 150
        seq_to_symbol = SeqToSymbols(self.motifs, length=len(s))
        ipdft_calc = Ipdft(len(s), llim=2, period = 4)