Write bedpe format data frame to a file that will work with IGV and UCSC genome browser.

sv_to_bedpe_file(
  sv_df,
  path = "/projects/rmorin/projects/gambl-repos/gambl-rmorin/results/icgc_dart/misc/",
  filename = "my_svs.bedpe",
  add_chr_prefix = TRUE
)

Arguments

sv_df

data frame of bedpe formatted SV data.

path

The path to the output folder. Default is "/projects/rmorin/projects/gambl-repos/gambl-rmorin/results/icgc_dart/misc/".

filename

File name (will be written to results/icgc_dart/misc/FILENAME).

add_chr_prefix

Whether to force chr to be added to chromosome names. Default is TRUE.

Value

bedpe data frame that is compatible with IGN browser.

Details

This function takes four parameters; a data frame with SVs, formatted as bedpe with sv_df. The path parameter lets the user control the output folder. The default is "/projects/rmorin/projects/gambl-repos/gambl-rmorin/results/icgc_dart/misc/". file_name for specifying the output file name. Results will be written to results/icgc_dart/misc/. Lastly, the add_chr_prefix lets the user control if chromosomes should be prefixed with "chr" or not. The default is TRUE.

Examples

if (FALSE) {
SVs_bedpe = sv_to_bedpe_file(sv_df = sv_dataframe,
                             filename = "SVs.bedpe",
                             add_chr_prefix = TRUE)
}