Table 14

R-code for distanceAny matching
# match
> matchedIDs < − matchAnn2Ann(fData(CNdata)[,1], fData(CNdata)[,2],
fData(CNdata)[,3], fData(GEdata)[,1],
fData(GEdata)[,2], fData(GEdata)[,3],
method = “distance”)
> # add offset to distances (avoids infinitely large weights)
> matchedIDs < − lapply(matchedIDs, function(Z, offset){ Z[,3] < − Z[,3] + offset;
return(Z) }, offset = 1)
> # extract ids for object subsetting
> matchedIDsGE < − lapply(matchedIDs, function(Z){ return(Z[, -2, drop=FALSE]) })
> matchedIDsCN < − lapply(matchedIDs, function(Z){ return(Z[, -1, drop=FALSE]) })
> # generate matched objects
> GEdata < − ExpressionSet2weightedSubset(GEdata, matchedIDsGE, 1, 2, 3)
> CNdata < − cghCall2weightedSubset(CNdata, matchedIDsCN, 1, 2, 3)

van Wieringen et al.

van Wieringen et al. BMC Bioinformatics 2012 13:80   doi:10.1186/1471-2105-13-80

Open Data