Description Usage Arguments Examples
Converts ECFP hash codes into a sparse matrix by arbitrarily assigning them as indices.
1 |
data |
data.table containing compound identifier and fingerprint hash |
cpd.identifier |
character string identifying compounds: Broad ID, InChIKey, etc... |
1 2 3 4 5 6 7 8 9 10 | hashes <- round(rnorm(120, 100000000, 1000), 1)
compounds <- data.table('ECFP_4[1]' = sample(hashes, 100, replace=TRUE),
'ECFP_4[2]' = sample(hashes, 100, replace=TRUE),
'ECFP_4[3]' = sample(hashes, 100, replace=TRUE),
'ECFP_4[4]' = sample(hashes, 100, replace=TRUE),
'ECFP_4[5]' = sample(hashes, 100, replace=TRUE))
compounds$InChIKey <- sapply(1:dim(compounds)[1], function(x)
paste(sample(LETTERS, 10, replace=TRUE), collapse=''))
sparseFP <- sfp(compounds, cpd.identifier='InChIKey')
sparseFP[1:10, 1:15]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.