add_frag_info: decode fragment identifiers for spike-in standards

View source: R/add_frag_info.R

add_frag_infoR Documentation

decode fragment identifiers for spike-in standards

Description

given a vector of fragment identifiers like 160_2_35 or 80b_1C_35G-2, encoded typically as lengthInBp_numberOfCpGs_GCpercent, and optionally a database of spike-in sequences corresponding to those fragments, add those columns to the source data (along with, if present in the database, other metadata such as standard concentrations, GC fraction, etc.) and return i an updated DataFrame.

Usage

add_frag_info(x, frag_grp = "frag_grp", spike = NULL)

Arguments

x

data.frame with a column of spike information (see above)

frag_grp

column name for the spike contig information (frag_grp)

spike

optional database of spike-in properties (none)

Value

     the data.frame x, augmented with metadata columns

Examples

data(spike_cram_counts) 
data(spike, package="spiky") 
spike <- subset(spike, methylated == 1)
add_frag_info(spike_cram_counts, spike=spike)


trichelab/spiky documentation built on Sept. 17, 2022, 8:44 a.m.