align_sequences: Align sequences

View source: R/ch_functions.R

align_sequencesR Documentation

Align sequences

Description

Visualize how sequences align to a full length protein (exact matches).

Usage

align_sequences(
  inputfile,
  shouldpdf = TRUE,
  outputfile = "SequenceAlignment.pdf",
  gene = NULL,
  uniprot = NULL,
  writesequence = TRUE,
  shouldtextplot = FALSE,
  textplotcolumns = NULL
)

Arguments

inputfile

file with sequence information, see Details for needed formatting and columns.

shouldpdf

Logical, should it plot to pdf?

outputfile

filename for the output file.

gene

string with genename (or other name-identifier) for the alignment.

uniprot

string with Uniprot ID for the alignment.

writesequence

logical, should aa sequences for peptides be stated on the right axis?

shouldtextplot

logical, should a table with sequence info be plotted below the alignment?

textplotcolumns

columns to include if printing a table below the alignment.

Details

NB! The sequences have to be identical matches to consequtive stretches in the full length sequence you are aligning to.

The input file needs to be tab-delimited, have one row per peptide/protein and the columns
- Name (identifier to be written above the sequence)
- Type ("Full_length" for sequence to align against, "Peptide" for peptides (sequence will be printed on the side), any other label can be used but will not be considered in the function) - Sequence1 (1 in column name also if only one sequence per row)
- Sequence2 (only if mosaic, not necessary if only one sequence per row)
- Color (color for the sequence bar)
- Include (values 1 or 0, which sequences in input file should be included in plot?)

If printing table underneath extra columns may be needed in the input file depending on what information you want to print.

Note: The function plots to a layout containing up to two areas.


cekehe/rappp documentation built on May 17, 2022, 8:54 a.m.