createArchiPlot: Create protein's domain architecure plot

View source: R/createDomainPlot.R

createArchiPlotR Documentation

Create protein's domain architecure plot

Description

Create architecture plot for both seed and orthologous protein. If domains of ortholog are missing, only architecture of seed protein will be plotted. NOTE: seed protein ID is the one being shown in the profile plot, which normally is also the orthologous group ID.

Usage

createArchiPlot(info, domainDf, labelArchiSize, titleArchiSize,
    showScore, showWeight, namePosition, firstDist, nameType, nameSize,
    segmentSize, nameColor, labelPos, colorType, ignoreInstanceNo,
    currentNCBIinfo, featureClassSort, featureClassOrder, colorPalette,
    resolveOverlap, font)

Arguments

info

A list contains seed and ortholog's IDs

domainDf

Dataframe contains domain info for the seed and ortholog. This including the seed ID, orthologs IDs, sequence lengths, feature names, start and end positions, feature weights (optional) and the status to determine if that feature is important for comparison the architecture between 2 proteins* (e.g. seed protein vs ortholog) (optional).

labelArchiSize

Lable size (in px). Default = 12.

titleArchiSize

Title size (in px). Default = 12.

showScore

Show/hide E-values and Bit-scores. Default = NULL (hide)

showWeight

Show/hide feature weights. Default = NULL (hide)

namePosition

list of positions for domain names, choose from "plot", "legend" or "axis". Default: "plot"

firstDist

Distance of the first domain to plot title. Default = 0.5

nameType

Type of domain names, either "Texts" or "Labels" (default)

nameSize

Size of domain names. Default = 3

segmentSize

Height of domain segment. Default = 5

nameColor

Color of domain names (for Texts only). Default = "black"

labelPos

Position of domain names (for Labels only). Choose from

colorType

Choose to color "all", "shared", "unique" features or color by "Feature type". Default = "all"

ignoreInstanceNo

Ignore number of feature instances while identifying shared or unique features. Default = FALSE

currentNCBIinfo

Dataframe of the pre-processed NCBI taxonomy data. Default = NULL (will be automatically retrieved from PhyloProfile app)

featureClassSort

Choose to sort features. Default = "Yes"

featureClassOrder

vector of ordered feature classes

colorPalette

Choose between "Paired", "Set1", "Set2", "Set3", "Accent", "Dark2" for the color pallete

resolveOverlap

Choose to merge non-overlapped features of a feature type into one line. Default = "Yes"

font

font of text. Default = Arial"

Value

A domain plot as arrangeGrob object. Use grid::grid.draw(plot) to render.

Author(s)

Vinh Tran tran@bio.uni-frankfurt.de

See Also

singleDomainPlotting,pairDomainPlotting, sortDomains, parseDomainInput

Examples

seedID <- "101621at6656"
orthoID <- "101621at6656|AGRPL@224129@0|224129_0:001955|1"
info <- c(seedID, orthoID)
domainFile <- system.file(
    "extdata", "domainFiles/101621at6656.domains",
    package = "PhyloProfile", mustWork = TRUE
)
domainDf <- parseDomainInput(seedID, domainFile, "file")
domainDf$feature_id_mod <- domainDf$feature_id
domainDf$feature_id_mod <- gsub("SINGLE", "LCR", domainDf$feature_id_mod)
domainDf$feature_id_mod[domainDf$feature_type == "coils"] <- "Coils"
domainDf$feature_id_mod[domainDf$feature_type == "seg"] <- "LCR"
domainDf$feature_id_mod[domainDf$feature_type == "tmhmm"] <- "TM"
plot <- createArchiPlot(info, domainDf, font = "sans")
grid::grid.draw(plot)

BIONF/PhyloProfile documentation built on Nov. 7, 2024, 8:31 p.m.