graph_from_aas: Create a plot showing membrane locations of each protein...

View source: R/graph_from_aas.R

graph_from_aasR Documentation

Create a plot showing membrane locations of each protein based on user provided amino acid sequences

Description

This function creates a ggplot figure showing the differences in membrane location and length between primary and alternative transcripts from the same gene. This process is performed based on input data containing the gene names and amino acid sequences of the proteins in question. Transcripts derived from the same gene are grouped together to facilitate easy interpretation. The y axis lists the gene name and transcript ID for each transcript and the x axis lists the length in amino acids. Each fill color corresponds to a membrane location and either principal or alternative isoform.

Usage

graph_from_aas(data_file, organism = "human", rank = "length",
n_prts = 20, mode = "phobius", size_txt = 2, space_left = -400, temp = FALSE,
tmhmm_folder_name = NULL)

Arguments

data_file

Path to the input file

organism

String indicating if the transcripts are from a human or a mouse

rank

String indicating which method to use to rank proteins in graphical output. Options include "Length", "TM", and "Combo".

n_prts

Integer value indicating the number of genes that should be displayed on the graphical output. Default value is 20.

mode

String detailing whether TMHMM or Phobius should be used to predict transmembrane regions. Input values include "phobius" or "tmhmm".

size_txt

Integer value specifying the size of the row labels. Default size is 2.

space_left

Integer value specifying how far left the graph should extend.

temp

Boolean indicating if the fasta file should be deleted after the function finishes running or not. Recommended to always be set to FALSE.

tmhmm_folder_name

Full path to folder containing installed TMHMM 2.0 software. This value should end in TMHMM2.0c and needs to be provided if the mode used is TMHMM.

Value

A ggplot figure showing the protein locations for each part of the surface protein for each alternative and primary transcripts.

Examples

tmhmm_folder_name <- "~/TMHMM2.0c"
if (check_tmhmm_install(tmhmm_folder_name)) {
    graph_from_aas(
        system.file("extdata", "crb1_example.csv", package = "surfaltr"),
        "mouse", "combo", 1, "tmhmm", 4, -300, TRUE
    )
}

EliLillyCo/surfaltr documentation built on May 3, 2022, 10:12 a.m.