## Load/create sample APset and FPset
data(apset)
fpset <- desc2fp(apset)
## Standard Jarvis-Patrick clustering on APset/FPset objects
jarvisPatrick(nearestNeighbors(apset,numNbrs=6), k=5, mode="a1a2b")
jarvisPatrick(nearestNeighbors(fpset,numNbrs=6), k=5, mode="a1a2b")
## Jarvis-Patrick clustering only with requirement (b)
jarvisPatrick(nearestNeighbors(fpset,numNbrs=6), k=5, mode="b")
## Modified Jarvis-Patrick clustering with minimum similarity 'cutoff'
## value (here Tanimoto coefficient)
jarvisPatrick(nearestNeighbors(fpset,cutoff=0.6, method="Tanimoto"), k=2 )
## Output nearest neighbor table (matrix)
nnm <- nearestNeighbors(fpset,numNbrs=6)
## Perform clustering on precomputed nearest neighbor table
jarvisPatrick(nnm, k=5)
Run the code above in your browser using DataLab