seismicrna.core.seq.tests package
Submodules
- class seismicrna.core.seq.tests.fasta_test.TestFormat(methodName='runTest')
Bases:
TestCase
- test_format_fasta_name_line()
- test_format_fasta_record()
- test_format_fasta_seq_lines()
- class seismicrna.core.seq.tests.fasta_test.TestParseFasta(methodName='runTest')
Bases:
TestCase
- test_duplicate_name()
- test_invalid_name()
- test_invalid_seq()
- test_valid_blank_line()
- test_valid_dna()
- test_valid_empty()
- test_valid_names()
- test_valid_rna()
- class seismicrna.core.seq.tests.fasta_test.TestValidFastaSeqname(methodName='runTest')
Bases:
TestCase
- test_blank()
- test_illegal_prefix()
- test_illegal_suffix()
- test_misformatted()
- test_name_mark()
- test_valid()
- class seismicrna.core.seq.tests.fasta_test.TestWriteFasta(methodName='runTest')
Bases:
TestCase
- test_blank_name()
- test_force()
- test_invalid_name()
- test_valid_names()
- class seismicrna.core.seq.tests.region_test.TestConstants(methodName='runTest')
Bases:
TestCase
- test_base_name()
- test_full_name()
- test_pos_name()
- test_seq_index_names()
Bases:
TestCase
Test function get_shared_index.
- class seismicrna.core.seq.tests.region_test.TestGetWindows(methodName='runTest')
Bases:
TestCase
Test function get_windows.
- test_1_series_size_1_min_0_excl_nan()
- test_1_series_size_1_min_0_incl_nan()
- test_1_series_size_1_min_1_excl_nan()
- test_1_series_size_1_min_1_incl_nan()
- test_1_series_size_2_min_1_excl_nan()
- test_1_series_size_2_min_1_incl_nan()
- test_1_series_size_2_min_2_excl_nan()
- test_1_series_size_2_min_2_incl_nan()
- test_2_series_size_1_min_0_excl_nan()
- test_2_series_size_1_min_0_incl_nan()
- test_2_series_size_1_min_1_excl_nan()
- test_2_series_size_1_min_1_incl_nan()
- test_2_series_size_2_min_0_excl_nan()
- test_2_series_size_2_min_0_incl_nan()
- test_2_series_size_2_min_1_excl_nan()
- test_2_series_size_2_min_1_incl_nan()
- test_2_series_size_2_min_2_excl_nan()
- test_2_series_size_2_min_2_incl_nan()
- test_empty()
- class seismicrna.core.seq.tests.region_test.TestHyphenateEnds(methodName='runTest')
Bases:
TestCase
Test function hyphenate_ends.
- test_hyphenate()
- class seismicrna.core.seq.tests.region_test.TestIndexToPos(methodName='runTest')
Bases:
TestCase
Test function index_to_pos.
- test_valid_full()
Test with a valid full sequence.
- test_valid_noncontig()
Test with non-contiguous sequence.
- test_valid_slice()
Test with a valid slice of a sequence.
- class seismicrna.core.seq.tests.region_test.TestIndexToSeq(methodName='runTest')
Bases:
TestCase
Test function index_to_seq.
- test_invalid_noncontig()
Test with non-contiguous sequence, forbidding gaps.
- test_valid_empty_seq()
Test with an empty sequence and no positions.
- test_valid_full()
Test with a valid full sequence.
- test_valid_no_pos()
Test with a valid sequence and no positions.
- test_valid_noncontig()
Test with non-contiguous sequence, allowing gaps.
- test_valid_slice()
Test with a valid slice of a sequence.
- class seismicrna.core.seq.tests.region_test.TestIntersect(methodName='runTest')
Bases:
TestCase
- test_diff_refs()
- test_diff_seqs()
- test_empty_invalid()
- test_one_full()
- test_one_full_named()
- test_one_masked()
- test_one_slice()
- test_three_overlapping()
- test_two_disjoint()
- test_two_full()
- test_two_masked()
- test_two_overlapping()
- class seismicrna.core.seq.tests.region_test.TestRegionAddMask(methodName='runTest')
Bases:
TestCase
- test_add_mask()
- test_add_mask_complement()
- test_add_mask_invalid()
- test_add_overlapping_masks()
- test_add_unordered_mask()
- test_update_mask()
- test_update_mask_complement()
- class seismicrna.core.seq.tests.region_test.TestRegionCopy(methodName='runTest')
Bases:
TestCase
- test_copy()
- class seismicrna.core.seq.tests.region_test.TestRegionEqual(methodName='runTest')
Bases:
TestCase
- test_diff_end3()
- test_diff_end5()
- test_diff_full()
- test_diff_mask_name()
- test_diff_mask_positions()
- test_diff_name()
- test_diff_ref()
- test_diff_seq()
- test_diff_seq5()
- test_equal_full()
- test_equal_mask()
- test_equal_part()
- class seismicrna.core.seq.tests.region_test.TestRegionInit(methodName='runTest')
Bases:
TestCase
- test_full()
Create a region from a full reference sequence.
- test_full_blank_name()
Create a region with a hyphenated name from a full reference sequence.
- test_full_end3()
Create a region with a hyphenated name from a full reference sequence.
- test_full_end5()
Create a region with a hyphenated name from a full reference sequence.
- test_full_given_name()
Create a region with a given name from a full reference sequence.
- test_partial_reflen_equal()
Create a region from part of a reference sequence.
- test_partial_reflen_greater()
Create a region from part of a reference sequence.
- test_partial_reflen_less()
Create a region from part of a reference sequence.
- test_partial_seq5_equal()
Create a region from part of a reference sequence.
- test_partial_seq5_greater()
Create a region from part of a reference sequence.
- test_partial_seq5_less()
Create a region from part of a reference sequence.
- test_partial_seq5_reflen()
Create a region from part of a reference sequence.
- test_partial_slice()
Region from part of a slice of a reference sequence.
- test_partial_slice_invalid_end3()
Region from part of a slice of a reference sequence.
- test_partial_slice_invalid_end5()
Region from part of a slice of a reference sequence.
- test_partial_slice_invalid_reflen()
Region from part of a slice of a reference sequence.
- test_partial_slice_invalid_seq5()
Region from part of a slice of a reference sequence.
- test_slice_end3_equal()
Create a region from a slice of a reference sequence.
- test_slice_end3_greater()
Create a region from a slice of a reference sequence.
- test_slice_end3_less()
Create a region from a slice of a reference sequence.
- test_slice_end5_end3()
Create a region from a slice of a reference sequence.
- test_slice_end5_end3_invalid()
Create a region from a slice of a reference sequence.
- test_slice_end5_equal()
Create a region from a slice of a reference sequence.
- test_slice_end5_greater()
Create a region from a slice of a reference sequence.
- test_slice_end5_less()
Create a region from a slice of a reference sequence.
- class seismicrna.core.seq.tests.region_test.TestRegionLength(methodName='runTest')
Bases:
TestCase
- test_full_lengths()
- test_partial_lengths()
- test_slice_lengths()
- class seismicrna.core.seq.tests.region_test.TestRegionMaskGU(methodName='runTest')
Bases:
TestCase
- test_find_gu()
- test_mask_gu()
- class seismicrna.core.seq.tests.region_test.TestRegionMaskList(methodName='runTest')
Bases:
TestCase
- test_mask_list()
- class seismicrna.core.seq.tests.region_test.TestRegionMaskNames(methodName='runTest')
Bases:
TestCase
- test_get_mask()
- test_mask_names()
- class seismicrna.core.seq.tests.region_test.TestRegionMaskPolyA(methodName='runTest')
Bases:
TestCase
- test_find_polya()
- test_mask_polya()
- class seismicrna.core.seq.tests.region_test.TestRegionMasked(methodName='runTest')
Bases:
TestCase
- test_masked_bool()
- test_masked_int()
- test_masked_zero()
- class seismicrna.core.seq.tests.region_test.TestRegionRange(methodName='runTest')
Bases:
TestCase
- test_range()
- test_range_int()
- test_range_one()
- class seismicrna.core.seq.tests.region_test.TestRegionUnmasked(methodName='runTest')
Bases:
TestCase
- test_size()
- test_unmasked()
- test_unmasked_bool()
- test_unmasked_int()
- test_unmasked_zero()
- class seismicrna.core.seq.tests.region_test.TestSeqPosToIndex(methodName='runTest')
Bases:
TestCase
Test function seq_pos_to_index.
- test_invalid_dup_1()
Test with duplicated positions, starting at 1.
- test_invalid_empty_seq_1()
Test with an empty sequence and start position 0.
- test_invalid_empty_seq_2()
Test with an empty sequence and position 0.
- test_invalid_empty_seq_3()
Test with an empty sequence and one position.
- test_invalid_full_0()
Test with every position in the sequence, starting at 0.
- test_invalid_greater_end_9()
Test with a position greater than end, starting at 9.
- test_invalid_less_start_2()
Test with a position less than start (= 2).
- test_invalid_unsort_1()
Test with unsorted positions, starting at 1.
- test_valid_empty_1()
Test with no positions, starting at 1.
- test_valid_empty_seq()
Test with an empty sequence and no positions.
- test_valid_full_1()
Test with every position in the sequence, starting at 1.
- test_valid_full_9()
Test with every position in the sequence, starting at 9.
- test_valid_noncontig_2()
Test with non-contiguous sequence, starting at 2.
- test_valid_slice_6()
Test with a slice of the sequence, starting at 6.
- class seismicrna.core.seq.tests.region_test.TestSubregion(methodName='runTest')
Bases:
TestCase
- test_full_region_full_length_sub()
- test_full_region_full_sub()
- test_full_region_full_sub_end3()
- test_full_region_full_sub_end5()
- test_full_region_full_sub_name()
- test_partial_trunc_region_trunc_sub()
- test_trunc_region_full_sub()
- test_trunc_region_trunc_sub()
- class seismicrna.core.seq.tests.region_test.TestUnite(methodName='runTest')
Bases:
TestCase
- test_diff_refs()
- test_diff_seqs()
- test_empty_invalid()
- test_one_full()
- test_one_full_named()
- test_one_masked()
- test_one_slice()
- test_two_disjoint()
- test_two_disjoint_refseq()
- test_two_disjoint_wrong_refseq()
- test_two_full()
- test_two_masked()
- test_two_overlapping()
- test_two_overlapping_refseq()
- class seismicrna.core.seq.tests.region_test.TestWindowToMargins(methodName='runTest')
Bases:
TestCase
Test function window_to_margins.
- test_window_0()
- test_window_float()
- test_window_length()
- test_window_margins()
Tests for Sequence Core Module.
- class seismicrna.core.seq.tests.xna_test.TestDNA(methodName='runTest')
Bases:
TestCase
Test class DNA.
- test_alph()
- test_bool()
Test that only zero-length DNA sequences are falsy.
- test_contains()
- test_get_alphaset()
- test_get_comp()
- test_get_comptrans()
- test_get_nonalphaset()
- test_invalid_bases()
Test whether invalid characters raise ValueError.
- test_kmers()
- test_picto()
Test pictograms.
- test_random()
Test whether random DNA sequences can be created.
- test_reverse_complement()
Test reverse complementing DNA sequences.
- test_slice()
Test slicing DNA sequences.
- test_to_array()
Test generating NumPy arrays from DNA sequences.
- test_transcribe()
Test transcribing DNA sequences.
- test_valid()
Test whether valid DNA sequences can be created.
- class seismicrna.core.seq.tests.xna_test.TestExpandDegenerateSeq(methodName='runTest')
Bases:
TestCase
Test function expand_degenerate_seq.
- test_one_degenerate()
Test that one sequence is returned for each DNA base.
- test_two_degenerate()
Test that one sequence is returned for every combination of two DNA bases.
- test_zero_degenerate()
Test that the original sequence is returned.
- class seismicrna.core.seq.tests.xna_test.TestRNA(methodName='runTest')
Bases:
TestCase
Test class RNA.
- test_alph()
- test_bool()
Test that only zero-length RNA sequences are falsy.
- test_get_alphaset()
- test_get_comp()
- test_get_comptrans()
- test_get_nonalphaset()
- test_invalid_bases()
Test whether invalid characters raise ValueError.
- test_picto()
Test pictograms.
- test_random()
Test whether random RNA sequences can be created.
- test_reverse_complement()
Test reverse complementing RNA sequences.
- test_reverse_transcribe()
Test reverse transcribing RNA sequences.
- test_slice()
Test slicing RNA sequences.
- test_to_array()
Test generating NumPy arrays from RNA sequences.
- test_valid()
Test whether valid RNA sequences can be created.
- class seismicrna.core.seq.tests.xna_test.TestXNA(methodName='runTest')
Bases:
TestCase
Test basic properties of the XNA abstract base class.
- test_abstract_base_class()
Test that instantiating an XNA raises a TypeError.
- test_dict_str_dna_rna()
Test that instances of str, DNA, and RNA with identical sequences can all be used together as dict keys.
- test_equal_dna_dna()
Test that DNA instances with the same sequences compare as equal.
- test_equal_rna_rna()
Test that RNA instances with the same sequences compare as equal.
- test_hashable_dna()
Test that DNA instances are hashable.
- test_hashable_rna()
Test that RNA instances are hashable.
- test_not_equal_dna_rna()
Test that DNA and RNA instances with the same sequences compare as not equal.
- test_not_equal_dna_str()
Test that DNA and str instances with the same sequences compare as not equal.
- test_not_equal_rna_str()
Test that RNA and str instances with the same sequences compare as not equal.
- test_set_str_dna_rna()
Test that instances of str, DNA, and RNA with identical sequences can all be used together in a set.