read_mutations_df: Read and Modify Mutations Data Frame

View source: R/read_mutations_df_indels.R

read_mutations_dfR Documentation

Read and Modify Mutations Data Frame

Description

This function processes a data frame containing mutation information. It modifies the 'ref', 'alt', and 'genomic_pos' columns based on certain conditions. Specifically, if the 'ref' field contains more than one character, the function retains only the second character, marks the mutation as a deletion (by setting 'alt' to "D"), and increments the 'genomic_pos' by 1. If the 'alt' field contains more than one character, the mutation is marked as an insertion (by setting 'alt' to "I").

Usage

read_mutations_df(mutations_df)

Arguments

mutations_df

A data frame representing mutations. Each row should contain the fields 'ref', 'alt', and 'genomic_pos'.

Value

A modified data frame with updated mutation information.


JakobPedersenLab/dreams documentation built on Feb. 2, 2024, 3:14 p.m.