Dcoef-methods: Dcoef

Description Usage Arguments Details Value Examples

Description

Caclulate diffusion coefficient (Dcoef) for trajecotries.

Usage

1
2
3
4
Dcoef( MSD=NULL,trackll=NULL,dt=6,filter=c(min=7,max=Inf),rsquare=0.8,
       resolution=0.107,binwidth=NULL,method=c("static","percentage",
       "rolling.window"),plot=FALSE,output=FALSE,t.interval=0.01,
       profile=NULL)

Arguments

MSD

Mean Square Displacement calculated using msd() function. Either MSD or trackll can be passed into Dcoef for calculation of diffusion coefficient.

trackll

Track list output from readDiatrack().

dt

Time intervals. Default 6.

filter

a vector specifies the minimum and max length of trajecotries to be analyzed. Take only trajectories that has number of frames greater than (>=) min and less than (<) max.

rsquare

rsquare filter on Dcoef results. Default to be 0.8. Set value to 0 if rsquare filter is not desired.

resolution

ratio of pixel to uM.

binwidth

binwidth used for histogram. Default NULL, automatically assign binwidth.

method

"static", uses time lags 2~5 to calculate diffusion coefficient; "percentage", uses (tierd) percentage (default 0.25) of time lags (see Details). "rolling.window", time lags uses for Dcoef follows a rolling window with specified window size (default 4).

plot

A parameter for plotting. Default FALSE, no plot; If TRUE, automatically plots 'histogram' with count information, binwidth can be set through parameter binwidth; as well as 'density' with density/frequency.

output

An Logical indicate if output should be generated. See Values for detail.

t.interval

time interval between frames, default 0.010 s (10ms).

profile

Location of preference file. By default (NULL), it is stored at : system.file("extdata","PREF","profile.csv",package="sojourner"). User can provide preference file by specifying the location of the file, e.g. profile="/Users/shengliu/Desktop/profile.csv".

Details

Generic parameters (parameter applied to all methods, such as resolution etc) are set in the function. Method dependent parameters (such as lag.start, lag.end for method = "static"), are stored in profile.csv in PREF folder under extdata. To change preference parameter, can either programably or manually go to folder system.file("extdata","PREF","profile.csv",package="sojourner"), and c hange the profile.csv.

lag.start: time lag used as start of dt for compute Dcoef. Default 2.

lag.end: Time lag used as end of dt for compute Dcoef. Default 2.

method for calculating Dcoef:

Value

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# compare files
folder=system.file("extdata",'SWR1',package="sojourner")
trackll = createTrackll(folder=folder, input=3)
MSD=msd(trackll=trackll)
Dcoef(MSD=MSD,method="static",plot=TRUE)

# compare folders
folder1=system.file("extdata",'SWR1',package="sojourner")
folder2=system.file("extdata",'HTZ1',package="sojourner")
trackll2=compareFolder(folders=c(folder1,folder2), input=3)
Dcoef(trackll=trackll2,method="percentage",plot=TRUE)
Dcoef(trackll=trackll2,method="rolling.window",plot=TRUE)

sojourner documentation built on March 29, 2021, 6 p.m.