Splitting Multivalued Properties

I am using the "Molecular Similarity (Tanimoto etc)" component. This component adds two properties to its output. The "ClosestNames" and the "ClosestSimilarities" properties are multivalued. They contain multiple values delimited by semicolon (";") characters. I would like to transform this output so that each value pair from these two properties is given its own record. For example:

ClosestNamesClosestSimilarities
34;560.85;0.98
13;23;450.80;0.95;0.91


transformed to:

IdentifierSimilarity
340.85
56

0.98

130.80
230.95
450.91

What would be the most efficient way to perform this operation in Pipeline Pilot?

Answers 3
LB
LB 2011-12-14

Hi-

This is what the 'Unmerge Data' component is designed to do.  Give that a try.

Leo

IK
IK 2011-12-14

If the data is already in an array, then you can use the Unmerge Data component right away. However, if it is a delimited string, then you will first want to use the Expand() function followed by the Unmerge Data component. The PilotScript for your example would look like this:

Expand(';',ClosestNames);

Expand(';',ClosestSimilarities);

Rename('ClosestNames','Identifier');

Rename('ClosestSimilarities','Similarity');

Ian

DP
DP 2011-12-14

Thanks, the "Unmerge Data" component connected directly to the "Molecular Similarity (Tanimoto etc)" component to achieve what I needed.