From 617ed6c17b4ac5ea4d5b27d8d5d7c7489a8465b6 Mon Sep 17 00:00:00 2001 From: knausb Date: Wed, 6 Dec 2023 14:23:52 -0800 Subject: [PATCH] changed //' @export to // ' @export for hidden functions --- NAMESPACE | 20 -------------------- R/RcppExports.R | 20 -------------------- README.md | 6 +++--- cran-comments.md | 41 ++++++++++++++++------------------------ src/NM2winNM.cpp | 4 ++-- src/deprecated_funcs.cpp | 2 +- src/extract_gt.cpp | 12 ++++++------ src/gt_to_popsum.cpp | 2 +- src/rank_variants.cpp | 2 +- src/read_vcfR.cpp | 6 +++--- src/seq_to_rects.cpp | 2 +- src/var_window.cpp | 8 ++++---- src/write_vcfR.cpp | 2 +- 13 files changed, 39 insertions(+), 88 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index 0e8ecc06..c39614c3 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,26 +1,6 @@ # Generated by roxygen2: do not edit by hand export("%>%") -export(.CM_to_NM) -export(.NM2winNM) -export(.elementNumber) -export(.extract_GT_to_CM) -export(.extract_haps) -export(.grepa) -export(.gt_to_popsum) -export(.rank_variants) -export(.read_body_gz) -export(.read_meta_gz) -export(.seq_to_rects) -export(.shankaR) -export(.vcf_stats_gz) -export(.window_init) -export(.windowize_NM) -export(.windowize_annotations) -export(.windowize_fasta) -export(.windowize_variants) -export(.write_fasta) -export(.write_vcf_body) export(AD_frequency) export(INFO2df) export(NM2winNM) diff --git a/R/RcppExports.R b/R/RcppExports.R index 14086ff2..466441f8 100644 --- a/R/RcppExports.R +++ b/R/RcppExports.R @@ -1,12 +1,10 @@ # Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 -#' @export .NM2winNM <- function(x, pos, maxbp, winsize = 100L, depr = 1L) { .Call(`_vcfR_NM2winNM`, x, pos, maxbp, winsize, depr) } -#' @export .windowize_NM <- function(x, pos, starts, ends, summary = "mean", depr = 1L) { .Call(`_vcfR_windowize_NM`, x, pos, starts, ends, summary, depr) } @@ -58,37 +56,30 @@ AD_frequency <- function(ad, delim = ",", allele = 1L, sum_type = 0L, decreasing .Call(`_vcfR_AD_frequency`, ad, delim, allele, sum_type, decreasing) } -#' @export .write_fasta <- function(seq, seqname, filename, rowlength = 80L, verbose = 1L, depr = 1L) { invisible(.Call(`_vcfR_write_fasta`, seq, seqname, filename, rowlength, verbose, depr)) } -#' @export .elementNumber <- function(x, element = "GT") { .Call(`_vcfR_elementNumber`, x, element) } -#' @export .extract_GT_to_CM <- function(fix, gt, element = "DP", alleles = 0L, extract = 1L, convertNA = 1L) { .Call(`_vcfR_extract_GT_to_CM`, fix, gt, element, alleles, extract, convertNA) } -#' @export .CM_to_NM <- function(x) { .Call(`_vcfR_CM_to_NM`, x) } -#' @export .extract_haps <- function(ref, alt, gt, unphased_as_NA, verbose) { .Call(`_vcfR_extract_haps`, ref, alt, gt, unphased_as_NA, verbose) } -#' @export .grepa <- function() { invisible(.Call(`_vcfR_grepa`)) } -#' @export .shankaR <- function() { invisible(.Call(`_vcfR_shankaR`)) } @@ -201,7 +192,6 @@ freq_peak <- function(myMat, pos, winsize = 10000L, bin_width = 0.02, lhs = TRUE .Call(`_vcfR_freq_peak`, myMat, pos, winsize, bin_width, lhs) } -#' @export .gt_to_popsum <- function(var_info, gt) { .Call(`_vcfR_gt_to_popsum`, var_info, gt) } @@ -271,52 +261,42 @@ pair_sort <- function() { .Call(`_vcfR_pair_sort`) } -#' @export .rank_variants <- function(variants, ends, score) { .Call(`_vcfR_rank_variants`, variants, ends, score) } -#' @export .vcf_stats_gz <- function(x, nrows = -1L, skip = 0L, verbose = 1L) { .Call(`_vcfR_vcf_stats_gz`, x, nrows, skip, verbose) } -#' @export .read_meta_gz <- function(x, stats, verbose) { .Call(`_vcfR_read_meta_gz`, x, stats, verbose) } -#' @export .read_body_gz <- function(x, stats, nrows = -1L, skip = 0L, cols = 0L, convertNA = 1L, verbose = 1L) { .Call(`_vcfR_read_body_gz`, x, stats, nrows, skip, cols, convertNA, verbose) } -#' @export .seq_to_rects <- function(seq, targets) { .Call(`_vcfR_seq_to_rects`, seq, targets) } -#' @export .window_init <- function(window_size, max_bp) { .Call(`_vcfR_window_init`, window_size, max_bp) } -#' @export .windowize_fasta <- function(wins, seq) { .Call(`_vcfR_windowize_fasta`, wins, seq) } -#' @export .windowize_variants <- function(windows, variants) { .Call(`_vcfR_windowize_variants`, windows, variants) } -#' @export .windowize_annotations <- function(wins, ann_starts, ann_ends, chrom_length) { .Call(`_vcfR_windowize_annotations`, wins, ann_starts, ann_ends, chrom_length) } -#' @export .write_vcf_body <- function(fix, gt, filename = "myFile.vcf.gz", mask = 0L) { invisible(.Call(`_vcfR_write_vcf_body`, fix, gt, filename, mask)) } diff --git a/README.md b/README.md index 14ca1a83..a60c2988 100644 --- a/README.md +++ b/README.md @@ -128,9 +128,9 @@ If you know of a software that I have not included on this list, particularly if * [Cortex](https://cortexassembler.sourceforge.net/) * [freebayes](https://github.com/freebayes/freebayes) -* [GATK haplotype caller](https://software.broadinstitute.org/gatk/guide/tooldocs/org_broadinstitute_gatk_tools_walkers_haplotypecaller_HaplotypeCaller.php) -* [GATK MuTect2](https://software.broadinstitute.org/gatk/guide/tooldocs/org_broadinstitute_gatk_tools_walkers_cancer_m2_MuTect2.php) -* [GATK GenotypeGVCFs](https://software.broadinstitute.org/gatk/guide/tooldocs/org_broadinstitute_gatk_tools_walkers_variantutils_GenotypeGVCFs.php) +* [GATK haplotype caller](https://gatk.broadinstitute.org) +* [GATK MuTect2](https://gatk.broadinstitute.org) +* [GATK GenotypeGVCFs](https://gatk.broadinstitute.org) * [LoFreq](http://csb5.github.io/lofreq/) * [Samtools](http://www.htslib.org/) * [VarScan2](http://dkoboldt.github.io/varscan/) diff --git a/cran-comments.md b/cran-comments.md index 11f5f308..f58e1203 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,12 +1,17 @@ ## Submission - -This package, vcfR, is generating WARNings on r-devel. I believe these are addressed here. This submission also includes updates to the package. +This submission includes updates to the package vcfR. ## Test environments -* rocker/r-devel -NAME="Debian GNU/Linux"; VERSION_CODENAME=bookworm; R Under development (unstable) (2023-01-29 r83721) -- "Unsuffered Consequences" +* local: +R 4.3.2; Ubuntu 22.04.3 LTS +* checking installed package size ... NOTE + installed size is 15.0Mb + sub-directories of 1Mb or more: + R 4.4Mb + libs 9.1Mb + * win-builder: using R Under development (unstable) (2023-02-09 r83797 ucrt) @@ -16,36 +21,22 @@ NAME="Debian GNU/Linux"; VERSION_CODENAME=bookworm; R Under development (unstabl GNU Fortran (GCC) 12.2.0 running under: Windows Server 2022 x64 (build 20348) -* local: -R 4.2.2; Ubuntu 22.04.1 LTS; gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 -ubuntu 22.04.1 LTS and R Under development (unstable) (2022-07-07 r82559) clang++-14 -Wall - -* local: -OS X Monterey version 12.4 and R 4.2.1 and clang 13.1.6 * GitHub Actions -MacOS-latest (release) - macOS 12.6.2 21G320; R-4.2.2 -Ubuntu-latest (devel) - Ubuntu 22.04.1 LTS; R Under development (unstable) (2023-02-01 r83747) -Ubuntu-latest (oldrel-1) - Ubuntu 22.04.1 LTS; R version 4.1.3 (2022-03-10) -Ubuntu-latest (release) - Ubuntu 22.04.1 LTS; R version 4.2.2 (2022-10-31) -Windows-latest (release) - Microsoft Windows Server 2022 10.0.20348 Datacenter; R version 4.2.2 (2022-10-31 ucrt) +MacOS-latest (release) - macOS Monterey 12.7.1-R version 4.3.2 (2023-10-31) +Windows-latest (release) - Windows Server 2022 x64 (build 20348)-R version 4.3.2 (2023-10-31 ucrt) +Ubuntu-latest (devel) - Ubuntu 22.04.3 LTS-R version 4.4.0 (ge:16; iid:2fdf6c18-697a-4ba7-b8ef-11c0d92f1327); R Under development (unstable) (2023-12-02 r85657) +Ubuntu-latest (release) - Ubuntu 22.04.3 LTS-R version 4.3.2 (2023-10-31) +Ubuntu-latest (oldrel-1) - Ubuntu 22.04.3 LTS-R version 4.2.3 (2023-03-15) * AppVeyor: -Windows Server 2012 R2 x64 (build 9600); R Under development (unstable) (2023-02-01 r83747 ucrt) -Windows Server 2012 R2 x64 (build 9600); R version 4.2.2 (2022-10-31 ucrt) +Windows Server 2012 R2 x64 (build 9600); R version 4.3.2 (2023-10-31 ucrt) +Windows Server 2012 R2 x64 (build 9600); R Under development (unstable) (2023-12-02 r85657 ucrt) * rhub: None for this submission -## R CMD check results - -* checking installed package size ... NOTE - installed size is 10.8Mb - sub-directories of 1Mb or more: - libs 8.8Mb - - ## revdepcheck results We checked 18 reverse dependencies (4 from CRAN + 14 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package. diff --git a/src/NM2winNM.cpp b/src/NM2winNM.cpp index 3d7f3d9d..d1e78c97 100644 --- a/src/NM2winNM.cpp +++ b/src/NM2winNM.cpp @@ -36,7 +36,7 @@ NumericVector win_mean(std::vector< std::vector > win){ -//' @export +// ' @export // [[Rcpp::export(name=".NM2winNM")]] NumericMatrix NM2winNM(NumericMatrix x, std::vector pos, int maxbp, int winsize=100, int depr = 1) { int nwins; @@ -171,7 +171,7 @@ double vector_median(std::vector x){ } -//' @export +// ' @export // [[Rcpp::export(name=".windowize_NM")]] NumericMatrix windowize_NM(Rcpp::NumericMatrix x, Rcpp::NumericVector pos, Rcpp::NumericVector starts, Rcpp::NumericVector ends, diff --git a/src/deprecated_funcs.cpp b/src/deprecated_funcs.cpp index b5963246..146a849a 100644 --- a/src/deprecated_funcs.cpp +++ b/src/deprecated_funcs.cpp @@ -35,7 +35,7 @@ Rcpp::StringMatrix DataFrame_to_StringMatrix( Rcpp::DataFrame df, int depr = 1 ) /* Write data to fasta file */ -//' @export +// ' @export // [[Rcpp::export(name=".write_fasta")]] void write_fasta( Rcpp::CharacterVector seq, std::string seqname, diff --git a/src/extract_gt.cpp b/src/extract_gt.cpp index a1c63ff1..0e8ff64e 100644 --- a/src/extract_gt.cpp +++ b/src/extract_gt.cpp @@ -7,7 +7,7 @@ const int nreport = 1000; // Called by extract_GT_to_NM // -//' @export +// ' @export // [[Rcpp::export(name=".elementNumber")]] int elementNumber(Rcpp::String x, std::string element = "GT"){ // @@ -210,7 +210,7 @@ std::string gt2alleles( Rcpp::String gt, } -//' @export +// ' @export // [[Rcpp::export(name=".extract_GT_to_CM")]] Rcpp::StringMatrix extract_GT_to_CM( Rcpp::StringMatrix fix, Rcpp::StringMatrix gt, @@ -304,7 +304,7 @@ Rcpp::StringMatrix extract_GT_to_CM( Rcpp::StringMatrix fix, } -//' @export +// ' @export // [[Rcpp::export(name=".CM_to_NM")]] Rcpp::NumericMatrix CM_to_NM(Rcpp::CharacterMatrix x) { int i = 0; @@ -331,7 +331,7 @@ Rcpp::NumericMatrix CM_to_NM(Rcpp::CharacterMatrix x) { } -//' @export +// ' @export // [[Rcpp::export(name=".extract_haps")]] Rcpp::StringMatrix extract_haps(Rcpp::StringVector ref, Rcpp::StringVector alt, @@ -460,7 +460,7 @@ Rcpp::StringMatrix extract_haps(Rcpp::StringVector ref, } -//' @export +// ' @export // [[Rcpp::export(name=".grepa")]] void grepa(){ Rcpp::Rcout << "Hola Javier!\n"; @@ -468,7 +468,7 @@ void grepa(){ return; } -//' @export +// ' @export // [[Rcpp::export(name=".shankaR")]] void shankaR(){ Rcpp::Rcout << "Dhan'yavāda Shankar!" << std::endl; diff --git a/src/gt_to_popsum.cpp b/src/gt_to_popsum.cpp index aab9d3f4..3ca80f3e 100644 --- a/src/gt_to_popsum.cpp +++ b/src/gt_to_popsum.cpp @@ -36,7 +36,7 @@ std::vector < int > gtsplit(std::string line){ } -//' @export +// ' @export // [[Rcpp::export(name=".gt_to_popsum")]] Rcpp::DataFrame gt_to_popsum(Rcpp::DataFrame var_info, Rcpp::CharacterMatrix gt) { // Calculate popgen summaries for the sample. diff --git a/src/rank_variants.cpp b/src/rank_variants.cpp index e201ab70..64b4d76a 100644 --- a/src/rank_variants.cpp +++ b/src/rank_variants.cpp @@ -18,7 +18,7 @@ bool minimize ( const mypair& l, const mypair& r) { return l.first < r.first; } -//' @export +// ' @export // [[Rcpp::export(name=".rank_variants")]] Rcpp::DataFrame rank_variants(Rcpp::DataFrame variants, Rcpp::NumericVector ends, diff --git a/src/read_vcfR.cpp b/src/read_vcfR.cpp index 932ebd44..97ac9792 100644 --- a/src/read_vcfR.cpp +++ b/src/read_vcfR.cpp @@ -55,7 +55,7 @@ void stat_line(Rcpp::NumericVector stats, std::string line){ /* Single pass of vcf file to get statistics */ -//' @export +// ' @export // [[Rcpp::export(name=".vcf_stats_gz")]] Rcpp::NumericVector vcf_stats_gz(std::string x, int nrows = -1, int skip = 0, int verbose = 1) { // Rcpp::NumericVector stats(4); // 4 elements, all zero. Zero is default. @@ -150,7 +150,7 @@ Rcpp::NumericVector vcf_stats_gz(std::string x, int nrows = -1, int skip = 0, in /* Read vcf meta region */ -//' @export +// ' @export // [[Rcpp::export(name=".read_meta_gz")]] Rcpp::StringVector read_meta_gz(std::string x, Rcpp::NumericVector stats, int verbose) { // Read in the meta lines. @@ -293,7 +293,7 @@ void proc_body_line(Rcpp::CharacterMatrix gt, */ -//' @export +// ' @export // [[Rcpp::export(name=".read_body_gz")]] Rcpp::CharacterMatrix read_body_gz(std::string x, Rcpp::NumericVector stats, diff --git a/src/seq_to_rects.cpp b/src/seq_to_rects.cpp index 62d389df..685c50ae 100644 --- a/src/seq_to_rects.cpp +++ b/src/seq_to_rects.cpp @@ -20,7 +20,7 @@ int minimal_regex(char query, std::string db){ } -//' @export +// ' @export // [[Rcpp::export(name=".seq_to_rects")]] Rcpp::IntegerMatrix seq_to_rects(Rcpp::CharacterVector seq, std::string targets) { std::vector < int > starts; diff --git a/src/var_window.cpp b/src/var_window.cpp index 3d13f51b..d0fc8460 100644 --- a/src/var_window.cpp +++ b/src/var_window.cpp @@ -2,7 +2,7 @@ using namespace Rcpp; -//' @export +// ' @export // [[Rcpp::export(name=".window_init")]] Rcpp::DataFrame window_init(int window_size, int max_bp) { // Initialize windows. @@ -29,7 +29,7 @@ Rcpp::DataFrame window_init(int window_size, int max_bp) { } -//' @export +// ' @export // [[Rcpp::export(name=".windowize_fasta")]] Rcpp::DataFrame windowize_fasta(Rcpp::DataFrame wins, Rcpp::CharacterVector seq) { // Windowizes the nucleotide information from a DNA sequence. @@ -94,7 +94,7 @@ Rcpp::DataFrame windowize_fasta(Rcpp::DataFrame wins, Rcpp::CharacterVector seq) // Windowize variants // -//' @export +// ' @export // [[Rcpp::export(name=".windowize_variants")]] Rcpp::DataFrame windowize_variants(Rcpp::DataFrame windows, Rcpp::DataFrame variants) { Rcpp::NumericVector ends = windows["end"]; @@ -124,7 +124,7 @@ Rcpp::DataFrame windowize_variants(Rcpp::DataFrame windows, Rcpp::DataFrame vari // Windowize annotated nucleotides // -//' @export +// ' @export // [[Rcpp::export(name=".windowize_annotations")]] Rcpp::DataFrame windowize_annotations(Rcpp::DataFrame wins, Rcpp::NumericVector ann_starts, diff --git a/src/write_vcfR.cpp b/src/write_vcfR.cpp index aa4d26fb..3a95b026 100644 --- a/src/write_vcfR.cpp +++ b/src/write_vcfR.cpp @@ -6,7 +6,7 @@ /* Write vcf body */ -//' @export +// ' @export // [[Rcpp::export(name=".write_vcf_body")]] void write_vcf_body( Rcpp::CharacterMatrix fix, Rcpp::CharacterMatrix gt,