Skip to contents

Filter a OneKP object

Usage

filter_by_code(x, code)

filter_by_clade(x, clade)

filter_by_species(x, species)

Arguments

x

OneKP object

code

character vector of 1KP IDs (e.g. URDJ)

clade

vector of clade-level NCBI taxonomy IDs or scientific names

species

vector of species-level scientific names or NCBI taxonomy IDs

Value

OneKP object

Examples

data(onekp)

# filter by 1KP ID
filter_by_code(onekp, c('URDJ', 'ROAP'))
#> OneKP object
#> Slot "table": metadata for 2 transcriptomes from 2 species
#> Slot "links": map of file names from "table" to URLs

# filter by species name
filter_by_species(onekp, 'Pinus radiata')
#> OneKP object
#> Slot "table": metadata for 1 transcriptomes from 1 species
#> Slot "links": map of file names from "table" to URLs

# filter by species NCBI taxon ID
filter_by_species(onekp, 3347)
#> OneKP object
#> Slot "table": metadata for 1 transcriptomes from 1 species
#> Slot "links": map of file names from "table" to URLs

# filter by clade name scientific name
filter_by_clade(onekp, 'Brassicaceae')
#> Registered S3 method overwritten by 'hoardr':
#>   method           from
#>   print.cache_info httr
#> OneKP object
#> Slot "table": metadata for 10 transcriptomes from 10 species
#> Slot "links": map of file names from "table" to URLs

# filter by clade NCBI taxon ID
filter_by_clade(onekp, 3700)
#> OneKP object
#> Slot "table": metadata for 10 transcriptomes from 10 species
#> Slot "links": map of file names from "table" to URLs