create_upset_dfs: Create UpSetR dataframes from a gene_presence_absence.Rtab...

View source: R/pan_genome_extensions.R

create_upset_dfsR Documentation

Create UpSetR dataframes from a gene_presence_absence.Rtab file

Description

Create UpSetR dataframes from a gene_presence_absence.Rtab file, with the different groups to create the sets being defined by clusters - e.g. phylogroups/lineages calculated by fastANI/PopPUNK/fastbaps etc

Usage

create_upset_dfs(
  gene_presence_absence_file,
  groups,
  levels = c(0, 0.15, 0.95, 1),
  labels = c("Cloud", "Shell", "Core")
)

Arguments

gene_presence_absence_file

gene_presence_absence.Rtab file from Roary or Panaroo

groups

Dataframe of the groups with two columns, one named "strain" listing strain names, and the other named "group" listing the group/lineage etc that each strain belongs to

levels

Levels to define the pan-genome [Default = c(0,0.15,0.95,1)]

labels

Labels for groups created between each of the values in levels. Should be of length : (length(levels) - 1). [Default = c("Cloud","Shell","Core")]

Value

UpsetR dataframe ready for plotting

Examples

create_upset_dfs(gene_presence_absence.Rtab, list_of_groups)

djw533/micro.gen.extra documentation built on Nov. 8, 2024, 5:11 a.m.