create_dnaseqs: Create a dnaseqs list of dataframes for genoplotR

View source: R/genoplotR_extensions.R

create_dnaseqsR Documentation

Create a dnaseqs list of dataframes for genoplotR

Description

Create a dnaseqs list of dataframes for genoplotR. Uses a gggenes dataframe outputted from micro.gen.extra::gggenes_df_from_gff_dir(). Colours for genes can be set.

Usage

create_dnaseqs(
  gggenes_df,
  set_gene_fill_colours = FALSE,
  gene_colours = "random",
  gene_rarity = 1,
  clean_up_files = TRUE
)

Arguments

gggenes_df

dataframe created from micro.gen.extra::gggenes_df_from_gff_dir()

set_gene_fill_colours

TRUE/FALSE as to whether genes should be coloured. If TRUE, the variable name for the colour must be stored in a column called 'colour_variable' in the gggenes_df [Default = FALSE]

gene_colours

Provide a named vector of hexadecimal colours, where names correspond to the values in gggenes_df$colour_variable [Default = FALSE]

gene_rarity

Minimum gene frequency across entire dataframe required to colour the gene, provided as an integer (all genes lower than this frequency will be coloured white) [Default = 1]

clean_up_files

TRUE/FALSE as to whether intermediate working files are removed [Default = TRUE]

Value

A dnaseqs list of dataframes for genoplotR

Examples

#Basic:
create_dnaseqs(input_gggenes_df)

#More advanced:
create_dnaseqs(input_gggenes_df, TRUE, provided_colours_vector, 5, FALSE)

#This will create a dnaseqs list of dataframes where any genes found at least five times across the dataset
#will be coloured according the colouring scheme set in "provided_colours_vector". Files created during the
#process of the function will be kept.


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