K nearest neigbour search script combined with Fiji macro
- Rscript (added to PATH variable)
- RANN package
Test command
Rscript kNNScript.R test
With input
Rscript kNNScript.R inputA.csv inputB.csv [#k nearest neighbours to find] ouputName plot
-
NOTE: Absolute paths should be provided to the script or it will read from the Fiji app directory
-
a. Specify the absolute path to the working directory
//Specify absolute path to working directory
wd = "C:/Users/...path to working directory.../"
- b. Specify input files, number of nearest neighbours to calculate (k) and output name (should contain no file extension)
- Two csv files with X and Y coordinates with no headers
- One csv file with the query coordinate set and coordinate sets for k nearest neighbours
- [Optional] Plot with query set and nearest neighbour for each