methods for filter and trim tracks based on track length.
filterTrack(trackll,filter=c(min=7,max=Inf)) trimTrack(trackll,trimmer=c(min=1,max=32)) trackLength(trackll)
trackll | a list of track lists. |
---|---|
filter | range of possible track lengths to keep |
trimmer | range of track lengths allowed in output, otherwise trimmed. |
trackll filtered or trimmed tracks.
len list of track lengths.
filterTrack() is used to filter out tracks that has length within a specified range (default 7~Inf). On the other hand, despite the lengths of tracks, trimTrack() is used to trim /cutoff all tracks to a specified range (default 1~32).
folder=system.file('extdata','SWR1',package='sojourner') trackll=createTrackll(folder=folder, input=3)#> #> Reading ParticleTracker file: SWR1_WT_140mW_image6.csv ... #> #> mage6 read and processed. #> #> Process complete.#> applying filter, min 7 max Inf#> applying trimmer, min 1 max 20# see the min and max length of the trackll # trackLength() is a helper function output track length of trackll lapply(trackLength(trackll),min)#> $SWR1_WT_140mW_image6.csv #> [1] 2 #>#> $SWR1_WT_140mW_image6.csv #> [1] 7 #>#> $SWR1_WT_140mW_image6.csv #> [1] 30 #>#> $SWR1_WT_140mW_image6.csv #> [1] 20 #>