Combine multiple tracklls into one trackll.

combineTrackll(trackll,name='combined trackll',merged=TRUE)

Arguments

trackll

The tracklls to be combined together.

name

a character string given to set the 'names' attribute for the combined trackll

merged

An Logical indicate if the tracklls to combine are merged or not.

Value

  • trackll: combined trackll.

Details

Combine multiple track lists (tracklls) from multiple folders into one trackll, i.e. combining track infomation from files in multiple folders (replicates) together as if they are in one folder. The tracklls can be either merged or un-merged.

The name argument sets the 'names' attribute for the combined trackll, which will be used in the same way as the folder names for the original tracklls, e.g., displayed as legend when plotting Dcoef or MSD for the combined trackll.

Examples

# Generate trackll, and process, # e.g. mask region of interest, merge tracks from multiple files. folder1=system.file('extdata','HSF',package='sojourner') trackll1=createTrackll(folder1,input=3, cores = 2)
#> Initiated parallel execution on 2 cores #> #> Stopping clusters... #> #> Process complete.
trackll1=maskTracks(folder1,trackll1)
#> Reading mask file HSF-Halo_1_MASK.tif #> Reading mask file HSF-Halo_2_MASK.tif #> #> All files masked.
trackll1=mergeTracks(folder1,trackll1)
#> #> Merging of folder HSF complete.
folder2=system.file('extdata','HSF_2',package='sojourner') trackll2=createTrackll(folder2,input=2, cores = 2)
#> Initiated parallel execution on 2 cores #> #> Stopping clusters... #> #> Process complete.
trackll2=maskTracks(folder2,trackll2)
#> Reading mask file HSF-Halo_3_MASK.tif #> #> All files masked.
trackll2=mergeTracks(folder2,trackll2)
#> #> Merging of folder HSF_2 complete.
# Combine the tracklls together, input trackll names when prompted, trackll=combineTrackll(trackll=c(trackll1,trackll2),merged=TRUE)