Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: dlptools
Title: DLPTools: Handling DLP+ Data
Version: 0.3.17
Version: 0.3.18
Authors@R:
person("Ben", "Furman", , "bfurman@bccrc.ca", role = c("aut", "cre"))
Description: A collections of functions for basic manipulation and plotting of
Expand Down
10 changes: 10 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ export("%>%")
export(ASCN_COLORS)
export(ASCN_PHASE_COLORS)
export(BAF_COLORS)
export(BASE_PLOT_THEME)
export(CNV_COLOURS)
export(DEFAULT_CONTINUOUS_COLOR_RANGE)
export(GEN_PLOT_COLS)
export(RAW_COPY_COLORS)
export(STATE_COLORS)
export(add_centromere_locations)
export(add_missing_bins_for_cells)
export(add_telomere_positions)
export(add_tip_ancestors_to_df)
export(basic_tile_plot)
export(cell_cn_profile)
Expand All @@ -22,7 +25,10 @@ export(compute_tip_sibling_distances)
export(convert_dists_to_pairwise)
export(convert_long_reads_to_wide)
export(create_expected_bins)
export(cust_mode)
export(expand_length_to_bins)
export(extract_ploidy_cn_feature)
export(extract_segment_position_feature)
export(extract_sigminer_wang_features)
export(extract_wu_features)
export(factor_column_mixedsort)
Expand All @@ -41,6 +47,7 @@ export(get_tips_that_avoid_redundant_comps)
export(import_annotations_df)
export(import_clones)
export(import_dlp_files)
export(import_telos_file)
export(import_tree)
export(library_from_cell)
export(load_chrom_info_file)
Expand All @@ -51,8 +58,11 @@ export(make_corrupt_tree_heatmap)
export(make_tree_plot_obj)
export(map_states_to_letters)
export(mark_bins_overlapping_centromeres)
export(mark_cn_relative_to_ploidy)
export(mark_mask_regions)
export(mark_segs_chromosome_span)
export(medicc_profiles_to_foreground)
export(mode_ploidy)
export(pairwise_bin_difference)
export(plot_bg_state_highlight)
export(plot_fg_state_highlight)
Expand Down
30 changes: 1 addition & 29 deletions R/bin_filling.R
Original file line number Diff line number Diff line change
@@ -1,31 +1,3 @@
#' loading UCSC chromosome length files
#' @param version default "hg19", can also load "hg38"
#' @return tibgble of chromosome, total length, etc.
#' @export
load_chrom_info_file <- function(version = c("hg19", "hg38")) {
version <- match.arg(version)

chrom_files <- list(
hg19 = "hg19_chromInfo.txt.gz",
hg38 = "hg19_chromInfo.txt.gz"
)

chrom_info <- get_package_file_path(chrom_files[version]) |>
vroom::vroom(
col_names = c("chr", "total_length", "misc"),
show_col_types = FALSE
) |>
dplyr::filter(
# remove the unnecessary chromosomes
stringr::str_detect(chr, "_|M", negate = TRUE)
) |>
dplyr::mutate(
chr = stringr::str_replace(chr, "chr", "")
)

return(chrom_info)
}

#' For a given length, create bins of a given size
#'
#' e.g., length = 10, bin = 5, will get bins: 1-5, 6-10
Expand Down Expand Up @@ -128,7 +100,7 @@ add_missing_bins_for_cells <- function(
#' other states to fill in.
#'
#' @param state_df dataframe of state data with NAs for some bins that need
#' to be filled in. E.g., after dlptools::running add_missing_bins_for_cells()
#' to be filled in. E.g., after dlptools::add_missing_bins_for_cells()
#' @export
#' @importFrom rlang .data
fill_state_from_neighbours <- function(state_df, cols_to_fill = c("state")) {
Expand Down
136 changes: 0 additions & 136 deletions R/centromere_marking.R

This file was deleted.

Loading
Loading