Learn R Programming

SanzCircos (version 0.1.0)

write_circos_histogram: write_circos_histogram

Description

A function that takes a data.frame, and creates a histogram.txt file for input into circos

Usage

write_circos_histogram(df, chromosome_grouping, start_position, end_position,
  values, file_name = "histogram.txt", file_path = NULL)

Arguments

df

A database to draw Circos data from

chromosome_grouping

A column defining the circos chromosomes. Passed as column index or "column name"

start_position

A column defining the start positions of the desired value

end_position

A column defining the end positions of the desired value

values

The value to be plotted

file_name

The desired file name. Defaults to histogram.txt

file_path

The desired file path destination folder. Defaults to NULL

Value

Writes a Circos-compatible histogram file to the desired directory

Examples

Run this code
# NOT RUN {
df <- data.frame(chrom = c(1,1,2,2), start = c(1, 5, 1, 8),
end = c(5, 10, 8, 13), plotting_value = c(5, 78, 9, 2))

write_circos_histogram(df = df, chromosome_grouping = "chrom",
start_position = "start", end_position = "end",
value = "plotting_value", file_name = "histogram.txt", file_path = tempdir())

# }

Run the code above in your browser using DataLab