R/plotLocalizations_Density.R
plotLocalizations_Density-methods.Rd
Plot localization map of molecules from a list of files in a folder with color coded by local density of each molecule.
plotLocalizations_Density(trackll=trackll,scale=256,r=125,file.No=0, point.scale=0.15)
trackll | trajectory list generated by createTrackll() and processing. if NULL, user will be prompted to enter the trackll name. |
---|---|
scale | The pixel scale of image data. |
r | Radius within each molecule to calculate density in nanometer (nm). |
file.No | Select file(s) in the folder to plot. Default 0 for plotting all files in the folder. |
point.scale | Size of the dots representing the molecules. |
PDF: One PDF file with one plot on each page.
Plot localization map of molecules from a list of files in a folder with color coded by local density of each molecule. The localization of molecule is considered as the first position of its track.
Upon running of the function, users will be prompted to input the name of the track list (trackll). Input un-merged trackll and the plotting will start. The local density of each molecule is calculated by counting the number of molecules within a given radius around the position of the molecule. The higher the number, the higher the local density.
# Generate trackll, and process, # e.g. mask region of interest, tracks from multiple files should not be # merged. folder=system.file('extdata','HSF',package='sojourner') trackll=createTrackll(folder=folder, input=3)#> #> Reading ParticleTracker file: HSF-Halo_1.csv ... #> #> alo_1 read and processed. #> #> Reading ParticleTracker file: HSF-Halo_2.csv ... #> #> alo_2 read and processed. #> #> Process complete.#> Reading mask file HSF-Halo_1_MASK.tif #> Reading mask file HSF-Halo_2_MASK.tif #> #> All files masked.# Plot localization map, plotLocalizations_Density(trackll=trackll,scale=128, r=125,file.No=0,point.scale=0.3)#> Plotting...A PDF file will be output in the working directory.#> pdf #> 2# Plot only file No. 2 and increase the point size, plotLocalizations_Density(trackll=trackll,scale=128, r=125,file.No=2,point.scale=1)#> Plotting...A PDF file will be output in the working directory.#> pdf #> 2