Пример #1
0
def encode_fasta_sequence(fname):
    """
  Loads fasta file and returns an array of one-hot sequences.

  Parameters
  ----------
  fname: str
    Filename of fasta file.

  Returns
  -------
  np.ndarray: Shape (N_sequences, 5, sequence_length, 1).
  """
    warnings.warn(
        "This Function has been deprecated and now resides in deepchem.utils.genomics_utils",
        DeprecationWarning)

    return encode_sequence(fname)
Пример #2
0
def encode_bio_sequence(fname, file_type="fasta", letters="ATCGN"):
    """
  Loads a sequence file and returns an array of one-hot sequences.

  Parameters
  ----------
  fname: str
    Filename of fasta file.
  file_type: str
    The type of file encoding to process, e.g. fasta or fastq, this
    is passed to Biopython.SeqIO.parse.
  letters: str
    The set of letters that the sequences consist of, e.g. ATCG.

  Returns
  -------
  np.ndarray: Shape (N_sequences, N_letters, sequence_length, 1).
  """
    warnings.warn(
        "This Function has been deprecated and now resides in deepchem.utils.genomics_utils ",
        DeprecationWarning)
    return encode_sequence(fname, file_type=file_type, letters=letters)