flatten_coi5p {coil}R Documentation

Flatten a list of coi5p output objects into a dataframe.

Description

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

Usage

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

#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"))

[Package coil version 1.2.4 Index]