-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Michael Piechotta
committed
Oct 12, 2020
1 parent
e047091
commit bf7e574
Showing
127 changed files
with
1,167 additions
and
3,541 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,25 @@ | ||
# Generated by roxygen2: do not edit by hand | ||
|
||
export(All) | ||
export(Any) | ||
export(add_arrest_rate) | ||
export(add_bc) | ||
export(add_bc_ratio) | ||
export(add_cov) | ||
export(add_non_ref_ratio) | ||
export(add_sub) | ||
export(add_sub_ratio) | ||
export(arrest_col) | ||
export(apply_cond) | ||
export(apply_repl) | ||
export(arrest_rate) | ||
export(arrest_rate_col) | ||
export(base_call) | ||
export(base_call_non_ref) | ||
export(base_count) | ||
export(base_sub) | ||
export(bc_col) | ||
export(bc_ratio) | ||
export(bc_ratio_col) | ||
export(clean_read_sub) | ||
export(copy_attr) | ||
export(cov_col) | ||
export(coverage) | ||
export(extract_ref) | ||
export(filter_all_artefacts) | ||
export(filter_artefact) | ||
export(filter_by) | ||
export(filter_by_max_score) | ||
export(filter_by_min_score) | ||
export(filter_by_robust_arrest_events) | ||
export(filter_by_robust_variants) | ||
export(get_arrest_rate) | ||
export(get_bc) | ||
export(get_bc_ratio) | ||
export(get_cov) | ||
export(get_non_ref_ratio) | ||
export(get_sub) | ||
export(get_sub_ratio) | ||
export(group_by_site) | ||
export(mask_sub) | ||
export(merge_sub) | ||
export(non_ref_ratio) | ||
export(non_ref_ratio_col) | ||
export(peak) | ||
export(plot_ecdf_allele_count) | ||
export(plot_ecdf_column) | ||
export(plot_pairs_matrix) | ||
export(read_result) | ||
export(read_results) | ||
export(redefine_ref) | ||
export(robust_arrest_events) | ||
export(sub_col) | ||
export(robust) | ||
export(sub_ratio) | ||
export(sub_ratio_col) | ||
export(through_col) | ||
export(write_bedGraph) | ||
importFrom(magrittr,"%>%") | ||
importFrom(rlang,syms) | ||
importFrom(tibble,add_column) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#' Calculates reference base to base call (base substitution). | ||
#' | ||
#' Calculates and formats base changes for \code{ref} and \code{bc}. | ||
#' All elements in \code{ref} must be all length 1. | ||
#' | ||
#' @param ref vector of reference bases. | ||
#' @param bc vector of base calls. | ||
#' @return vector of formatted base call substitutions. | ||
#' @examples | ||
#' ref <- c("A", "A", "C", "A") | ||
#' bc <- c("AG", "G", "C", "G") | ||
#' base_sub(ref, bc) | ||
#' @export | ||
base_sub <- function(ref, bc) { | ||
if (all(nchar(ref) != 1)) { | ||
stop("All ref elements must be nchar() == 1") | ||
} | ||
|
||
# remove ref in bc | ||
# goal: A->G instead of A->AG | ||
bc <- mapply(function(r, o) { | ||
return(gsub(r, "", o)) | ||
}, ref, bc) | ||
|
||
# add nice separator | ||
sub <- paste(ref, sep = .SUB_SEP, bc) | ||
# add nice info when there is no change | ||
sub[ref == bc | bc == ""] <- .SUB_NO_CHANGE | ||
|
||
sub | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.