*Generate a sequence iteratively using one cell of the second LSTM.
Parameters: - X: np.array, Input sequences (one-hot encoded, reversed). - model: Trained Keras model for generation. - vocab_size: int, Size of the vocabulary (e.g., 4 for A, T, C, G).
Generate list of VR from one TR (one TR-> n VR). Parameters: - TR: one TR sequence (e.g., strings, lists, or arrays) -n: integer corresponding to the number of VR to generate Returns: - list: list of n VR sequence strings given the one TR sequence.
Generate list of VR from list of TR (one TR-> one VR). Parameters: - X_seq: list of TR sequences (e.g., strings, lists, or arrays) Returns: - list: list of VR sequence strings given TR sequences (corresponding to the initial TR list).
Details
X_seq
X_seq is a list of sequences ATCG sequences (faster if same length)
seq_2=seq[:]seq_2=seq[:10]+"CCC"+seq[13:]ll=compute_likelihood_matrix([seq,seq_2],list_vr)for k inrange(2):print(f'log likelihoods of VRs with TR {k}:')print(ll[k])
log likelihoods of VRs with TR 0:
[-15.088246688449884, -13.283765104251316, -7.054487097791395, -6.822223379890877, -10.39629542414491]
log likelihoods of VRs with TR 1:
[-38.96067896598159, -37.36270110571473, -31.011657058638708, -30.822617378527305, -34.504065737226]