Learn R Programming

BoSSA (version 3.7)

sub_pplace: Subsets a pplace object

Description

Subsets a pplace or jplace object based on the placement_id, the name of the placement or a regular expression of the name of the placement

Usage

sub_pplace(x, placement_id = NULL, ech_id = NULL, ech_regexp = NULL, run_id = NULL)

Arguments

x

The pplace or jplace object to subset

placement_id

A vector of the placement_id to subset

ech_id

A vector of the names of the placement to subset

ech_regexp

A regular expression of the name of the placement to subset

run_id

A vector of run_id to subset

Value

A pplace object

Details

When using placement_id, the subset is performed based on the placement_id column of the multiclass, placements, placement_positions, placement_names, placement_classifications, placement_evidence, placement_median_identities and placement_nbc data frames. When using ech_id and ech_regexp, the subset is performed from the multiclass$name column. When using run_id, the subset is performed based on the placements$run_id column.

Examples

Run this code
# NOT RUN {
data(pplace)

### subsetting using placement ids. Here placements 1 to 5
sub1 <- sub_pplace(pplace,placement_id=1:5)
sub1

### subsetting using sequenes ids
id <- c("GWZHISEQ01:514:HMCLFBCXX:2:1108:1739:60356_90",
"GWZHISEQ01:514:HMCLFBCXX:2:1114:13665:31277_80")
sub2 <- sub_pplace(pplace,ech_id=id)
sub2

### subsetting using a regular expression of sequence ids
sub3 <- sub_pplace(pplace,ech_regexp="^HWI")
sub3
# }

Run the code above in your browser using DataLab