def test_create_terminal_gap_mask_one_chrome(self): obs = _create_terminal_gap_mask(self.msa1, self.mask5) npt.assert_array_equal(obs, [True, False, False, False]) seqs = [ skbio.DNA('ACG-', metadata=dict(id='s1')), skbio.DNA('AG-T', metadata=dict(id='s2')), skbio.DNA('-C-T', metadata=dict(id='s3'))] msa = skbio.TabularMSA(seqs, minter='id') obs = _create_terminal_gap_mask(msa, self.mask5) npt.assert_array_equal(obs, [True, False, False, False])
def test_create_terminal_gap_mask_all(self): seqs = [ skbio.DNA('----', metadata=dict(id='s1')), skbio.DNA('AGAT', metadata=dict(id='s2')), skbio.DNA('----', metadata=dict(id='s3'))] msa = skbio.TabularMSA(seqs, minter='id') obs = _create_terminal_gap_mask(msa, self.mask2) npt.assert_array_equal(obs, [True, True, True, True]) seqs = [ skbio.DNA('ACG-', metadata=dict(id='s1')), skbio.DNA('AG-T', metadata=dict(id='s2')), skbio.DNA('----', metadata=dict(id='s3'))] msa = skbio.TabularMSA(seqs, minter='id') obs = _create_terminal_gap_mask(msa, self.mask5) npt.assert_array_equal(obs, [True, True, True, True])