View source: R/createDomainPlot.R
addFeatureColors | R Documentation |
Add colors to features/domains of 2 domain dataframes. Users can choose to color only the shared features, unique features, all features (default) or based on feature types. Default color pallete is "Paired", but it can be changed.
addFeatureColors(
seedDf = NULL,
orthoDf = NULL,
colorType = "all",
colorPalette = "Paired",
ignoreInstanceNo = FALSE
)
seedDf |
Domain dataframe of seed protein (protein 1) |
orthoDf |
Domain dataframe of orthologs protein (protein 2) |
colorType |
Choose to color "all", "shared", "unique" features or color by "Feature type". Default: "all" |
colorPalette |
Choose between "Paired", "Set1", "Set2", "Set3", "Accent", "Dark2" for the color pallete |
ignoreInstanceNo |
Ignore number of feature instances while identifying shared or unique features. Default: FALSE |
2 dataframes (seedDf and orthoDf) with an additional column for the assigned color to each feature instance
Vinh Tran tran@bio.uni-frankfurt.de
# get domain data
seedID <- "101621at6656"
domainFile <- system.file(
"extdata", "domainFiles/101621at6656.domains",
package = "PhyloProfile", mustWork = TRUE
)
domainDf <- parseDomainInput(seedID, domainFile, "file")
# get seedDf and orthoDf
subDf <- domainDf[
domainDf$seedID ==
"101621at6656#101621at6656:AGRPL@224129@0:224129_0:001955:1",]
orthoDf <- subDf[subDf$orthoID == "101621at6656:DROME@7227@1:Q9VG04",]
seedDf <- subDf[subDf$orthoID != "101621at6656:DROME@7227@1:Q9VG04",]
# add colors to features
PhyloProfile:::addFeatureColors(seedDf, orthoDf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.