120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
# File 'app/openbel/api/resources/evidence_transform.rb', line 120
def transform_evidence!(evidence)
experiment_context = evidence.experiment_context
if experiment_context != nil
evidence.experiment_context = ExperimentContext.new(
experiment_context.group_by { |annotation|
annotation[:name]
}.values.map do |grouped_annotation|
{
:name => grouped_annotation.first[:name],
:value => grouped_annotation.flat_map { |annotation|
annotation[:value]
},
:uri => grouped_annotation.flat_map { |annotation|
annotation[:uri]
}
}
end
)
end
end
|