Operation

Multiply

Applies to:  Numeric Dataset, Numeric Map, Numeric Variable and Region Dataset
Returns: Numeric Dataset, Numeric Map, Numeric Variable or Region Dataset   (The type of the returned object will depend on the source object)

Description

The "multiply" operation is a multiplication operator which will multiply the value (or values) of a numeric data object by a specified amount. For Numeric Datasets the operation will be applied to all positions in the sequences, and for Numeric Maps it will be applied to all entries in the map (including the "default" value). The operation can also be applied to Region Datasets to multiply the value of numeric properties of regions or to append new strings to a "text" property. By default the operation will be applied to the "score" property of the regions unless a different property is specified.

Arguments

NameDescription
property Specifies which property of the data object to multiply. For Numeric Datasets, Numeric Maps and Numeric Variables this will simply be the "value", but for Region Datasets you can select which property of the regions to multiply or append to (the default is "score"). Note that user-defined region properties will not be shown in the drop-down list in the operation dialog, but it is still possible to type in the name other properties.
amount Specifies the amount by which the values in the source object should be multiplied. If the amount is a literal number or a Numeric Variable, each potential value in the source object will be multiplied by the same amount. If the source object is a Numeric Dataset and the "amount" is also a Numeric Dataset, the value of each position in the source will be multiplied by the value in the same position in the "amount" dataset. If the source is a Numeric Dataset and the "amount" is a Sequence Numeric Map, the values of all positions in each sequence are multiplied by the value for that sequence in the map (so each sequence is potentially multiplied by a different value). If both the source and "amount" are Numeric Maps of the same type, the entries in the source map will be multiplied by the corresponding values in the "amount" map. If the source is a Region Dataset and the "amount" is a Numeric Dataset, the region property can be multiplied by a value derived from the values in the Numeric Dataset which are covered by the region. This value could be e.g. the minimum, maximum, average, median or sum of all values within the region or it could be the value of a single position at the center, start or end of the region ("start" and "end" refers to the lowest and highest genomic coordinates of the region with respect to the direct strand. The "relativeStart" and "relativeEnd" positions refer to the most upstream and most downstream position in the region when viewed relative to the orientation of the sequence, and the "regionStart" and "regionEnd" values refer to the most upstream and most downstream positions relative to the orientation of the region itself). If the region is a "motif" region, it is also possible to use "weighted average" or "weighted sum" where the values in each position are weighted by the information content of the motif in the corresponding position. If the operation is applied to a "text" property of a Region Dataset, the "amount" should either be a literal string enclosed in parentheses or a Text Variable. The new text entries will be appended to the existing text property (or a new property will be created). Note that if a text property contains multiple comma-separated entries, the property is treated as a "string set" and strings which are already present in the set will not be appended again.

Conditions: position condition or region condition

Examples


# Multiplies the value of data object X by 10. If X is a Numeric Dataset/Numeric Map/Region Dataset, all positions/entries/regions in the data object will be multiplied by 10.
multiply X by 10

# Returns a new track containing the product of the two tracks in each position
newNumericTrack = multiply Track1 by Track2

# Multiplies the values for the entries in the first map by the corresponding entries in the second map
multiply Map1 by Map2

# Multiplies the current 'score' property of each region in the track with the average value of the NumericTrack within the region
multiply RegionTrack[score] by average NumericTrack

# Appends the three strings 'one', 'two' and 'three' to the text-property 'numbers' of every region in the Region Dataset. If the region already contains one of these strings they will not be appended a second time.
multiply RegionTrack[numbers] by "one,two,three"


See Also: increase, decrease, divide, set