get_mutations_fragment_size: Gets reads fragment lengths for a list of mutations

Description Usage Arguments Details Value See Also Examples

View source: R/get_mutations_fragment_size.R

Description

The function extracts the fragment lengths for the reads holding alternative allele for each mutation in the mutations data frame.

Usage

1
2
get_mutations_fragment_size(bam, mutations, tag = "",
  min_base_quality = 20, min_mapq = 30, ...)

Arguments

bam

path to bam file.

mutations

Data frame with mutations. Must have the columns CHROM, POS, REF, ALT.

tag

the RG tag if the bam has more than one sample.

min_base_quality

minimum base quality when extracting reads covering mutations.

min_mapq

minimum mapping quality when extracting reads covering mutations.

...

Other parameters passed to get_fragment_size.

Details

Fragment length will extracted from the bam file according to the parameters passed to get_fragment_size, and the fragment size of the reads that map to the ref and alt alleles of each mutation in the input will be returned.

Value

A list with length equal to the number of mutations. Each element contains a list with two elements ref and alt each having an integer vector of fragment lengths

See Also

get_fragment_size

Examples

1
2
3
4
data("mutations", package = "ctDNAtools")
bamT1 <- system.file("extdata", "T1.bam", package = "ctDNAtools")

mfs <- get_mutations_fragment_size(bam = bamT1, mutations = mutations[1:2, ])

ctDNAtools documentation built on March 26, 2020, 7:39 p.m.