augment_with_maf | R Documentation |
This function imports Mutation Annotation Formats (MAF) data into a CNAqc object, or to a mutations dataframe in the format ready for CNAqc. Therefore the expected uses are
"[Option 1]"Mutations + CNA + Purity -> CNAqc -> MAF annotation
"[Option 2]"Mutations -> MAF annotation -> Mutations (with MAF) + CNA + Purity -> CNAqc
MAF annotations should have been created using the vcf2maf utility. At this point, if one has created the input data for CNAqc from the original VCF file, the MAF can be added to the CNAqc object (Option 1), or to the available mutations before creating the CNAqc obejct (Option 2).
Mutations are associated based on genome locations and substitutions. Since MAFs tend to use some different convention for genome location (especially for indels), mutations are matched by closes genomic coordinates.
Note that if one has many CNAqc objects with their MAF annotations, a cohort of MAFs can be exported and functions from Bioconductor package maftools can be used to plot data from multiple patients.
augment_with_maf(x, maf)
x |
A CNAqc object, or a dataframe of mutations in the input format for CNAqc. |
maf |
The file MAF associated containing the annotations in MAF format. |
It depends on 'x'
"[Option 1]" A CNAqc object like 'x' where the mutations are associated to the MAF annotations, if 'x' is a CNAqc object. In this case the S3 print method for 'x' will report the presence of MAF annotations.
"[Option 2]" If 'x' is a dataframe, the same dataframe augmented with MAF annotations.
function as_maftools_cohort
to convert multiple CNAqc
objects with MAF annotations into a single MAF cohort; package
maftools
to summarize, analyze and visualize MAF Files; the utility
vcf2maf to create MAF files from VCFs,
using the
Ensembl Variant Effect Predictor (VEP)
utility.
# Example with a CNAqc input object
if(FALSE)
{
# Create your CNAqc object (omissis here) from an original "file.vcf"
x = init(mutations = ..., cna = ..., purity = ...)
# Offline, create your MAF annotations as file "file_vcf.maf" from "file.vcf"
# vcf2maf file.vcf .... file_vcf.maf
# Import into R/CNAqc
x = augment_with_maf(x, maf = "file_vcf.maf")
# check they are in (there should be many columns with "MAF." prefix)
x %>% Mutations %>% colnames
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.