Skip to content

Commit

Permalink
Depends -> Imports
Browse files Browse the repository at this point in the history
  • Loading branch information
grst committed Mar 11, 2024
1 parent 7c9503a commit 6ae3f7f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ Description: This package provides convenience functions for reading real-world
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
Depends:
Imports:
dplyr
SummarizedExperiment,
readxl,
MultiAssayExperiment,
tibble,
pbapply,
tidyr,
purrr,
dplyr,
BumpyMatrix,
rvest,
stringr,
Expand Down
7 changes: 6 additions & 1 deletion R/personalis.R
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,12 @@ read_personalis_variant_calling_summary_statistics <- function(sample_folder, mo
}

#' Read in (unfiltered) small variant data from VCF files from personalis folders
#' @param sample_list A vector of paths to personalis folders
#' @param sample_paths A vector of paths to personalis folders
#' @param sample_type Can be one or multiple of of 'tumor', 'normal', or 'somatic'.
#' 'tumor' refers to tumor sample vs. genome reference (i.e. somatic+germline mutations),
#' 'normal' refers to normal sample vs. genome reference (i.e. germline mutations) and
#' 'somatic' refers to tumor vs. normal (i.e. somatic mutations only).
#' @param modality modality from which the variants were called. Can be either 'DNA' or 'RNA'
#' @return SummarizedExperiment
#' @export
read_personalis_vcf_files <- function(sample_paths, modality, sample_type) {
Expand Down
2 changes: 2 additions & 0 deletions R/util.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ read_samples <- function(sample_paths, io_func, description, ...) {
#' @param col_data {data.frame} data frame that is used as colData (must have rownames that are sample identifiers!)
#' @param sample_col {character} column in `df` that contains the sample identifier
#' @return {tibble} new data frame with dummy entries added
#' @importFrom tibble as_tibble
#' @keywords internal
add_dummy_entry <- function(df, col_data, sample_col = "sample") {
missing_samples <- setdiff(rownames(col_data), unique(df[[sample_col]]))
Expand All @@ -122,6 +123,7 @@ add_dummy_entry <- function(df, col_data, sample_col = "sample") {
#' @importFrom dplyr mutate left_join
#' @importFrom vcfR read.vcfR vcfR2tidy
#' @importFrom stringr str_split_i
#' @importFrom tibble as_tibble
parse_vcf_to_df <- function(path) {
# parse VCF file
vcf_content <- read.vcfR(path)
Expand Down

0 comments on commit 6ae3f7f

Please sign in to comment.