R/get_mutations_fragment_size.R
get_mutations_fragment_size.Rd
The function extracts the fragment lengths for the reads holding alternative allele for each mutation in the mutations data frame.
get_mutations_fragment_size(bam, mutations, tag = "", min_base_quality = 20, min_mapq = 30, ...)
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. |
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
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.
get_fragment_size
# \donttest{ data("mutations", package = "ctDNAtools") bamT1 <- system.file("extdata", "T1.bam", package = "ctDNAtools") mfs <- get_mutations_fragment_size(bam = bamT1, mutations = mutations[1:2, ]) # }