seismicrna.core.tests package
Submodules
- class seismicrna.core.tests.array_test.TestCalcInverse(methodName='runTest')
Bases:
TestCase
- test_calc_inverse()
Invert an array with a known inverse.
- test_calc_inverse_fill_fwd()
Invert an array with a known inverse; fill forward.
- test_calc_inverse_fill_fwd_max()
- test_calc_inverse_fill_fwd_max_default()
- test_calc_inverse_fill_rev()
Invert an array with a known inverse; fill reverse.
- test_calc_inverse_fill_rev_max()
- test_calc_inverse_fill_rev_max_default()
- test_calc_inverse_max()
Invert an array with a known inverse.
- test_empty()
- test_empty_max()
- test_is_inverse()
Verify every position in the inverse of a random array.
- test_negative()
Negative values in the target are not permitted.
- test_repeated()
Repeated values in the target are not permitted.
- class seismicrna.core.tests.array_test.TestEnsureSameLength(methodName='runTest')
Bases:
TestCase
- test_diff_lengths()
Unequal lengths are not permitted.
- test_other_dims()
Non-1D arrays are not valid.
- test_same_length()
The length is returned when the arrays share the length.
- class seismicrna.core.tests.array_test.TestFindDims(methodName='runTest')
Bases:
TestCase
- test_0d()
- test_0d_1dim()
- test_0d_none()
- test_0d_nonzero()
- test_0d_nonzero_extra()
- test_1d()
- test_1d_0dim_none()
- test_1d_1d_crossed()
- test_1d_1d_separate()
- test_1d_1dim_none()
- test_1d_2d_congruent()
- test_1d_2d_crossed()
- test_1d_2dim()
- test_1d_2dim_none()
- test_1d_nonzero()
- test_2d()
- test_2d_1dim_none()
- test_2d_2d_congruent()
- test_2d_2d_crossed()
- test_2d_nonzero()
- test_empty()
- test_none_2d()
- class seismicrna.core.tests.array_test.TestGetLength(methodName='runTest')
Bases:
TestCase
- test_1d()
A 1D array has a length.
- test_other_dims()
Non-1D arrays are not valid.
- class seismicrna.core.tests.array_test.TestLocateElements(methodName='runTest')
Bases:
TestCase
- test_locate_0()
- test_locate_1()
- test_locate_2()
- test_locate_invalid()
- class seismicrna.core.tests.array_test.TestTriangular(methodName='runTest')
Bases:
TestCase
- test_whole_numbers()
- class seismicrna.core.tests.header_test.TestClustHeader(methodName='runTest')
Bases:
TestCase
- test_clustered()
- test_clusts()
- test_index()
- test_iter_clust_indexes()
- test_ks_invalid()
- test_ks_valid()
- test_level_keys()
- test_level_names()
- test_levels()
- test_modified_ks()
- test_modified_none()
- test_modified_rels()
- test_names()
- test_num_levels()
- test_select_clust()
- test_select_clusts()
- test_select_extra()
- test_select_invalid_clust()
- test_select_invalid_k()
- test_select_k()
- test_select_k_clust_empty()
- test_select_k_clust_exist()
- test_select_ks()
- test_select_ks_clusts_exist()
- test_select_none()
- test_signature()
- class seismicrna.core.tests.header_test.TestConstants(methodName='runTest')
Bases:
TestCase
- test_average_prefix()
- test_clust_name()
- test_cluster_prefix()
- test_k_name()
- test_rel_name()
- class seismicrna.core.tests.header_test.TestDeduplicateRels(methodName='runTest')
Bases:
TestCase
- test_duplicates()
- test_empty()
- test_no_duplicates()
- class seismicrna.core.tests.header_test.TestEqualHeaders(methodName='runTest')
Bases:
TestCase
- test_clustheaders()
- test_different_types()
- test_relclustheaders()
- test_relheaders()
- class seismicrna.core.tests.header_test.TestFormatClustName(methodName='runTest')
Bases:
TestCase
- test_positive()
- test_zero()
- class seismicrna.core.tests.header_test.TestFormatClustNames(methodName='runTest')
Bases:
TestCase
- test_positive_invalid_dups()
- test_positive_no_dups()
- test_positive_valid_dups()
- test_zero()
- class seismicrna.core.tests.header_test.TestHeader(methodName='runTest')
Bases:
TestCase
- test_abstract()
- class seismicrna.core.tests.header_test.TestListClusts(methodName='runTest')
Bases:
TestCase
- test_positive()
- test_zero()
- class seismicrna.core.tests.header_test.TestListKClusts(methodName='runTest')
Bases:
TestCase
- test_positive()
- test_zero()
- class seismicrna.core.tests.header_test.TestListKsClusts(methodName='runTest')
Bases:
TestCase
- test_empty()
- test_ks()
- test_one_k()
- test_zero()
- class seismicrna.core.tests.header_test.TestMakeHeader(methodName='runTest')
Bases:
TestCase
- test_all()
- test_ks()
- test_none()
- test_rels()
- class seismicrna.core.tests.header_test.TestParseHeader(methodName='runTest')
Bases:
TestCase
- test_clust()
- test_empty()
- test_extra_index_names()
- test_extra_values()
- test_invalid_numeric()
- test_missing_index_names()
- test_missing_values()
- test_nonnumeric()
- test_rel_index()
- test_rel_index_invalid_name()
- test_rel_index_repeated()
- test_rel_index_valid_name()
- test_rel_multiindex()
- test_relclust()
- class seismicrna.core.tests.header_test.TestRelClustHeader(methodName='runTest')
Bases:
TestCase
- test_clustered()
- test_clusts()
- test_index()
- test_iter_clust_indexes()
- test_ks()
- test_level_keys()
- test_level_names()
- test_levels()
- test_modified_all()
- test_modified_ks()
- test_modified_ks_empty()
- test_modified_ks_none()
- test_modified_none()
- test_modified_nullified()
- test_modified_rels()
- test_modified_rels_empty()
- test_modified_rels_none()
- test_num_levels()
- test_select_clust()
- test_select_extra()
- test_select_extra_emptystr()
- test_select_extra_none()
- test_select_extra_zero()
- test_select_invalid_clust()
- test_select_invalid_k()
- test_select_invalid_rel()
- test_select_k_clust_empty()
- test_select_k_clust_exist()
- test_select_ks()
- test_select_none()
- test_select_rel()
- test_signature()
- class seismicrna.core.tests.header_test.TestRelHeader(methodName='runTest')
Bases:
TestCase
- test_clustered()
- test_clusts()
- test_index()
- test_iter_clust_indexes()
- test_ks()
- test_level_keys()
- test_level_names()
- test_levels()
- test_modified_ks()
- test_modified_none()
- test_modified_rels()
- test_modified_rels_empty()
- test_modified_rels_none()
- test_names()
- test_num_levels()
- test_rels_duplicated()
- test_rels_empty()
- test_rels_normal()
- test_select_extra()
- test_select_extra_zero()
- test_select_invalid()
- test_select_none()
- test_select_one_rels()
- test_select_rel()
- test_select_two_rels()
- test_signature()
- test_size()
- class seismicrna.core.tests.header_test.TestValidateKClust(methodName='runTest')
Bases:
TestCase
- test_float_clust()
- test_float_k()
- test_negative_zero()
- test_one_zero_allowed()
- test_positive_positive()
- test_zero()
- test_zero_negative()
- test_zero_one_allowed()
- class seismicrna.core.tests.header_test.TestValidateKs(methodName='runTest')
Bases:
TestCase
- test_duplicated()
- test_empty()
- test_valid()
- test_zero()
- class seismicrna.core.tests.logs_test.TestEraseConfig(methodName='runTest')
Bases:
TestCase
- test_erase_config()
- class seismicrna.core.tests.logs_test.TestExcInfo(methodName='runTest')
Bases:
TestCase
- test_exc_info()
- class seismicrna.core.tests.logs_test.TestGetConfig(methodName='runTest')
Bases:
TestCase
- test_get_config()
- class seismicrna.core.tests.logs_test.TestLevels(methodName='runTest')
Bases:
TestCase
- test_levels()
- class seismicrna.core.tests.logs_test.TestLoggerClass(methodName='runTest')
Bases:
TestCase
- test_logger_class()
- class seismicrna.core.tests.logs_test.TestLoggingRaiseOnError(methodName='runTest')
Bases:
TestCase
- test_no_raise_on_error()
- test_raise_on_error()
- class seismicrna.core.tests.logs_test.TestRestoreConfig(methodName='runTest')
Bases:
TestCase
- test_restore_config_error()
- test_restore_config_no_error()
- class seismicrna.core.tests.logs_test.TestSetConfig(methodName='runTest')
Bases:
TestCase
- test_defaults()
- test_log_file()
- test_no_log_color()
- test_raise_on_error()
- test_verbosity()
- class seismicrna.core.tests.path_test.TestGetSeismicRNASourceDir(methodName='runTest')
Bases:
TestCase
- test_get_seismicrna_source_dir()
- class seismicrna.core.tests.path_test.TestSymlinkIfNeeded(*args, **kwargs)
Bases:
TestCase
- setUp()
Hook method for setting up the test fixture before exercising it.
- tearDown()
Hook method for deconstructing the test fixture after testing it.
- test_link_not_symlink()
- test_link_valid()
- test_link_wrong_symlink()
- test_target_not_exist()
- class seismicrna.core.tests.random_test.TestStochasticRound(methodName='runTest')
Bases:
TestCase
- test_float_arrays()
- test_float_arrays_preserve_sum()
- test_int_arrays()
- class seismicrna.core.tests.stats_test.TestCalcBetaMV(methodName='runTest')
Bases:
TestCase
- test_scipy_beta()
- class seismicrna.core.tests.stats_test.TestCalcBetaParams(methodName='runTest')
Bases:
TestCase
- test_invert()
- class seismicrna.core.tests.stats_test.TestCalcDirichletMV(methodName='runTest')
Bases:
TestCase
- test_scipy_dirichlet()
- class seismicrna.core.tests.stats_test.TestCalcDirichletParams(methodName='runTest')
Bases:
TestCase
- test_invert()
- seismicrna.core.tests.stats_test.rand_dirichlet_alpha(n: int)
Simulate n alpha parameters for a Dirichlet distribution.
- class seismicrna.core.tests.task_test.TestCalcPoolSize(methodName='runTest')
Bases:
TestCase
- test_1_proc()
- test_1_task()
- test_multiple()
- class seismicrna.core.tests.unbias_test.TestAdjustMinGap(methodName='runTest')
Bases:
TestCase
- test_gap_le_zero_le_npos()
- test_npos_le_zero_le_gap()
- test_zero_le_gap_lt_npos()
- test_zero_lt_npos_le_gap()
- class seismicrna.core.tests.unbias_test.TestCalcPClust(methodName='runTest')
Bases:
TestCase
- test_p_clust()
- class seismicrna.core.tests.unbias_test.TestCalcPClustGivenEndsNoClose(methodName='runTest')
Bases:
TestCase
- test_calc_p_clust_given_ends_noclose()
- class seismicrna.core.tests.unbias_test.TestCalcPClustGivenNoClose(methodName='runTest')
Bases:
TestCase
- test_ncls1()
- test_ncls2()
- class seismicrna.core.tests.unbias_test.TestCalcPEnds(methodName='runTest')
Bases:
TestCase
- test_invert()
Test the inverse of calc_p_ends_given_clust_noclose.
- class seismicrna.core.tests.unbias_test.TestCalcPEndsGivenClustNoClose(methodName='runTest')
Bases:
TestCase
- test_npos0_ncls1()
- test_npos1_ncls0()
- test_npos1_ncls1()
- test_npos2_ncls1()
- class seismicrna.core.tests.unbias_test.TestCalcPEndsGivenNoClose(methodName='runTest')
Bases:
TestCase
- test_calc_p_ends_given_noclose()
- class seismicrna.core.tests.unbias_test.TestCalcPEndsObserved(methodName='runTest')
Bases:
TestCase
- test_calc_p_ends_given_observed()
- class seismicrna.core.tests.unbias_test.TestCalcPMutGivenSpan(methodName='runTest')
Bases:
TestCase
- test_invert()
Test the inverse of calc_p_mut_given_span_noclose.
- class seismicrna.core.tests.unbias_test.TestCalcPMutGivenSpanNoClose(methodName='runTest')
Bases:
TestCase
- test_clusters()
- test_simulated()
- class seismicrna.core.tests.unbias_test.TestCalcPNoClose(methodName='runTest')
Bases:
TestCase
- test_p_noclose()
- class seismicrna.core.tests.unbias_test.TestCalcPNoCloseGivenClust(methodName='runTest')
Bases:
TestCase
- test_p_noclose_given_clust()
- class seismicrna.core.tests.unbias_test.TestCalcPNoCloseGivenEnds(methodName='runTest')
Bases:
TestCase
Test calc_p_nomut_window and calc_p_noclose_given_ends.
- test_clusters()
- test_length_0()
- test_length_1()
- test_length_2_min_gap_1()
- test_length_3_min_gap_1()
- test_length_3_min_gap_2()
- test_length_4_min_gap_1()
- test_length_4_min_gap_2()
- test_length_4_min_gap_3()
- test_min_gap_0()
- class seismicrna.core.tests.unbias_test.TestCalcPNoCloseGivenEndsAuto(methodName='runTest')
Bases:
TestCase
- test_1_dim()
- test_2_dim()
- test_invalid_dim()
- class seismicrna.core.tests.unbias_test.TestCalcParams(methodName='runTest')
Bases:
TestCase
- test_infer()
- class seismicrna.core.tests.unbias_test.TestCalcRectangularSum(methodName='runTest')
Bases:
TestCase
- static calc_spanning_sum_slow(array: ndarray)
- test_2d()
- test_3d()
- class seismicrna.core.tests.unbias_test.TestClip(methodName='runTest')
Bases:
TestCase
- test_with_clip()
- test_without_clip()
- class seismicrna.core.tests.unbias_test.TestFindSplitPositions(methodName='runTest')
Bases:
TestCase
- test_0()
- test_gap0()
- test_gap1_single_end3()
- test_gap1_single_end5()
- test_gap1_split0_quadruple()
- test_gap1_split1_double()
- test_gap1_split1_single_mid()
- test_gap1_split1_triple()
- test_gap1_split2()
- test_gap2_single_end3()
- test_gap2_single_end5()
- test_gap2_split0()
- test_gap2_split1()
- test_gap3_single_end3()
- test_gap3_single_end5()
- test_gap4_split0()
- test_gap4_split1()
- test_generic_split()
- test_thresh0()
- test_thresh1()
- class seismicrna.core.tests.unbias_test.TestNoCloseMuts(methodName='runTest')
Bases:
TestCase
- test_more_muts()
- test_no_muts()
- test_one_mut()
- class seismicrna.core.tests.unbias_test.TestNormalize(methodName='runTest')
Bases:
TestCase
- test_sum_positive()
- test_sum_zero()
- class seismicrna.core.tests.unbias_test.TestQuickUnbias(methodName='runTest')
Bases:
TestCase
Test that the quick unbiasing algorithm produces results very similar to the exact algorithm.
- ABS_TOL = 0.0005
- REL_TOL = 0.03
- test_threshold_0()
- test_threshold_0p001()
- class seismicrna.core.tests.unbias_test.TestSlicePEnds(methodName='runTest')
Bases:
TestCase
- test_0x0()
- test_slice_3x3()
- test_slice_5x5()
- class seismicrna.core.tests.unbias_test.TestTriuAllClose(methodName='runTest')
Bases:
TestCase
- test_equal()
- test_float_equal()
- test_float_unequal()
- test_tril()
- test_triu()
- class seismicrna.core.tests.unbias_test.TestTriuCumSum(methodName='runTest')
Bases:
TestCase
- test_1x1x2()
- test_2x2()
- test_2x2x1()
- test_2x2x2()
- test_3x3()
- test_all_0()
- test_all_1()
- test_explicit_sum()
- class seismicrna.core.tests.unbias_test.TestTriuDiv(methodName='runTest')
Bases:
TestCase
- test_1x1()
- test_1x1x1()
- test_2x2()
- test_2x2x2()
- class seismicrna.core.tests.unbias_test.TestTriuDot(methodName='runTest')
Bases:
TestCase
- test_1x1()
- test_1x1x1()
- test_2x2()
- test_2x2x2()
- class seismicrna.core.tests.unbias_test.TestTriuLog(methodName='runTest')
Bases:
TestCase
- compare(result: ndarray, expect: ndarray)
- test_2d()
- test_3d()
- class seismicrna.core.tests.unbias_test.TestTriuMul(methodName='runTest')
Bases:
TestCase
- test_1x1()
- test_1x1x1()
- test_2x2()
- test_2x2x2()
- class seismicrna.core.tests.unbias_test.TestTriuNorm(methodName='runTest')
Bases:
TestCase
- compare(result: ndarray, expect: ndarray)
- test_0x0()
- test_0x0x1()
- test_1x1()
- test_1x1x1()
- test_1x1x2()
- test_2x2()
- test_2x2_zero()
- test_2x2x1()
- test_2x2x2()
- test_2x2x2_zero()
- test_2x2x2x2()
- test_2x2x2x2_zero()
- class seismicrna.core.tests.unbias_test.TestTriuSum(methodName='runTest')
Bases:
TestCase
- test_1x1()
- test_1x1x1()
- test_1x1x2()
- test_2x2()
- test_2x2x1()
- test_2x2x2()
- test_2x2x2x2()
- test_all_zero()
- seismicrna.core.tests.unbias_test.label_no_close_muts(muts: ndarray, min_gap: int)
Return a 1D vector that is True for every row in muts that has no two mutations that are too close, otherwise False.
- seismicrna.core.tests.unbias_test.no_close_muts(read: ndarray, min_gap: int)
Return True if the read has no two mutations separated by fewer than min_gap non-mutated positions, otherwise False.
- seismicrna.core.tests.unbias_test.simulate_params(n_pos: int, n_cls: int, p_mut_max: float = 1.0)
Return p_mut, p_ends, and p_clust parameters.
- seismicrna.core.tests.unbias_test.simulate_reads(n_reads: int, p_mut: ndarray, p_ends: ndarray)
Simulate n_reads reads based on the mutation rates (p_mut) and the distributions of end coordinates (p_ends).
- class seismicrna.core.tests.version_test.TestConsistentVersion(methodName='runTest')
Bases:
TestCase
- test_meson_build()
- class seismicrna.core.tests.version_test.TestFormatVersion(methodName='runTest')
Bases:
TestCase
- test_format_default()
- test_format_notag()
- test_format_prtag()
- class seismicrna.core.tests.version_test.TestParseVersion(methodName='runTest')
Bases:
TestCase
- test_invalid_1()
- test_invalid_2()
- test_invalid_3()
- test_invalid_4()
- test_invalid_5()
- test_parse_default()
- test_parse_notag()
- test_parse_prtag_letter()
- test_parse_prtag_letters()
- test_parse_prtag_letters_numbers()