Learn R Programming

ORscraper (version 0.1.0)

extract_fusions: Extract fusion variants from text

Description

This function identifies and extracts fusion variants from text lines based on specific patterns.

Usage

extract_fusions(lines, mutations)

Value

A list of fusion variants identified in the text.

Arguments

lines

Character vector. Lines of text to search for fusion variants.

mutations

Character vector. List of mutations to look for.

Examples

Run this code
InputPath <- system.file("extdata", package = "ORscraper")
files <- read_pdf_files(InputPath)
lines <- read_pdf_content(files[1])  # Example with the first file

genes_file <- system.file("extdata/Genes.xlsx", package = "ORscraper")
genes <- readxl::read_excel(genes_file)
mutations <- unique(genes$GEN)

fusions <- extract_fusions(lines, mutations)

Run the code above in your browser using DataLab