Compute the per-base error measure (pbem) for each targeted locus and save allelic (AF) by bins of coverage.
compute_pbem(sample.info.file, targetbed, pacbamfolder_bychrom, outdir,
outdir.bperr.name = "BaseErrorModel", coverage_binning = 50,
af_max_to_compute_thresholds = 0.2,
coverage_min_to_compute_thresholds = 10,
af_max_to_compute_pbem = 0.2, coverage_min_to_compute_pbem = 10,
n_pos_af_th = 0.2, mc.cores = 1, step = 5000)
The sample info file listing CASE and CONTROL samples. The format is simply 5 columns, tab-delimited, and there is no column header.
Genomic regions in the BED tab-delimited format.
The folder popluted by outputs by the split_pacbam_bychrom
function.
The folder where outputs will be saved.
The subfolder name that will be created in the outdir
. default: "BaseErrorModel"
Bins of coverage into which divide AFs. default: 50
To compute AF thresholds, consider only positions with AF <= af_max_to_compute_thresholds
. default 0.2
To compute AF threshold, consider only positions with coverage >= coverage_min_to_compute_thresholds
. default 10
To compute pbem, consider only positions with AF <= af_max_to_compute_pbem
. default: 0.2
To compute pbem, consider only positions with coverage >= coverage_min_to_compute_pbem
. default: 10
When compute pbem, count in how many germline samples the position has an AF >= n_pos_af_th
. default: 0.2
Number of jobs to run in parallel, it is the mc.core
param of the mclapply
function. default: 1
Number of positions into split the input chromosome file. default: 5000
The compute_pbem
will write, in the outdir.bperr.name
, tab-delimeted files reporting the per-base error measure of each targeted locus (saved in bperr.tsv
), the coverage and the AF of loci with AF > 0 (saved in afgtz.tsv
) and the coverage of loci with AF = 0 (saved in afz.tsv
).
The function also return objects bgpbem
, bperr_summary
and mean_pbem
reporting overall statistics about the per-base error measure.
# NOT RUN {
sample.info.file <- system.file("extdata", "test_sif_toy.tsv", package = "abemus")
targetbed <- system.file("extdata", "regions_toy.bed", package = "abemus")
pacbamfolder_bychrom <- system.file("extdata", "pacbam_data_bychrom", package = "abemus")
outdir <- tempdir()
outpbem <- compute_pbem(sample.info.file,targetbed,pacbamfolder_bychrom,outdir)
# }
Run the code above in your browser using DataLab