MCPcopy Create free account
hub / github.com/InternScience/InternAgent / prepare_input

Function prepare_input

tasks/AutoEAP/code/experiment.py:68–80  ·  view source on GitHub ↗
(data_set, params)

Source from the content-addressed store, hash-verified

66 return np.array(feature_matrix)
67
68def prepare_input(data_set, params):
69 if params['encode'] == 'one-hot':
70 seq_matrix = np.array(data_set['Sequence'].apply(one_hot_encode).tolist()) # (number of sequences, length of sequences, nucleotides)
71 elif params['encode'] == 'k-mer':
72 seq_matrix = np.array(data_set['Sequence'].apply(kmer_features, k=3).tolist()) # (number of sequences, 1, 4^k)
73 else:
74 raise Exception ('wrong encoding method')
75
76 Y_dev = data_set.Dev_log2_enrichment
77 Y_hk = data_set.Hk_log2_enrichment
78 Y = [Y_dev, Y_hk]
79
80 return seq_matrix, Y
81
82def DeepSTARR(params):
83 if params['encode'] == 'one-hot':

Callers 1

mainFunction · 0.85

Calls 1

applyMethod · 0.45

Tested by

no test coverage detected