Learn R Programming

ctDNAtools (version 0.4.0)

get_mutations_read_names: Gets names of the reads showing reference and alternative allele of a list of mutations

Description

This function extracts the names of the reads in a bam file that support the variant and reference alleles of the input mutations

Usage

get_mutations_read_names(bam, mutations, min_base_quality = 20,
  tag = "", min_mapq = 30)

Arguments

bam

path to bam file

mutations

A data frame containing the mutations. Must have the columns CHROM, POS, REF, ALT.

min_base_quality

integer specifying the minimum base quality for reads to be included.

tag

the RG tag if the bam has more than one sample

min_mapq

integer specifying the minimum mapping quality for reads to be included

Value

A list with length equal to the number of mutations. Each element is a character vector with the read names.

Details

Returns the IDs of the read that cover the input mutations (ref and alt alleles).

See Also

get_mutations_read_counts get_mutations_fragment_size test_ctDNA

Examples

Run this code
# NOT RUN {
data("mutations", package = "ctDNAtools")
bamT1 <- system.file("extdata", "T1.bam", package = "ctDNAtools")
get_mutations_read_names(bam = bamT1, mutations = mutations[1:3, ])
# }

Run the code above in your browser using DataLab