seismicrna.filter.tests package

Submodules

class seismicrna.filter.tests.main_test.TestFilter(*args, **kwargs)

Bases: TestCase, ABC

dataset(*, count_del: bool = True, count_ins: bool = True, mask_polya: int = 0, probe: str = 'none', mask_a: bool | None = None, mask_c: bool | None = None, mask_g: bool | None = None, mask_u: bool | None = None, drop_discontig: bool = False, min_ncov_read: int = 1, min_fcov_read: float = 0.0, min_finfo_read: float = 0.0, max_fmut_read: float = 1.0, min_mut_gap: int = 0, min_ninfo_pos: int = 1, max_fmut_pos: float = 1.0, **kwargs)
abstractmethod classmethod end3s() list[list[int]]

3’ end coordinates.

abstractmethod classmethod end5s() list[list[int]]

5’ end coordinates.

abstractmethod classmethod reads_per_batch() int

Number of reads per batch.

abstractmethod classmethod reads_per_sample() dict[str, int]

Number of reads per sample.

setUp()

Hook method for setting up the test fixture before exercising it.

tearDown()

Hook method for deconstructing the test fixture after testing it.

class seismicrna.filter.tests.main_test.TestFilter1Batch(*args, **kwargs)

Bases: TestFilter, ABC

classmethod reads_per_batch()

Number of reads per batch.

class seismicrna.filter.tests.main_test.TestFilter1Sample(*args, **kwargs)

Bases: TestFilter, ABC

classmethod reads_per_sample()

Number of reads per sample.

class seismicrna.filter.tests.main_test.TestFilter2Samples(*args, **kwargs)

Bases: TestFilter, ABC

classmethod reads_per_sample()

Number of reads per sample.

class seismicrna.filter.tests.main_test.TestFilterBatches(*args, **kwargs)

Bases: TestFilter, ABC

classmethod reads_per_batch()

Number of reads per batch.

class seismicrna.filter.tests.main_test.TestFilterPaired(*args, **kwargs)

Bases: TestFilter, ABC

classmethod end3s()

3’ end coordinates.

classmethod end5s()

5’ end coordinates.

class seismicrna.filter.tests.main_test.TestFilterSingle(*args, **kwargs)

Bases: TestFilter, ABC

classmethod end3s()

3’ end coordinates.

classmethod end5s()

5’ end coordinates.

class seismicrna.filter.tests.main_test.TestFilterSingle1Sample1Batch(*args, **kwargs)

Bases: TestFilterSingle, TestFilter1Sample, TestFilter1Batch

test_all_no_mut_min_ncov_read_7()
test_dms_min_ncov_read_5()
test_dms_min_ncov_read_6()
test_drop_discontig()
test_drop_read()
test_drop_read_and_drop_read_file()
test_drop_read_file()
test_drop_read_files()
test_mask_a()
test_mask_c()
test_mask_g()
test_mask_polya_3()
test_mask_polya_4()
test_mask_pos()
test_mask_pos_all()
test_mask_pos_and_mask_pos_file()
test_mask_pos_file()
test_mask_pos_files()
test_mask_pos_min_ncov_read_5()
test_mask_pos_min_ncov_read_6()
test_mask_pos_multiple()
test_mask_u()
test_min_fcov_read_amplicons()

Two-PCR-amplicon scenario: filter reads that partially cover the useful region.

Positions 1 and 8 simulate 5’ and 3’ primers and are masked. Kept region after primer masking: positions 2-7 (6 nt, region.size=6).

Read5 (start=3, end=8) represents a read from an adjacent amplicon that begins inside amplicon A’s primer region. After masking position 8 (3’ primer), it covers positions 3-7 = 5/6 ≈ 0.83 → filtered.

All other reads start at position 1 or 2 and end at position 7 or 8, so after primer masking they each cover all 6 kept positions (positions 2-7) → fcov = 1.0 → kept.

test_min_finfo_read_1()
test_min_ncov_read_6()
test_min_ncov_read_7()
test_min_ncov_read_8()
test_nomask()
test_only_mut_ag_min_ninfo_pos_6()
test_probe_dms()
test_probe_dms_mask_a()
test_probe_dms_mask_c()
test_probe_dms_nomask_g()
test_probe_dms_nomask_u()
test_probe_etc()
test_probe_etc_mask_g()
test_probe_etc_mask_u()
test_probe_etc_nomask_a()
test_probe_etc_nomask_c()
test_probe_shape()
class seismicrna.filter.tests.main_test.TestSetMaskPolya(methodName='runTest')

Bases: TestCase

test_dms_default()
test_etc_default()
test_explicit_value_none_default()
test_explicit_value_overrides_default()
test_explicit_zero_overrides_probe_default()
test_none_default()
test_shape_default()
class seismicrna.filter.tests.main_test.TestSetMutGapParams(methodName='runTest')

Bases: TestCase

test_auto_collisions_resolves_for_none_probe()
test_dms_default_collisions()
test_dms_default_gap()
test_etc_default_collisions()
test_etc_default_gap()
test_explicit_collisions_drop_overrides_auto()
test_explicit_collisions_merge_overrides_auto()
test_explicit_gap_and_collisions()
test_explicit_gap_overrides_default()
test_explicit_zero_gap_overrides_default()
test_none_default_collisions()
test_none_default_gap()
test_shape_default_collisions()
test_shape_default_gap()
seismicrna.filter.tests.main_test.extract_positions(dataset: FilterMutsDataset)
seismicrna.filter.tests.main_test.extract_read_nums(dataset: FilterMutsDataset)
seismicrna.filter.tests.main_test.write_datasets(out_dir: Path, reads_per_sample: dict[str, int], reads_per_batch: int, end5s: list[list[int]], end3s: list[list[int]])