filterTrack-methods: filterTrack

Description Usage Arguments Details Value Examples

Description

methods for filter and trim tracks based on track length.

Usage

1
2
filterTrack(trackll,filter=c(min=7,max=Inf)))
trimTrack(trackll,trimmer=c(min=1,max=32)))

Arguments

trackll

Track list output from readDiatrack().

filter

length of track used for filtration. Only tracks pass through filter will be selected.

trimmer

length of track used for trimming. All tracks will be trimmed by the trimmer.

Details

filter is used to filter out tracks that has length within a specified range (default 5~Inf); On the other hand, despite the lengths of tracks, trimmer is used to trim /cutoff all tracks to a specified range (default 1~32).

Value

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
folder=system.file("extdata","SWR1",package="smt")
trackll=readDiatrack(folder)

trackll.filter=filterTrack(trackll,filter=c(7,Inf))
trackll.trim=trimTrack(trackll,trimmer=c(1,20))

# see the min and max length of the trackll
# trackLength() is a helper function output track length of trackll
lapply(trackLength(trackll),min)
lapply(trackLength(trackll.filter),min)

lapply(trackLength(trackll),max)
lapply(trackLength(trackll.trim),max)

sheng-liu/smt documentation built on May 29, 2019, 9:22 p.m.