def test_get_adj_str_ndarray(self, tmpdir): cw = CountsWeighter(k=1) array = np.array([[1, 2, 3, 4], [5, 6, 7, 8]]) array_path = str(Path(tmpdir, "out.npy")) np.save(array_path, array) counts = cw.get_counts(array_path) expected = pd.DataFrame(array, columns=["A", "G", "T", "C"]) assert expected.equals(counts)
def test_get_adj_df(self): cw = CountsWeighter(k=1) array = np.array([[1, 2, 3, 4], [5, 6, 7, 8]]) expected = pd.DataFrame(array, columns=["A", "G", "T", "C"]) counts = cw.get_counts(expected) assert expected.equals(counts)
def test_get_adj_ndarray(self): cw = CountsWeighter(k=1) array = np.array([[1, 2, 3, 4], [5, 6, 7, 8]]) counts = cw.get_counts(array) expected = pd.DataFrame(array, columns=['A', 'G', 'T', 'C']) assert expected.equals(counts)