get_mutations_read_names: Gets names of the reads showing reference and alternative...

Description Usage Arguments Details Value See Also Examples

View source: R/get_mutations_read_names.R

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

1
2
3
4
5
6
7
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

Details

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

Value

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

See Also

get_mutations_read_counts get_mutations_fragment_size test_ctDNA

Examples

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

alkodsi/ctDNAtools documentation built on Feb. 22, 2022, 9:40 a.m.