Make a UCSC-ready custom track file from SV data.

sv_to_custom_track(sv_bedpe, output_file, is_annotated = TRUE, sv_name = "all")

Arguments

sv_bedpe

A bedpe formatted data frame of SVs.

output_file

A bed file with UCSC custom header.

is_annotated

Set to TRUE if input SV bedpe is annotated, default is TRUE.

sv_name

SV name. Default is set to "all" = include all subtypes of SVs.

Value

Nothing.

Details

This function takes an incoming SV data frame and outputs a bed file, ready for visualization on the UCSC Genome Browser. Specify the output file with output_file, indicate if the incoming SVs are annotated with is_annotated (default is TRUE). Lastly, the user can also specify if the incoming SV data frame should be subset to specific mutation types (e.g deletions, duplications, insertions, etc.). This is specified with the sv_name parameter. Default is to include all SV subtypes.

Examples

if (FALSE) {
#custom track with annotations
all_sv = get_manta_sv(verbose = FALSE)
annotated_sv = annotate_sv(sv_data = all_sv)
sv_to_custom_track(annotated_sv,
                   output_file = "GAMBL_sv_custom_track_annotated.bed",
                   is_annotated = TRUE)

#custom track (no anotatated SVs)
sv_to_custom_track(all_sv,
                   output_file = "GAMBL_sv_custom_track_annotated.bed",
                   is_annotated = FALSE)
}