flatten_coi5p: Flatten a list of coi5p output objects into a dataframe.

Description Usage Arguments Value See Also Examples

View source: R/pipeline.r

Description

This helper function is designed to act upon a list of coi5p objects and extract the object components that the user requires.

Usage

1
flatten_coi5p(x, keep_cols = "all")

Arguments

x

A list of coi5p objects.

keep_cols

The name of a coi5p object component, or a vector of components that should be turned into dataframe columns. Available components are: name, raw, framed, aaSeq, aaScore, indel_likely, stop_codons.

Value

A dataframe with the coi5p object information flattened into columns.

See Also

coi5p_pipe

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#create a list of coi5p objects
coi_output = lapply(example_barcode_data$sequence, function(x){
    coi5p_pipe(x)
  })
#flatten the list into a dataframe
coi_df = flatten_coi5p(coi_output)
#extract only a single column
coi_framed = flatten_coi5p(coi_output, keep_cols = "framed")
#or subset multiple columns
coi_framed = flatten_coi5p(coi_output, keep_cols = c("framed", "aaSeq"))

coil documentation built on April 21, 2021, 1:06 a.m.