Description Usage Arguments Value Examples
View source: R/get_flagged_alleles.R
Flag alleles that are present in too many samples at high variant allele frequencies as potential errors.
1 2 3 4 5 6 7 8 9 10 | get_flagged_alleles(
sample_names,
sample_paths,
genome,
recurrent_mutations = NA,
memory_saving = FALSE,
starting_percentile = 99,
interval = 0.001,
MAPQcutoff = 59
)
|
sample_names |
Character vector with the names of the samples |
sample_paths |
Character vector with the paths of the samples |
recurrent_mutations |
|
memory_saving |
Logical. Option to save memory if you have a lot of samples (e.g. >500 with a 16Gb RAM machine), but takes twice as long |
starting_percentile |
Lower VAF percentile to start looking for alleles to flag. Default is 99, but can use 95 if you want to flag more alleles (more conservative) |
interval |
VAF interval to iterate through for flagging alleles. Default is 0.001 |
MAPQcutoff |
Minimum acceptable MAPQ score; positions below this cutoff will be excluded. Default is 59 |
This function returns a VRanges
object with the following information:
seqnames
ranges
ref
alt
refdepth
altdepth
sampleNames
metadata (optional)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
# get list of file names
file_names <- list.files(path = "./data/", pattern = "sample")
hemeCOSMIC_3 <- load_recurrent_mutations("example_data/COSMIC_heme_freq3.txt", genome = "hg19")
# sample names are first 10 characters of file name
all_sample_names <- substr(file_names, 1, 10)
# file paths are dir/file_name
all_sample_paths <- paste0("./data/", file_names)
# get flagged alleles
flagged_alleles <- get_flagged_alleles(all_sample_names, all_sample_paths,
recurrent_mutations = hemeCOSMIC_3, memory_saving = FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.