reformat_fusion: Enables users to reformat fusions files so that each fusion...

View source: R/reformat_fusion.R

reformat_fusionR Documentation

Enables users to reformat fusions files so that each fusion is listed as one row with two hugo-symbol sites instead of two rows, one for each site. This is the required format for the create_gene_binary function.

Description

Enables users to reformat fusions files so that each fusion is listed as one row with two hugo-symbol sites instead of two rows, one for each site. This is the required format for the create_gene_binary function.

Usage

reformat_fusion(fusions)

Arguments

fusions

a data frame of fusion/structural variants that occur in a cohort. There should be a sample_id, hugo_symbol, and fusion column at minimum. Intragenic/intergenic fusions will have one row. Any two gene fusions will have two rows. See gnomeR::sv_long for an example.

Value

a data frame with sample_id, site1hugo_symbol, and site2hugo_symbol and fusion columns. This should match the format of the gnomeR::sv dataset.

Examples


sv_long1 <- gnomeR::sv_long %>%
  rename_columns() %>%
  reformat_fusion()

head(sv_long1)


AxelitoMartin/gnomeR documentation built on March 23, 2024, 3:07 a.m.