class_docstr: Tests that genomic metrics work as expected.
docstr: Test in-silico mutagenesis returns nonzero output.
docstr_tok: ["Test","in-silico","mutagenesis","returns","nonzero","output","."]
code: def test_in_silico_mutagenesis_nonzero(self):
      """Test in-silico mutagenesis returns nonzero output."""
      # Construct and train SequenceDNN model
      sequences = np.array(["ACGTA", "GATAG", "CGCGC"])
      sequences = dc.utils.genomics_utils.seq_one_hot_encode(
          sequences, letters=LETTERS
      )
      labels = np.array([1, 0, 0])
      labels = np.reshape(labels, (3, 1))
      self.assertEqual(sequences.shape, (3, 4, 5, 1))
  
      dataset = dc.data.NumpyDataset(sequences, labels)
      model = self.create_model_for_mutagenesis()
      model.fit(dataset, nb_epoch=1)
  
      # Call in-silico mutagenesis
      mutagenesis_scores = in_silico_mutagenesis(model, sequences)
      self.assertEqual(mutagenesis_scores.shape, (1, 3, 4, 5, 1))
  
      # Check nonzero elements exist
      assert np.count_nonzero(mutagenesis_scores) > 0
  
file_path: deepchem/deepchem/metrics/tests/test_genomics.py
imports: import unittest
  import numpy
  import deepchem
  import pytest
  from deepchem.metrics.genomic_metrics import get_motif_scores
  from deepchem.metrics.genomic_metrics import get_pssm_scores
  from deepchem.metrics.genomic_metrics import in_silico_mutagenesis
label_desc: Use image node_id 5 for calling the TestGenomicMetrics obj's underlying member method code with example usage: obj.test_in_silico_mutagenesis_nonzero() without return types