Skip to content

Commit

Permalink
changed //' @export to // ' @export for hidden functions
Browse files Browse the repository at this point in the history
  • Loading branch information
knausb committed Dec 6, 2023
1 parent b2d37f6 commit 617ed6c
Show file tree
Hide file tree
Showing 13 changed files with 39 additions and 88 deletions.
20 changes: 0 additions & 20 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
20 changes: 0 additions & 20 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
@@ -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)
}
Expand Down Expand Up @@ -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`))
}
Expand Down Expand Up @@ -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)
}
Expand Down Expand Up @@ -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))
}
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down
41 changes: 16 additions & 25 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/NM2winNM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ NumericVector win_mean(std::vector< std::vector<double> > win){



//' @export
// ' @export
// [[Rcpp::export(name=".NM2winNM")]]
NumericMatrix NM2winNM(NumericMatrix x, std::vector<int> pos, int maxbp, int winsize=100, int depr = 1) {
int nwins;
Expand Down Expand Up @@ -171,7 +171,7 @@ double vector_median(std::vector<double> x){
}


//' @export
// ' @export
// [[Rcpp::export(name=".windowize_NM")]]
NumericMatrix windowize_NM(Rcpp::NumericMatrix x, Rcpp::NumericVector pos,
Rcpp::NumericVector starts, Rcpp::NumericVector ends,
Expand Down
2 changes: 1 addition & 1 deletion src/deprecated_funcs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
12 changes: 6 additions & 6 deletions src/extract_gt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"){
//
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand All @@ -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,
Expand Down Expand Up @@ -460,15 +460,15 @@ Rcpp::StringMatrix extract_haps(Rcpp::StringVector ref,
}


//' @export
// ' @export
// [[Rcpp::export(name=".grepa")]]
void grepa(){
Rcpp::Rcout << "Hola Javier!\n";
Rcpp::Rcout << "Eres un verdadero amigo!\n";
return;
}

//' @export
// ' @export
// [[Rcpp::export(name=".shankaR")]]
void shankaR(){
Rcpp::Rcout << "Dhan'yavāda Shankar!" << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion src/gt_to_popsum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/rank_variants.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions src/read_vcfR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/seq_to_rects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions src/var_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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"];
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/write_vcfR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 617ed6c

Please sign in to comment.