Commit 646305ff authored by alat-rights's avatar alat-rights
Browse files

yapf

parent a578d08a
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -40,12 +40,14 @@ class TestFASTALoader(unittest.TestCase):
    assert sequences.X.shape == (3, 58, 5)

  def test_fasta_one_hot_big(self):
    protein = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
               'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
               '*', '-']
    protein = [
        'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
        'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '*', '-'
    ]
    input_file = os.path.join(self.current_dir,
                              "../../data/tests/uniprot_truncated.fasta")
    loader = dc.data.FASTALoader(OneHotFeaturizer(charset=protein, max_length=1000), legacy=False)
    loader = dc.data.FASTALoader(
        OneHotFeaturizer(charset=protein, max_length=1000), legacy=False)
    sequences = loader.create_dataset(input_file)

    assert sequences.X.shape