Skip to content

Commit

Permalink
Fix CRAN note
Browse files Browse the repository at this point in the history
  • Loading branch information
ShixiangWang committed Jan 8, 2021
1 parent 719ddf9 commit 9a580ca
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CRAN-RELEASE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This package was submitted to CRAN on 2021-01-08.
Once it is accepted, delete this file and tag the release (commit c5a40bb).
Once it is accepted, delete this file and tag the release (commit 719ddf9).
2 changes: 1 addition & 1 deletion R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ NULL

#' A List of Simulated SBS-96 Catalog Matrix
#'
#' Data from <https://doi.org/10.1038/s43018-020-0027-5>.
#' Data from \doi{10.1038/s43018-020-0027-5}.
#' 5 simulated mutation catalogs are used by the paper but only 4 are available.
#' The data are simulated from COSMIC mutational signatures 1, 2, 3, 5, 6, 8,
#' 12, 13, 17 and 18. Each sample is a linear combination of 5 randomly selected
Expand Down
23 changes: 15 additions & 8 deletions R/read_vcf.R
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ read_vcf <- function(vcfs, samples = NULL, genome_build = c("hg19", "hg38"), kee
#' @export
#'
#' @examples
#' \donttest{
#' if (requireNamespace("UCSCXenaTools")) {
#' library(UCSCXenaTools)
#' options(use_hiplot = TRUE)
Expand All @@ -119,6 +120,7 @@ read_vcf <- function(vcfs, samples = NULL, genome_build = c("hg19", "hg38"), kee
#' y <- sig_tally(x)
#' y
#' }
#' }
#' @testexamples
#' if (requireNamespace("UCSCXenaTools")) {
#' expect_is(y, "list")
Expand All @@ -132,14 +134,19 @@ read_xena_variants <- function(path) {

data.table::setnames(
dt,
old = c(detect_name("Sample_ID", "sample", colnames(dt)),
"gene",
detect_name("chrom", "chr", colnames(dt)),
"start", "end",
detect_name("ref", "reference", colnames(dt)),
"alt"),
new = c("Tumor_Sample_Barcode", "Hugo_Symbol", "Chromosome",
"Start_Position", "End_Position", "Reference_Allele", "Tumor_Seq_Allele2"))
old = c(
detect_name("Sample_ID", "sample", colnames(dt)),
"gene",
detect_name("chrom", "chr", colnames(dt)),
"start", "end",
detect_name("ref", "reference", colnames(dt)),
"alt"
),
new = c(
"Tumor_Sample_Barcode", "Hugo_Symbol", "Chromosome",
"Start_Position", "End_Position", "Reference_Allele", "Tumor_Seq_Allele2"
)
)

dt$Variant_Type <- dplyr::case_when(
nchar(dt$Reference_Allele) == 1L & nchar(dt$Tumor_Seq_Allele2) == 1L ~ "SNP",
Expand Down
2 changes: 1 addition & 1 deletion R/scoring.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#' - sTDP_size: sTDP region size (Mb).
#' - lTDP_size: lTDP region size(Mb).
#' - Chromoth_state: chromothripsis state score,
#' according to reference <http://dx.doi.org/10.1016/j.cell.2013.02.023>,
#' according to reference \doi{10.1016/j.cell.2013.02.023},
#' chromothripsis frequently leads to massive loss of segments on
#' the affected chromosome with segmental losses being interspersed with regions displaying
#' normal (disomic) copy-number (e.g., copy-number states oscillating between
Expand Down
2 changes: 2 additions & 0 deletions man/read_xena_variants.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/scoring.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/simulated_catalogs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion tests/testthat/test-roxytest-testexamples-read_vcf.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

context("File R/read_vcf.R: @testexamples")

test_that("Function read_xena_variants() @ L126", {
test_that("Function read_xena_variants() @ L128", {


if (requireNamespace("UCSCXenaTools")) {
library(UCSCXenaTools)
Expand All @@ -15,6 +16,7 @@ test_that("Function read_xena_variants() @ L126", {
y <- sig_tally(x)
y
}

if (requireNamespace("UCSCXenaTools")) {
expect_is(y, "list")
}
Expand Down

0 comments on commit 9a580ca

Please sign in to comment.