build_fastas | R Documentation |
From (potential) sites and their surrounding amino acids, create a FASTA-conforming file. Requires a column of unique header values for each site.
build_fastas( data, path, name_col, seq_col, header_pattern = "{.data[[name_col]]}|{get_middle_fragment(.data[[seq_col]], 7)}" )
data |
Data frame in long format, containing unique names and sequence windows. |
path |
Path to write the file to, including file name and extension. |
name_col |
Name of the column that contains metadata about the sequence. Used as a part of header_pattern by default If missing, uses header_pattern to construct unique IDs. |
seq_col |
Name of the column that contains the sequence windows. |
header_pattern |
Pattern for use in |
Returns the input data with new headers included as fasta_id, invisibly.
kinsub_path <- system.file('extdata', 'kinase_substrate_dataset_head', package = 'phosphocie') kinsub <- read_kinsub(kinsub_path) tmp <- tempfile() build_fastas(kinsub, tmp, name_col = 'unique_id', seq_col = 'fragment_15') build_fastas(kinsub, tmp, seq_col = 'fragment_15', header_pattern = '{acc_id}|{gene}|{substrate}|{residue}{position}')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.