biopython v1.71.0 Bio.NeuralNetwork.Gene.Signature.SignatureCoder
Convert a Sequence into its signature representatives.
This takes a sequence and a set of signatures, and converts the sequence into a list of numbers representing the relative amounts each signature is seen in the sequence. This allows a sequence to serve as input into a neural network.
Link to this section Summary
Initialize with the signatures to look for
Convert a sequence into a representation of its signatures
Link to this section Functions
Initialize with the signatures to look for.
- signatures - A complete list of signatures, in order, that are to be searched for in the sequences. The signatures should be represented as a tuple of (first part of the signature, second_part of the signature) — (‘GATC’, ‘GATC’).
- max_gap - The maximum gap we can have between the two elements of the signature.
Convert a sequence into a representation of its signatures.
- sequence - A Seq object we are going to convert into a set of signatures.
Returns: A list of relative signature representations. Each item in the list corresponds to the signature passed in to the initializer and is the number of times that the signature was found, divided by the total number of signatures found in the sequence.