writeMutTable: Function that generates a Mutation Table with summarised...

View source: R/internalMutFunctions.R

writeMutTableR Documentation

Function that generates a Mutation Table with summarised cfDNA fragment data

Description

This function processes a GRanges object, summarizing cfDNA fragment information for each target mutation locus. It annotates each locus with the number and type of supporting fragments. Each mismatch type is annotated with the median fragment length. Consensus mismatch is determined by selecting the most frequent mismatch, giving priority to the target mutation's ALT base over other bases. Consensus mismatch is used to derive the trinucleotide substitution (SBS96). The resulting table is written to a .tsv file.

Usage

writeMutTable(frag_obj, output_file)

Arguments

frag_obj

GRanges object containing genomic ranges and associated data.

output_file

Character string specifying the path/name of the output file.

Value

The path to the output file as a character string.

Examples

output_path <- writeMutTable(gr, "output_directory", "output_filename")
print(paste("File written to:", output_path))

hw538/cfDNAPro documentation built on Feb. 17, 2025, 6:09 p.m.