Commit 187c214b authored by alat-rights's avatar alat-rights
Browse files

Remove N channel

parent ed7f88ca
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -905,12 +905,12 @@ class FASTALoader(DataLoader):
                  'Y', 'Z', '*', '-'),
      "nucleic": ('A', 'C', 'G', 'T', 'U', '(i)', 'R', 'Y', 'K', 'M', 'S', 'W',
                  'B', 'D', 'H', 'V', 'N', '-'),
      "ATCGN": ('A', 'T', 'C', 'G', 'N')
      "ATCGN": ('A', 'T', 'C', 'G')
    }
    try:
      self.charset = charsets[charset]
    except KeyError:
      if (featurizer == OneHotFeaturizer):
      if (featurizer == OneHotFeaturizer): # TODO EXPLICITLY CHECK IF FEATURIZER USES CHARSET
        logger.exception("charset is invalid. charset must be 'protein', 'nucleic', or 'ATCGN'.")
      else:
        logger.warning("charset is invalid, ignoring...")
@@ -919,7 +919,7 @@ class FASTALoader(DataLoader):
    if isinstance(featurizer, UserDefinedFeaturizer):
      self.user_specified_features = featurizer.feature_fields

    featurizer = featurizer(charset = self.charset, max_length = max_length)
    featurizer = featurizer(charset = self.charset, max_length = max_length) # TODO EXPLICITLY CHECK IF MAX_LENGTH IS DESIRED
    self.featurizer = featurizer

  def create_dataset(self,
+1 −1
Original line number Diff line number Diff line
@@ -30,4 +30,4 @@ class TestFASTALoader(unittest.TestCase):
    if legacy:
      assert sequences.X.shape == (3, 5, 58, 1)
    else:
      assert sequences.X.shape == (3, 58, 6)
      assert sequences.X.shape == (3, 58, 5)