def test_proper_example(self, insertions, exon_counts): """Tests example with two insertions, after exons 2 and 4.""" before, after, dropped = test.split_counts( exon_counts, insertions, gene_id='ENSMUSG00000051951') assert len(before) == 1 assert len(after) == 2 assert dropped == set()
def test_after_gene(self, insertions, exon_counts): """Tests dropping sample with an insertion after the gene""" insertions[0] = insertions[0]._replace(position=3205801) before, after, dropped = test.split_counts( exon_counts, insertions, gene_id='ENSMUSG00000051951') assert len(before) == 1 assert len(after) == 4 assert dropped == {'S1'}
def test_before_gene(self, insertions, exon_counts): """Tests dropping sample with an insertion before the gene""" insertions[1] = insertions[1]._replace(position=3215652) before, after, dropped = test.split_counts( exon_counts, insertions, gene_id='ENSMUSG00000051951') assert len(before) == 3 assert len(after) == 2 assert dropped == {'S2'}
def test_proper_example_df(self, insertions, exon_counts): """Tests same example, using dataframe input for insertions.""" insertion_df = Insertion.to_frame(insertions) before, after, dropped = test.split_counts( exon_counts, insertion_df, gene_id='ENSMUSG00000051951') assert len(before) == 1 assert len(after) == 2 assert dropped == set()
def test_in_exon(self, insertions, exon_counts): """Tests insertion in fourth exon.""" insertions[0] = insertions[0]._replace(position=3207217) before, after, dropped = test.split_counts( exon_counts, insertions, gene_id='ENSMUSG00000051951') assert len(before) == 1 assert len(after) == 1 assert dropped == set()