Description Usage Arguments Details Examples
This funciton collects the samples from a data.table-class
object that
fulfill the requirements of an attribute attr
specified with
the fun
argument
1 | fetchSamples(samples, attr = NULL, func = NULL, action = "include")
|
samples |
an object of |
attr |
a string specifying a column in the |
func |
an anonymous function, see Details for more information |
action |
a string (either |
The anonymous function provided in the func
argument has to return an integer that indicate the rows that the action
should be performed on.
Core expressions which are most useful to implement the anonymous function are:
which
with inequality signs: ==,>,<
grep
1 2 3 4 5 6 7 | projectConfig = system.file("extdata", "example_peps-master",
"example_amendments1", "project_config.yaml", package="pepr")
p = Project(projectConfig)
s = sampleTable(p)
fetchSamples(s,attr = "sample_name", func=function(x){ which(x=="pig_0h") },action="include")
fetchSamples(s,attr = "sample_name", func=function(x){ which(x=="pig_0h") },action="exclude")
fetchSamples(s,attr = "sample_name", func=function(x){ grep("pig_",x) },action="include")
|
Registered S3 method overwritten by 'pryr':
method from
print.bytes Rcpp
Loading config file: /usr/lib/R/site-library/pepr/extdata/example_peps-master/example_amendments1/project_config.yaml
amendments: newLib,newLib2
sample_name protocol organism time file_path
1: pig_0h RRBS pig 0 /data/lab/project/pig_0h.fastq
Empty data.table (0 rows and 5 cols): sample_name,protocol,organism,time,file_path
sample_name protocol organism time file_path
1: pig_0h RRBS pig 0 /data/lab/project/pig_0h.fastq
2: pig_1h RRBS pig 1 /data/lab/project/pig_1h.fastq
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.