Skip to content

Commit

Permalink
update cran to 0.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
shajoezhu committed Jul 24, 2017
1 parent 3cae090 commit e094eae
Show file tree
Hide file tree
Showing 21 changed files with 101 additions and 23 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ Suggests:
SystemRequirements: C++11
VignetteBuilder: knitr
LinkingTo: Rcpp
RoxygenNote: 5.0.1
RoxygenNote: 6.0.1
Date: 2017-07-19
4 changes: 4 additions & 0 deletions R/DEploidR.R
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ extractPLAF <- function ( plafFileName ){
#' @export
#'
#' @examples
#' \dontrun{
#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
#' panelFile = system.file("extdata", "labStrains.test.panel.txt", package = "DEploid")
#' refFile = system.file("extdata", "PG0390-C.test.ref", package = "DEploid")
Expand All @@ -135,6 +136,7 @@ extractPLAF <- function ( plafFileName ){
#' PG0390CoverageTxt.deconv = dEploid(paste("-ref", refFile, "-alt", altFile,
#' "-plaf", plafFile, "-noPanel"))
#' plotProportions( PG0390CoverageTxt.deconv$Proportions, "PG0390-C proportions" )
#' }
#'
plotProportions <- function (proportions, title = "Components",
cex.lab = 1, cex.main = 1, cex.axis = 1 ){
Expand Down Expand Up @@ -338,6 +340,7 @@ plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
#' @export
#'
#' @examples
#' \dontrun{
#' vcfFile = system.file("extdata", "PG0390-C.test.vcf.gz", package = "DEploid")
#' PG0390CoverageVcf = extractCoverageFromVcf(vcfFile)
#' obsWSAF = computeObsWSAF( PG0390CoverageVcf$altCount, PG0390CoverageVcf$refCount )
Expand All @@ -346,6 +349,7 @@ plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
#' prop = PG0390CoverageVcf.deconv$Proportions[dim(PG0390CoverageVcf.deconv$Proportions)[1],]
#' expWSAF = t(PG0390CoverageVcf.deconv$Haps) %*% prop
#' plotObsExpWSAF(obsWSAF, expWSAF)
#' }
#'
plotObsExpWSAF <- function (obsWSAF, expWSAF,
title = "WSAF(observed vs expected)",
Expand Down
10 changes: 6 additions & 4 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,26 @@
#' @export
#'
#' @examples
#' \dontrun{
#' vcfFile = system.file("extdata", "PG0390-C.test.vcf.gz", package = "DEploid")
#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
#' set.seed(1234)
#' PG0390.deconv = dEploid(paste("-vcf", vcfFile, "-plaf", plafFile, "-noPanel"))
#' }
#'
dEploid <- function(args) {
.Call('DEploid_dEploid', PACKAGE = 'DEploid', args)
.Call(`_DEploid_dEploid`, args)
}

test_RRG_sample <- function() {
.Call('DEploid_test_RRG_sample', PACKAGE = 'DEploid')
.Call(`_DEploid_test_RRG_sample`)
}

test_RRG_sampleUnitExpo <- function() {
.Call('DEploid_test_RRG_sampleUnitExpo', PACKAGE = 'DEploid')
.Call(`_DEploid_test_RRG_sampleUnitExpo`)
}

test_RRG_sampleExpoExpoLimit <- function(lambda, b, limit) {
.Call('DEploid_test_RRG_sampleExpoExpoLimit', PACKAGE = 'DEploid', lambda, b, limit)
.Call(`_DEploid_test_RRG_sampleExpoExpoLimit`, lambda, b, limit)
}

23 changes: 23 additions & 0 deletions R/dEploid.R
Original file line number Diff line number Diff line change
@@ -1 +1,24 @@
#' Deconvolute Mixed Genomes with Unknown Proportions
#'
#' Traditional phasing programs are limited to diploid organisms.
#' Our method modifies Li and Stephens algorithm with Markov chain Monte Carlo
#' (MCMC) approaches, and builds a generic framework that allows haplotype searches
#' in a multiple infection setting. This package is primarily developed as part of
#' the Pf3k project, which is a global collaboration using the latest
#' sequencing technologies to provide a high-resolution view of natural variation
#' in the malaria parasite Plasmodium falciparum. Parasite DNA are extracted from
#' patient blood sample, which often contains more than one parasite strain, with
#' unknown proportions. This package is used for deconvoluting mixed haplotypes,
#' and reporting the mixture proportions from each sample.
#'
#' @author
#' Zhu Sha
#'
#' Maintainer: Joe Zhu \email{[email protected]}
#'
#' @name DEploid-package
#' @docType package
#'
#' @importFrom Rcpp evalCpp
#' @useDynLib _DEploid_dEploid
NULL
2 changes: 1 addition & 1 deletion buildLocally.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

PKG_NAME=$( cat DESCRIPTION | grep "Package:" | sed -e "s/Package: //g")
Rscript -e "roxygen2::roxygenize(\"../${PKG_NAME}\")"
Rscript -e "roxygen2::roxygenize(\"../${PKG_NAME}-r\")"

# Building package
R CMD build .
Expand Down
23 changes: 23 additions & 0 deletions man/DEploid-package.Rd

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

1 change: 0 additions & 1 deletion man/computeObsWSAF.Rd

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

4 changes: 3 additions & 1 deletion man/dEploid.Rd

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

1 change: 0 additions & 1 deletion man/extractCoverageFromTxt.Rd

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

1 change: 0 additions & 1 deletion man/extractCoverageFromVcf.Rd

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

1 change: 0 additions & 1 deletion man/extractPLAF.Rd

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

1 change: 0 additions & 1 deletion man/haplotypePainter.Rd

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

1 change: 0 additions & 1 deletion man/histWSAF.Rd

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

1 change: 0 additions & 1 deletion man/plotAltVsRef.Rd

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

3 changes: 2 additions & 1 deletion man/plotObsExpWSAF.Rd

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

3 changes: 2 additions & 1 deletion man/plotProportions.Rd

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

1 change: 0 additions & 1 deletion man/plotWSAFvsPLAF.Rd

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

4 changes: 2 additions & 2 deletions src/Makevars.win
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
OBJECTS.dEploidr = dEploidr.o test_exports.o RcppExports.o
OBJECTS.dEploidr = dEploidr.o test_exports.o RcppExports.o init.o

OBJECTS.dEploid = DEploid/panel.o \
DEploid/ibd.o \
Expand All @@ -18,5 +18,5 @@ OBJECTS.dEploid = DEploid/panel.o \

OBJECTS = $(OBJECTS.dEploidr) $(OBJECTS.dEploid)
CXX_STD = CXX11
PKG_CXXFLAGS = -IDEploid/ -IDEploid/codeCogs/ -IDEploid/random/ -IDEploid/gzstream/ -DVERSION="\"R\"" -DRBUILD
PKG_CXXFLAGS = -I/usr/share/R/include/ -IDEploid/ -IDEploid/codeCogs/ -IDEploid/random/ -IDEploid/gzstream/ -DVERSION="\"R\"" -DRBUILD
PKG_LIBS = -lz
8 changes: 4 additions & 4 deletions src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ using namespace Rcpp;

// dEploid
List dEploid(std::string args);
RcppExport SEXP DEploid_dEploid(SEXP argsSEXP) {
RcppExport SEXP _DEploid_dEploid(SEXP argsSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Expand All @@ -18,7 +18,7 @@ END_RCPP
}
// test_RRG_sample
double test_RRG_sample();
RcppExport SEXP DEploid_test_RRG_sample() {
RcppExport SEXP _DEploid_test_RRG_sample() {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Expand All @@ -28,7 +28,7 @@ END_RCPP
}
// test_RRG_sampleUnitExpo
double test_RRG_sampleUnitExpo();
RcppExport SEXP DEploid_test_RRG_sampleUnitExpo() {
RcppExport SEXP _DEploid_test_RRG_sampleUnitExpo() {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Expand All @@ -38,7 +38,7 @@ END_RCPP
}
// test_RRG_sampleExpoExpoLimit
double test_RRG_sampleExpoExpoLimit(double lambda, double b, double limit);
RcppExport SEXP DEploid_test_RRG_sampleExpoExpoLimit(SEXP lambdaSEXP, SEXP bSEXP, SEXP limitSEXP) {
RcppExport SEXP _DEploid_test_RRG_sampleExpoExpoLimit(SEXP lambdaSEXP, SEXP bSEXP, SEXP limitSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Expand Down
2 changes: 2 additions & 0 deletions src/dEploidr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,12 @@ class RMcmcSample {
//' @export
//'
//' @examples
//' \dontrun{
//' vcfFile = system.file("extdata", "PG0390-C.test.vcf.gz", package = "DEploid")
//' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
//' set.seed(1234)
//' PG0390.deconv = dEploid(paste("-vcf", vcfFile, "-plaf", plafFile, "-noPanel"))
//' }
//'
// [[Rcpp::export]]
List dEploid(std::string args) {
Expand Down
28 changes: 28 additions & 0 deletions src/init.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#include <R.h>
#include <Rinternals.h>
#include <stdlib.h> // for NULL
#include <R_ext/Rdynload.h>

/* FIXME:
Check these declarations against the C/Fortran source code.
*/

/* .Call calls */
extern SEXP _DEploid_dEploid(SEXP);
extern SEXP _DEploid_test_RRG_sample();
extern SEXP _DEploid_test_RRG_sampleExpoExpoLimit(SEXP, SEXP, SEXP);
extern SEXP _DEploid_test_RRG_sampleUnitExpo();

static const R_CallMethodDef CallEntries[] = {
{"_DEploid_dEploid", (DL_FUNC) &_DEploid_dEploid, 1},
{"_DEploid_test_RRG_sample", (DL_FUNC) &_DEploid_test_RRG_sample, 0},
{"_DEploid_test_RRG_sampleExpoExpoLimit", (DL_FUNC) &_DEploid_test_RRG_sampleExpoExpoLimit, 3},
{"_DEploid_test_RRG_sampleUnitExpo", (DL_FUNC) &_DEploid_test_RRG_sampleUnitExpo, 0},
{NULL, NULL, 0}
};

void R_init_DEploid(DllInfo *dll)
{
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
R_useDynamicSymbols(dll, FALSE);
}

6 comments on commit e094eae

@lintr-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

R/dEploid.R:5:1: style: Lines should not be more than 80 characters.

#' (MCMC) approaches, and builds a generic framework that allows haplotype searches
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploid.R:6:1: style: Lines should not be more than 80 characters.

#' in a multiple infection setting. This package is primarily developed as part of
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploid.R:8:1: style: Lines should not be more than 80 characters.

#' sequencing technologies to provide a high-resolution view of natural variation
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploid.R:9:1: style: Lines should not be more than 80 characters.

#' in the malaria parasite Plasmodium falciparum. Parasite DNA are extracted from
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploid.R:10:1: style: Lines should not be more than 80 characters.

#' patient blood sample, which often contains more than one parasite strain, with
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:3:1: style: Lines should not be more than 80 characters.

#' @description Extract read counts from tab-delimited text files of a single sample.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:5:1: style: Lines should not be more than 80 characters.

#' @note The allele count files must be tab-delimited. The allele count files contain three columns: chromosomes, positions and allele count.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:11:1: style: Lines should not be more than 80 characters.

#' @return A data.frame contains four columns: chromosomes, positions, reference allele count, alternative allele count.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:20:1: style: Variable or function name should be snake_case.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
^~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:20:36: style: Remove spaces before the left parenthesis in a function call.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                   ^

R/DEploidR.R:20:37: style: Do not place spaces around code in parentheses or square brackets.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                    ^

R/DEploidR.R:20:38: style: Variable or function name should be snake_case.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                     ^~~~~~~~~~~

R/DEploidR.R:20:51: style: Variable or function name should be snake_case.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                                  ^~~~~~~~~~~

R/DEploidR.R:20:62: style: Do not place spaces around code in parentheses or square brackets.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                                             ^

R/DEploidR.R:23:12: style: Remove spaces before the left parenthesis in a function call.

return ( data.frame( CHROM = ref[, 1],
           ^

R/DEploidR.R:23:13: style: Do not place spaces around code in parentheses or square brackets.

return ( data.frame( CHROM = ref[, 1],
            ^

R/DEploidR.R:23:25: style: Do not place spaces around code in parentheses or square brackets.

return ( data.frame( CHROM = ref[, 1],
                        ^

R/DEploidR.R:26:45: style: Do not place spaces around code in parentheses or square brackets.

altCount = alt[, 3] )
                                            ^

R/DEploidR.R:35:1: style: Lines should not be more than 80 characters.

#' @note The VCF file should only contain one sample. If more samples present in the VCF, it only returns coverage for of the first sample.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:39:1: style: Lines should not be more than 80 characters.

#' @param ADFieldIndex Index of the AD field of the sample field. For example, if the format is "GT:AD:DP:GQ:PL", the AD index is 2 (by default).
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:41:1: style: Lines should not be more than 80 characters.

#' @return A data.frame contains four columns: chromosomes, positions, reference allele count, alternative allele count.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:49:1: style: Variable or function name should be snake_case.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
^~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:49:36: style: Remove spaces before the left parenthesis in a function call.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                   ^

R/DEploidR.R:49:37: style: Do not place spaces around code in parentheses or square brackets.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                    ^

R/DEploidR.R:49:38: style: Variable or function name should be snake_case.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                     ^~~~~~~~~~~

R/DEploidR.R:49:51: style: Variable or function name should be snake_case.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                                  ^~~~~~~~~~~~

R/DEploidR.R:49:67: style: Do not place spaces around code in parentheses or square brackets.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                                                  ^

R/DEploidR.R:52:14: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
             ^

R/DEploidR.R:52:19: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
                  ^

R/DEploidR.R:52:26: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
                         ^

R/DEploidR.R:52:50: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
                                                 ^

R/DEploidR.R:52:52: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
                                                   ^

R/DEploidR.R:53:24: style: Do not place spaces around code in parentheses or square brackets.

​         invokeRestart( "muffleWarning" )
                       ^

R/DEploidR.R:53:40: style: Do not place spaces around code in parentheses or square brackets.

​         invokeRestart( "muffleWarning" )
                                       ^

R/DEploidR.R:57:5: style: Variable or function name should be snake_case.

numberOfHeaderLines <- 0
    ^~~~~~~~~~~~~~~~~~~

R/DEploidR.R:58:33: style: Do not place spaces around code in parentheses or square brackets.

line <- withCallingHandlers( readLines(gzf, n = 1), warning = h)
                                ^

R/DEploidR.R:59:12: style: Do not place spaces around code in parentheses or square brackets.

while ( length(line) > 0 ){
           ^

R/DEploidR.R:59:29: style: Do not place spaces around code in parentheses or square brackets.

while ( length(line) > 0 ){
                            ^

R/DEploidR.R:60:29: style: Do not place spaces around code in parentheses or square brackets.

if (grepl("##", line )){
                            ^

R/DEploidR.R:61:13: style: Variable or function name should be snake_case.

numberOfHeaderLines <- numberOfHeaderLines + 1
            ^~~~~~~~~~~~~~~~~~~

R/DEploidR.R:65:37: style: Do not place spaces around code in parentheses or square brackets.

line <- withCallingHandlers( readLines(gzf, n = 1), warning = h)
                                    ^

R/DEploidR.R:69:23: style: Do not place spaces around code in parentheses or square brackets.

vcf <- read.table( gzfile(vcfFileName), skip = numberOfHeaderLines,
                      ^

R/DEploidR.R:73:5: style: Variable or function name should be snake_case.

sampleName <- names(vcf)[10]
    ^~~~~~~~~~

R/DEploidR.R:78:5: style: Variable or function name should be snake_case.

tmpCovStr <- unlist(lapply(field, `[[`, ADFieldIndex))
    ^~~~~~~~~

R/DEploidR.R:79:5: style: Variable or function name should be snake_case.

tmpCov <- strsplit(as.character(tmpCovStr), ",")
    ^~~~~~

R/DEploidR.R:81:5: style: Variable or function name should be snake_case.

refCount <- as.numeric(unlist(lapply(tmpCov, `[[`, 1)))
    ^~~~~~~~

R/DEploidR.R:82:5: style: Variable or function name should be snake_case.

altCount <- as.numeric(unlist(lapply(tmpCov, `[[`, 2)))
    ^~~~~~~~

R/DEploidR.R:84:12: style: Remove spaces before the left parenthesis in a function call.

return ( data.frame( CHROM = vcf[, 1],
           ^

R/DEploidR.R:84:13: style: Do not place spaces around code in parentheses or square brackets.

return ( data.frame( CHROM = vcf[, 1],
            ^

R/DEploidR.R:84:25: style: Do not place spaces around code in parentheses or square brackets.

return ( data.frame( CHROM = vcf[, 1],
                        ^

R/DEploidR.R:87:45: style: Do not place spaces around code in parentheses or square brackets.

altCount = altCount )
                                            ^

R/DEploidR.R:96:1: style: Lines should not be more than 80 characters.

#' @note The text file must have header, and population level allele frequency recorded in the "PLAF" field.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:105:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:108:1: style: Variable or function name should be snake_case.

extractPLAF <- function ( plafFileName ){
^~~~~~~~~~~

R/DEploidR.R:108:25: style: Remove spaces before the left parenthesis in a function call.

extractPLAF <- function ( plafFileName ){
                        ^

R/DEploidR.R:108:26: style: Do not place spaces around code in parentheses or square brackets.

extractPLAF <- function ( plafFileName ){
                         ^

R/DEploidR.R:108:27: style: Variable or function name should be snake_case.

extractPLAF <- function ( plafFileName ){
                          ^~~~~~~~~~~~

R/DEploidR.R:108:39: style: Do not place spaces around code in parentheses or square brackets.

extractPLAF <- function ( plafFileName ){
                                      ^

R/DEploidR.R:109:12: style: Remove spaces before the left parenthesis in a function call.

return ( read.table(plafFileName, header = T)$PLAF )
           ^

R/DEploidR.R:109:13: style: Do not place spaces around code in parentheses or square brackets.

return ( read.table(plafFileName, header = T)$PLAF )
            ^

R/DEploidR.R:109:55: style: Do not place spaces around code in parentheses or square brackets.

return ( read.table(plafFileName, header = T)$PLAF )
                                                      ^

R/DEploidR.R:115:1: style: Lines should not be more than 80 characters.

#' @description Plot the MCMC samples of the proportion, indexed by the MCMC chain.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:117:1: style: Lines should not be more than 80 characters.

#' @param proportions Matrix of the MCMC proportion samples. The matrix size is number of the MCMC samples by the number of strains.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:131:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:132:1: style: Lines should not be more than 80 characters.

#' panelFile = system.file("extdata", "labStrains.test.panel.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:138:1: style: Lines should not be more than 80 characters.

#' plotProportions( PG0390CoverageTxt.deconv$Proportions, "PG0390-C proportions" )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:141:1: style: Variable or function name should be snake_case.

plotProportions <- function (proportions, title = "Components",
^~~~~~~~~~~~~~~

R/DEploidR.R:141:29: style: Remove spaces before the left parenthesis in a function call.

plotProportions <- function (proportions, title = "Components",
                            ^

R/DEploidR.R:142:24: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                       ^~~~~~~

R/DEploidR.R:142:37: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                    ^~~~~~~~

R/DEploidR.R:142:51: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                  ^~~~~~~~

R/DEploidR.R:142:63: style: Do not place spaces around code in parentheses or square brackets.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                              ^

R/DEploidR.R:143:5: style: Variable or function name should be snake_case.

rainbowColorBin <- 16
    ^~~~~~~~~~~~~~~

R/DEploidR.R:153:1: style: Lines should not be more than 80 characters.

#' @description Plot alternative allele count vs reference allele count at each site.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:161:1: style: Lines should not be more than 80 characters.

#' @param exclude.ref Numeric array of reference allele count at sites that are not deconvoluted.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:163:1: style: Lines should not be more than 80 characters.

#' @param exclude.alt Numeric array of alternative allele count at sites that are not deconvoluted
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:187:1: style: Variable or function name should be snake_case.

plotAltVsRef <- function ( ref, alt, title = "Alt vs Ref",
^~~~~~~~~~~~

R/DEploidR.R:187:26: style: Remove spaces before the left parenthesis in a function call.

plotAltVsRef <- function ( ref, alt, title = "Alt vs Ref",
                         ^

R/DEploidR.R:187:27: style: Do not place spaces around code in parentheses or square brackets.

plotAltVsRef <- function ( ref, alt, title = "Alt vs Ref",
                          ^

R/DEploidR.R:188:21: style: Variable or function name should be snake_case.

exclude.ref = c(), exclude.alt = c(),
                    ^~~~~~~~~~~

R/DEploidR.R:188:40: style: Variable or function name should be snake_case.

exclude.ref = c(), exclude.alt = c(),
                                       ^~~~~~~~~~~

R/DEploidR.R:189:21: style: Variable or function name should be snake_case.

potentialOutliers = c(), cex.lab = 1, cex.main = 1,
                    ^~~~~~~~~~~~~~~~~

R/DEploidR.R:189:46: style: Variable or function name should be snake_case.

potentialOutliers = c(), cex.lab = 1, cex.main = 1,
                                             ^~~~~~~

R/DEploidR.R:189:59: style: Variable or function name should be snake_case.

potentialOutliers = c(), cex.lab = 1, cex.main = 1,
                                                          ^~~~~~~~

R/DEploidR.R:190:21: style: Variable or function name should be snake_case.

cex.axis = 1 ){
                    ^~~~~~~~

R/DEploidR.R:190:33: style: Do not place spaces around code in parentheses or square brackets.

cex.axis = 1 ){
                                ^

R/DEploidR.R:194:5: style: Variable or function name should be snake_case.

tmpRange <- 1.1 * mean(max(alt), max(ref))
    ^~~~~~~~

R/DEploidR.R:195:10: style: Remove spaces before the left parenthesis in a function call.

​    plot ( ref, alt, xlim = c(0, tmpRange), ylim = c(0, tmpRange),
         ^

R/DEploidR.R:195:11: style: Do not place spaces around code in parentheses or square brackets.

​    plot ( ref, alt, xlim = c(0, tmpRange), ylim = c(0, tmpRange),
          ^

R/DEploidR.R:210:9: style: Do not place spaces around code in parentheses or square brackets.

if ( length(potentialOutliers) > 0 ){
        ^

R/DEploidR.R:210:39: style: Do not place spaces around code in parentheses or square brackets.

if ( length(potentialOutliers) > 0 ){
                                      ^

R/DEploidR.R:242:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageTxt$altCount, PG0390CoverageTxt$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:249:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageVcf$altCount, PG0390CoverageVcf$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:253:1: style: Variable or function name should be snake_case.

histWSAF <- function ( obsWSAF, exclusive = TRUE,
^~~~~~~~

R/DEploidR.R:253:22: style: Remove spaces before the left parenthesis in a function call.

histWSAF <- function ( obsWSAF, exclusive = TRUE,
                     ^

R/DEploidR.R:253:23: style: Do not place spaces around code in parentheses or square brackets.

histWSAF <- function ( obsWSAF, exclusive = TRUE,
                      ^

R/DEploidR.R:253:24: style: Variable or function name should be snake_case.

histWSAF <- function ( obsWSAF, exclusive = TRUE,
                       ^~~~~~~

R/DEploidR.R:255:17: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                ^~~~~~~

R/DEploidR.R:255:30: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                             ^~~~~~~~

R/DEploidR.R:255:44: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                           ^~~~~~~~

R/DEploidR.R:255:56: style: Do not place spaces around code in parentheses or square brackets.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                       ^

R/DEploidR.R:256:5: style: Variable or function name should be snake_case.

tmpWSAFIndex <- 1:length(obsWSAF)
    ^~~~~~~~~~~~

R/DEploidR.R:257:9: style: Do not place spaces around code in parentheses or square brackets.

if ( exclusive ){
        ^

R/DEploidR.R:257:19: style: Do not place spaces around code in parentheses or square brackets.

if ( exclusive ){
                  ^

R/DEploidR.R:258:9: style: Variable or function name should be snake_case.

tmpWSAFIndex <- which( ( (obsWSAF < 1) * (obsWSAF > 0) ) == 1)
        ^~~~~~~~~~~~

R/DEploidR.R:258:31: style: Do not place spaces around code in parentheses or square brackets.

tmpWSAFIndex <- which( ( (obsWSAF < 1) * (obsWSAF > 0) ) == 1)
                              ^

R/DEploidR.R:258:33: style: Do not place spaces around code in parentheses or square brackets.

tmpWSAFIndex <- which( ( (obsWSAF < 1) * (obsWSAF > 0) ) == 1)
                                ^

R/DEploidR.R:258:63: style: Do not place spaces around code in parentheses or square brackets.

tmpWSAFIndex <- which( ( (obsWSAF < 1) * (obsWSAF > 0) ) == 1)
                                                              ^

R/DEploidR.R:260:12: style: Remove spaces before the left parenthesis in a function call.

return (hist(obsWSAF[tmpWSAFIndex], main = title,
           ^

R/DEploidR.R:273:1: style: Lines should not be more than 80 characters.

#' @param obsWSAF Numeric array of observed altenative allele frequencies within sample.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:294:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageTxt$altCount, PG0390CoverageTxt$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:295:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:302:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageVcf$altCount, PG0390CoverageVcf$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:303:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:307:1: style: Variable or function name should be snake_case.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
^~~~~~~~~~~~~~

R/DEploidR.R:307:28: style: Remove spaces before the left parenthesis in a function call.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
                           ^

R/DEploidR.R:307:29: style: Do not place spaces around code in parentheses or square brackets.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
                            ^

R/DEploidR.R:307:36: style: Variable or function name should be snake_case.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
                                   ^~~~~~~

R/DEploidR.R:307:45: style: Variable or function name should be snake_case.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
                                            ^~~~~~~

R/DEploidR.R:308:23: style: Variable or function name should be snake_case.

potentialOutliers = c(), title = "WSAF vs PLAF",
                      ^~~~~~~~~~~~~~~~~

R/DEploidR.R:309:23: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                      ^~~~~~~

R/DEploidR.R:309:36: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                   ^~~~~~~~

R/DEploidR.R:309:50: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                 ^~~~~~~~

R/DEploidR.R:309:62: style: Do not place spaces around code in parentheses or square brackets.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                             ^

R/DEploidR.R:310:10: style: Remove spaces before the left parenthesis in a function call.

​    plot ( plaf, obsWSAF, cex = 0.5, xlim = c(0, 1), ylim = c(0, 1),
         ^

R/DEploidR.R:310:11: style: Do not place spaces around code in parentheses or square brackets.

​    plot ( plaf, obsWSAF, cex = 0.5, xlim = c(0, 1), ylim = c(0, 1),
          ^

R/DEploidR.R:313:9: style: Do not place spaces around code in parentheses or square brackets.

if ( length(expWSAF) > 0 ){
        ^

R/DEploidR.R:313:29: style: Do not place spaces around code in parentheses or square brackets.

if ( length(expWSAF) > 0 ){
                            ^

R/DEploidR.R:314:16: style: Remove spaces before the left parenthesis in a function call.

​        points ( plaf, expWSAF, cex = 0.5, col = "blue")
               ^

R/DEploidR.R:314:17: style: Do not place spaces around code in parentheses or square brackets.

​        points ( plaf, expWSAF, cex = 0.5, col = "blue")
                ^

R/DEploidR.R:316:9: style: Do not place spaces around code in parentheses or square brackets.

if ( length(potentialOutliers) > 0 ){
        ^

R/DEploidR.R:316:39: style: Do not place spaces around code in parentheses or square brackets.

if ( length(potentialOutliers) > 0 ){
                                      ^

R/DEploidR.R:326:1: style: Lines should not be more than 80 characters.

#' @description Plot observed alternative allele frequency within sample against expected WSAF.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:346:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageVcf$altCount, PG0390CoverageVcf$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:347:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:348:1: style: Lines should not be more than 80 characters.

#' PG0390CoverageVcf.deconv = dEploid(paste("-vcf", vcfFile, "-plaf", plafFile, "-noPanel"))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:349:1: style: Lines should not be more than 80 characters.

#' prop = PG0390CoverageVcf.deconv$Proportions[dim(PG0390CoverageVcf.deconv$Proportions)[1],]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:354:1: style: Variable or function name should be snake_case.

plotObsExpWSAF <- function (obsWSAF, expWSAF,
^~~~~~~~~~~~~~

R/DEploidR.R:354:28: style: Remove spaces before the left parenthesis in a function call.

plotObsExpWSAF <- function (obsWSAF, expWSAF,
                           ^

R/DEploidR.R:354:29: style: Variable or function name should be snake_case.

plotObsExpWSAF <- function (obsWSAF, expWSAF,
                            ^~~~~~~

R/DEploidR.R:354:38: style: Variable or function name should be snake_case.

plotObsExpWSAF <- function (obsWSAF, expWSAF,
                                     ^~~~~~~

R/DEploidR.R:356:23: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                      ^~~~~~~

R/DEploidR.R:356:36: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                   ^~~~~~~~

R/DEploidR.R:356:50: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                 ^~~~~~~~

R/DEploidR.R:356:62: style: Do not place spaces around code in parentheses or square brackets.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                             ^

R/DEploidR.R:367:1: style: Lines should not be more than 80 characters.

#' @description Compute observed allele frequency within sample from the allele counts.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:384:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageTxt$altCount, PG0390CoverageTxt$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:389:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageVcf$altCount, PG0390CoverageVcf$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:391:1: style: Variable or function name should be snake_case.

computeObsWSAF <- function (alt, ref) {
^~~~~~~~~~~~~~

R/DEploidR.R:391:28: style: Remove spaces before the left parenthesis in a function call.

computeObsWSAF <- function (alt, ref) {
                           ^

R/DEploidR.R:392:12: style: Remove spaces before the left parenthesis in a function call.

return ( alt / (ref + alt + 0.00000001) )
           ^

R/DEploidR.R:392:13: style: Do not place spaces around code in parentheses or square brackets.

return ( alt / (ref + alt + 0.00000001) )
            ^

R/DEploidR.R:392:44: style: Do not place spaces around code in parentheses or square brackets.

return ( alt / (ref + alt + 0.00000001) )
                                           ^

R/DEploidR.R:398:1: style: Lines should not be more than 80 characters.

#' @description Plot the posterior probabilities of a haplotype given the refernece panel.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:400:1: style: Lines should not be more than 80 characters.

#' @param posteriorProbabilities Posterior probabilities matrix with the size of number of loci by the number of reference strain.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:410:1: style: Variable or function name should be snake_case.

haplotypePainter <- function (posteriorProbabilities, title = "", labelScaling,
^~~~~~~~~~~~~~~~

R/DEploidR.R:410:30: style: Remove spaces before the left parenthesis in a function call.

haplotypePainter <- function (posteriorProbabilities, title = "", labelScaling,
                             ^

R/DEploidR.R:410:31: style: Variable or function name should be snake_case.

haplotypePainter <- function (posteriorProbabilities, title = "", labelScaling,
                              ^~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:410:67: style: Variable or function name should be snake_case.

haplotypePainter <- function (posteriorProbabilities, title = "", labelScaling,
                                                                  ^~~~~~~~~~~~

R/DEploidR.R:411:25: style: Variable or function name should be snake_case.

numberOfInbreeding = 0){
                        ^~~~~~~~~~~~~~~~~~

R/DEploidR.R:412:5: style: Variable or function name should be snake_case.

rainbowColorBin <- 16
    ^~~~~~~~~~~~~~~

R/DEploidR.R:413:5: style: Variable or function name should be snake_case.

rainbowColors <- rainbow(rainbowColorBin)
    ^~~~~~~~~~~~~

R/DEploidR.R:414:9: style: Do not place spaces around code in parentheses or square brackets.

if ( numberOfInbreeding > 0 ){
        ^

R/DEploidR.R:414:32: style: Do not place spaces around code in parentheses or square brackets.

if ( numberOfInbreeding > 0 ){
                               ^

R/DEploidR.R:415:9: style: Variable or function name should be snake_case.

panelSize <- dim(posteriorProbabilities)[2] - numberOfInbreeding
        ^~~~~~~~~

R/DEploidR.R:416:9: style: Variable or function name should be snake_case.

rainbowColors <- c(rep("#46a8e1", panelSize),
        ^~~~~~~~~~~~~

R/DEploidR.R:424:5: style: Variable or function name should be snake_case.

newXaxt <- round(seq(1, dim(posteriorProbabilities)[1], length.out = 6))
    ^~~~~~~

R/DEploidR.R:427:5: style: Variable or function name should be snake_case.

newYaxt <- seq(0, 1, length.out = 3)
    ^~~~~~~

tests/testthat/test-DEploid_tools.R:3:1: style: Variable or function name should be snake_case.

vcfFileName <- system.file("extdata", "PG0390-C.test.vcf.gz",
^~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:5:1: style: Variable or function name should be snake_case.

plafFileName <- system.file("extdata", "labStrains.test.PLAF.txt",
^~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:7:1: style: Variable or function name should be snake_case.

panelFileName <- system.file("extdata", "labStrains.test.panel.txt",
^~~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:9:1: style: Variable or function name should be snake_case.

refFileName <- system.file("extdata", "PG0390-C.test.ref", package = "DEploid")
^~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:10:1: style: Variable or function name should be snake_case.

altFileName <- system.file("extdata", "PG0390-C.test.alt", package = "DEploid")
^~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:12:1: style: Variable or function name should be snake_case.

PG0390CoverageVcf <- extractCoverageFromVcf(vcfFileName)
^~~~~~~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:15:1: style: Variable or function name should be snake_case.

PG0390Deconv <- dEploid(paste("-vcf", vcfFileName, "-plaf", plafFileName,
^~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:18:1: style: Variable or function name should be snake_case.

expWSAF <- t(PG0390Deconv$Haps) %*% prop
^~~~~~~

tests/testthat/test-DEploid_tools.R:21:5: style: Variable or function name should be snake_case.

PG0390CoverageTxt <- extractCoverageFromTxt(refFileName, altFileName)
    ^~~~~~~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:44:5: style: Variable or function name should be snake_case.

obsWSAF <- computeObsWSAF(PG0390CoverageVcf$altCount,
    ^~~~~~~

tests/testthat/test-DEploid_tools.R:54:30: style: Do not place spaces around code in parentheses or square brackets.

​    expect_null(plotAltVsRef( PG0390CoverageVcf$refCount,
                             ^

tests/testthat/test-DEploid_tools.R:55:35: style: Do not place spaces around code in parentheses or square brackets.

PG0390CoverageVcf$altCount ))
                                  ^

tests/testthat/test-dEploid.R:3:1: style: Variable or function name should be snake_case.

vcfFileName <- system.file("extdata", "PG0390-C.test.vcf.gz",
^~~~~~~~~~~

tests/testthat/test-dEploid.R:5:1: style: Variable or function name should be snake_case.

plafFileName <- system.file("extdata", "labStrains.test.PLAF.txt",
^~~~~~~~~~~~

@lintr-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

R/dEploid.R:5:1: style: Lines should not be more than 80 characters.

#' (MCMC) approaches, and builds a generic framework that allows haplotype searches
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploid.R:6:1: style: Lines should not be more than 80 characters.

#' in a multiple infection setting. This package is primarily developed as part of
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploid.R:8:1: style: Lines should not be more than 80 characters.

#' sequencing technologies to provide a high-resolution view of natural variation
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploid.R:9:1: style: Lines should not be more than 80 characters.

#' in the malaria parasite Plasmodium falciparum. Parasite DNA are extracted from
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploid.R:10:1: style: Lines should not be more than 80 characters.

#' patient blood sample, which often contains more than one parasite strain, with
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:3:1: style: Lines should not be more than 80 characters.

#' @description Extract read counts from tab-delimited text files of a single sample.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:5:1: style: Lines should not be more than 80 characters.

#' @note The allele count files must be tab-delimited. The allele count files contain three columns: chromosomes, positions and allele count.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:11:1: style: Lines should not be more than 80 characters.

#' @return A data.frame contains four columns: chromosomes, positions, reference allele count, alternative allele count.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:20:1: style: Variable or function name should be snake_case.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
^~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:20:36: style: Remove spaces before the left parenthesis in a function call.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                   ^

R/DEploidR.R:20:37: style: Do not place spaces around code in parentheses or square brackets.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                    ^

R/DEploidR.R:20:38: style: Variable or function name should be snake_case.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                     ^~~~~~~~~~~

R/DEploidR.R:20:51: style: Variable or function name should be snake_case.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                                  ^~~~~~~~~~~

R/DEploidR.R:20:62: style: Do not place spaces around code in parentheses or square brackets.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                                             ^

R/DEploidR.R:23:12: style: Remove spaces before the left parenthesis in a function call.

return ( data.frame( CHROM = ref[, 1],
           ^

R/DEploidR.R:23:13: style: Do not place spaces around code in parentheses or square brackets.

return ( data.frame( CHROM = ref[, 1],
            ^

R/DEploidR.R:23:25: style: Do not place spaces around code in parentheses or square brackets.

return ( data.frame( CHROM = ref[, 1],
                        ^

R/DEploidR.R:26:45: style: Do not place spaces around code in parentheses or square brackets.

altCount = alt[, 3] )
                                            ^

R/DEploidR.R:35:1: style: Lines should not be more than 80 characters.

#' @note The VCF file should only contain one sample. If more samples present in the VCF, it only returns coverage for of the first sample.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:39:1: style: Lines should not be more than 80 characters.

#' @param ADFieldIndex Index of the AD field of the sample field. For example, if the format is "GT:AD:DP:GQ:PL", the AD index is 2 (by default).
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:41:1: style: Lines should not be more than 80 characters.

#' @return A data.frame contains four columns: chromosomes, positions, reference allele count, alternative allele count.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:49:1: style: Variable or function name should be snake_case.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
^~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:49:36: style: Remove spaces before the left parenthesis in a function call.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                   ^

R/DEploidR.R:49:37: style: Do not place spaces around code in parentheses or square brackets.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                    ^

R/DEploidR.R:49:38: style: Variable or function name should be snake_case.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                     ^~~~~~~~~~~

R/DEploidR.R:49:51: style: Variable or function name should be snake_case.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                                  ^~~~~~~~~~~~

R/DEploidR.R:49:67: style: Do not place spaces around code in parentheses or square brackets.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                                                  ^

R/DEploidR.R:52:14: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
             ^

R/DEploidR.R:52:19: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
                  ^

R/DEploidR.R:52:26: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
                         ^

R/DEploidR.R:52:50: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
                                                 ^

R/DEploidR.R:52:52: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
                                                   ^

R/DEploidR.R:53:24: style: Do not place spaces around code in parentheses or square brackets.

​         invokeRestart( "muffleWarning" )
                       ^

R/DEploidR.R:53:40: style: Do not place spaces around code in parentheses or square brackets.

​         invokeRestart( "muffleWarning" )
                                       ^

R/DEploidR.R:57:5: style: Variable or function name should be snake_case.

numberOfHeaderLines <- 0
    ^~~~~~~~~~~~~~~~~~~

R/DEploidR.R:58:33: style: Do not place spaces around code in parentheses or square brackets.

line <- withCallingHandlers( readLines(gzf, n = 1), warning = h)
                                ^

R/DEploidR.R:59:12: style: Do not place spaces around code in parentheses or square brackets.

while ( length(line) > 0 ){
           ^

R/DEploidR.R:59:29: style: Do not place spaces around code in parentheses or square brackets.

while ( length(line) > 0 ){
                            ^

R/DEploidR.R:60:29: style: Do not place spaces around code in parentheses or square brackets.

if (grepl("##", line )){
                            ^

R/DEploidR.R:61:13: style: Variable or function name should be snake_case.

numberOfHeaderLines <- numberOfHeaderLines + 1
            ^~~~~~~~~~~~~~~~~~~

R/DEploidR.R:65:37: style: Do not place spaces around code in parentheses or square brackets.

line <- withCallingHandlers( readLines(gzf, n = 1), warning = h)
                                    ^

R/DEploidR.R:69:23: style: Do not place spaces around code in parentheses or square brackets.

vcf <- read.table( gzfile(vcfFileName), skip = numberOfHeaderLines,
                      ^

R/DEploidR.R:73:5: style: Variable or function name should be snake_case.

sampleName <- names(vcf)[10]
    ^~~~~~~~~~

R/DEploidR.R:78:5: style: Variable or function name should be snake_case.

tmpCovStr <- unlist(lapply(field, `[[`, ADFieldIndex))
    ^~~~~~~~~

R/DEploidR.R:79:5: style: Variable or function name should be snake_case.

tmpCov <- strsplit(as.character(tmpCovStr), ",")
    ^~~~~~

R/DEploidR.R:81:5: style: Variable or function name should be snake_case.

refCount <- as.numeric(unlist(lapply(tmpCov, `[[`, 1)))
    ^~~~~~~~

R/DEploidR.R:82:5: style: Variable or function name should be snake_case.

altCount <- as.numeric(unlist(lapply(tmpCov, `[[`, 2)))
    ^~~~~~~~

R/DEploidR.R:84:12: style: Remove spaces before the left parenthesis in a function call.

return ( data.frame( CHROM = vcf[, 1],
           ^

R/DEploidR.R:84:13: style: Do not place spaces around code in parentheses or square brackets.

return ( data.frame( CHROM = vcf[, 1],
            ^

R/DEploidR.R:84:25: style: Do not place spaces around code in parentheses or square brackets.

return ( data.frame( CHROM = vcf[, 1],
                        ^

R/DEploidR.R:87:45: style: Do not place spaces around code in parentheses or square brackets.

altCount = altCount )
                                            ^

R/DEploidR.R:96:1: style: Lines should not be more than 80 characters.

#' @note The text file must have header, and population level allele frequency recorded in the "PLAF" field.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:105:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:108:1: style: Variable or function name should be snake_case.

extractPLAF <- function ( plafFileName ){
^~~~~~~~~~~

R/DEploidR.R:108:25: style: Remove spaces before the left parenthesis in a function call.

extractPLAF <- function ( plafFileName ){
                        ^

R/DEploidR.R:108:26: style: Do not place spaces around code in parentheses or square brackets.

extractPLAF <- function ( plafFileName ){
                         ^

R/DEploidR.R:108:27: style: Variable or function name should be snake_case.

extractPLAF <- function ( plafFileName ){
                          ^~~~~~~~~~~~

R/DEploidR.R:108:39: style: Do not place spaces around code in parentheses or square brackets.

extractPLAF <- function ( plafFileName ){
                                      ^

R/DEploidR.R:109:12: style: Remove spaces before the left parenthesis in a function call.

return ( read.table(plafFileName, header = T)$PLAF )
           ^

R/DEploidR.R:109:13: style: Do not place spaces around code in parentheses or square brackets.

return ( read.table(plafFileName, header = T)$PLAF )
            ^

R/DEploidR.R:109:55: style: Do not place spaces around code in parentheses or square brackets.

return ( read.table(plafFileName, header = T)$PLAF )
                                                      ^

R/DEploidR.R:115:1: style: Lines should not be more than 80 characters.

#' @description Plot the MCMC samples of the proportion, indexed by the MCMC chain.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:117:1: style: Lines should not be more than 80 characters.

#' @param proportions Matrix of the MCMC proportion samples. The matrix size is number of the MCMC samples by the number of strains.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:131:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:132:1: style: Lines should not be more than 80 characters.

#' panelFile = system.file("extdata", "labStrains.test.panel.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:138:1: style: Lines should not be more than 80 characters.

#' plotProportions( PG0390CoverageTxt.deconv$Proportions, "PG0390-C proportions" )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:141:1: style: Variable or function name should be snake_case.

plotProportions <- function (proportions, title = "Components",
^~~~~~~~~~~~~~~

R/DEploidR.R:141:29: style: Remove spaces before the left parenthesis in a function call.

plotProportions <- function (proportions, title = "Components",
                            ^

R/DEploidR.R:142:24: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                       ^~~~~~~

R/DEploidR.R:142:37: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                    ^~~~~~~~

R/DEploidR.R:142:51: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                  ^~~~~~~~

R/DEploidR.R:142:63: style: Do not place spaces around code in parentheses or square brackets.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                              ^

R/DEploidR.R:143:5: style: Variable or function name should be snake_case.

rainbowColorBin <- 16
    ^~~~~~~~~~~~~~~

R/DEploidR.R:153:1: style: Lines should not be more than 80 characters.

#' @description Plot alternative allele count vs reference allele count at each site.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:161:1: style: Lines should not be more than 80 characters.

#' @param exclude.ref Numeric array of reference allele count at sites that are not deconvoluted.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:163:1: style: Lines should not be more than 80 characters.

#' @param exclude.alt Numeric array of alternative allele count at sites that are not deconvoluted
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:187:1: style: Variable or function name should be snake_case.

plotAltVsRef <- function ( ref, alt, title = "Alt vs Ref",
^~~~~~~~~~~~

R/DEploidR.R:187:26: style: Remove spaces before the left parenthesis in a function call.

plotAltVsRef <- function ( ref, alt, title = "Alt vs Ref",
                         ^

R/DEploidR.R:187:27: style: Do not place spaces around code in parentheses or square brackets.

plotAltVsRef <- function ( ref, alt, title = "Alt vs Ref",
                          ^

R/DEploidR.R:188:21: style: Variable or function name should be snake_case.

exclude.ref = c(), exclude.alt = c(),
                    ^~~~~~~~~~~

R/DEploidR.R:188:40: style: Variable or function name should be snake_case.

exclude.ref = c(), exclude.alt = c(),
                                       ^~~~~~~~~~~

R/DEploidR.R:189:21: style: Variable or function name should be snake_case.

potentialOutliers = c(), cex.lab = 1, cex.main = 1,
                    ^~~~~~~~~~~~~~~~~

R/DEploidR.R:189:46: style: Variable or function name should be snake_case.

potentialOutliers = c(), cex.lab = 1, cex.main = 1,
                                             ^~~~~~~

R/DEploidR.R:189:59: style: Variable or function name should be snake_case.

potentialOutliers = c(), cex.lab = 1, cex.main = 1,
                                                          ^~~~~~~~

R/DEploidR.R:190:21: style: Variable or function name should be snake_case.

cex.axis = 1 ){
                    ^~~~~~~~

R/DEploidR.R:190:33: style: Do not place spaces around code in parentheses or square brackets.

cex.axis = 1 ){
                                ^

R/DEploidR.R:194:5: style: Variable or function name should be snake_case.

tmpRange <- 1.1 * mean(max(alt), max(ref))
    ^~~~~~~~

R/DEploidR.R:195:10: style: Remove spaces before the left parenthesis in a function call.

​    plot ( ref, alt, xlim = c(0, tmpRange), ylim = c(0, tmpRange),
         ^

R/DEploidR.R:195:11: style: Do not place spaces around code in parentheses or square brackets.

​    plot ( ref, alt, xlim = c(0, tmpRange), ylim = c(0, tmpRange),
          ^

R/DEploidR.R:210:9: style: Do not place spaces around code in parentheses or square brackets.

if ( length(potentialOutliers) > 0 ){
        ^

R/DEploidR.R:210:39: style: Do not place spaces around code in parentheses or square brackets.

if ( length(potentialOutliers) > 0 ){
                                      ^

R/DEploidR.R:242:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageTxt$altCount, PG0390CoverageTxt$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:249:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageVcf$altCount, PG0390CoverageVcf$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:253:1: style: Variable or function name should be snake_case.

histWSAF <- function ( obsWSAF, exclusive = TRUE,
^~~~~~~~

R/DEploidR.R:253:22: style: Remove spaces before the left parenthesis in a function call.

histWSAF <- function ( obsWSAF, exclusive = TRUE,
                     ^

R/DEploidR.R:253:23: style: Do not place spaces around code in parentheses or square brackets.

histWSAF <- function ( obsWSAF, exclusive = TRUE,
                      ^

R/DEploidR.R:253:24: style: Variable or function name should be snake_case.

histWSAF <- function ( obsWSAF, exclusive = TRUE,
                       ^~~~~~~

R/DEploidR.R:255:17: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                ^~~~~~~

R/DEploidR.R:255:30: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                             ^~~~~~~~

R/DEploidR.R:255:44: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                           ^~~~~~~~

R/DEploidR.R:255:56: style: Do not place spaces around code in parentheses or square brackets.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                       ^

R/DEploidR.R:256:5: style: Variable or function name should be snake_case.

tmpWSAFIndex <- 1:length(obsWSAF)
    ^~~~~~~~~~~~

R/DEploidR.R:257:9: style: Do not place spaces around code in parentheses or square brackets.

if ( exclusive ){
        ^

R/DEploidR.R:257:19: style: Do not place spaces around code in parentheses or square brackets.

if ( exclusive ){
                  ^

R/DEploidR.R:258:9: style: Variable or function name should be snake_case.

tmpWSAFIndex <- which( ( (obsWSAF < 1) * (obsWSAF > 0) ) == 1)
        ^~~~~~~~~~~~

R/DEploidR.R:258:31: style: Do not place spaces around code in parentheses or square brackets.

tmpWSAFIndex <- which( ( (obsWSAF < 1) * (obsWSAF > 0) ) == 1)
                              ^

R/DEploidR.R:258:33: style: Do not place spaces around code in parentheses or square brackets.

tmpWSAFIndex <- which( ( (obsWSAF < 1) * (obsWSAF > 0) ) == 1)
                                ^

R/DEploidR.R:258:63: style: Do not place spaces around code in parentheses or square brackets.

tmpWSAFIndex <- which( ( (obsWSAF < 1) * (obsWSAF > 0) ) == 1)
                                                              ^

R/DEploidR.R:260:12: style: Remove spaces before the left parenthesis in a function call.

return (hist(obsWSAF[tmpWSAFIndex], main = title,
           ^

R/DEploidR.R:273:1: style: Lines should not be more than 80 characters.

#' @param obsWSAF Numeric array of observed altenative allele frequencies within sample.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:294:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageTxt$altCount, PG0390CoverageTxt$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:295:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:302:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageVcf$altCount, PG0390CoverageVcf$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:303:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:307:1: style: Variable or function name should be snake_case.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
^~~~~~~~~~~~~~

R/DEploidR.R:307:28: style: Remove spaces before the left parenthesis in a function call.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
                           ^

R/DEploidR.R:307:29: style: Do not place spaces around code in parentheses or square brackets.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
                            ^

R/DEploidR.R:307:36: style: Variable or function name should be snake_case.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
                                   ^~~~~~~

R/DEploidR.R:307:45: style: Variable or function name should be snake_case.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
                                            ^~~~~~~

R/DEploidR.R:308:23: style: Variable or function name should be snake_case.

potentialOutliers = c(), title = "WSAF vs PLAF",
                      ^~~~~~~~~~~~~~~~~

R/DEploidR.R:309:23: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                      ^~~~~~~

R/DEploidR.R:309:36: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                   ^~~~~~~~

R/DEploidR.R:309:50: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                 ^~~~~~~~

R/DEploidR.R:309:62: style: Do not place spaces around code in parentheses or square brackets.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                             ^

R/DEploidR.R:310:10: style: Remove spaces before the left parenthesis in a function call.

​    plot ( plaf, obsWSAF, cex = 0.5, xlim = c(0, 1), ylim = c(0, 1),
         ^

R/DEploidR.R:310:11: style: Do not place spaces around code in parentheses or square brackets.

​    plot ( plaf, obsWSAF, cex = 0.5, xlim = c(0, 1), ylim = c(0, 1),
          ^

R/DEploidR.R:313:9: style: Do not place spaces around code in parentheses or square brackets.

if ( length(expWSAF) > 0 ){
        ^

R/DEploidR.R:313:29: style: Do not place spaces around code in parentheses or square brackets.

if ( length(expWSAF) > 0 ){
                            ^

R/DEploidR.R:314:16: style: Remove spaces before the left parenthesis in a function call.

​        points ( plaf, expWSAF, cex = 0.5, col = "blue")
               ^

R/DEploidR.R:314:17: style: Do not place spaces around code in parentheses or square brackets.

​        points ( plaf, expWSAF, cex = 0.5, col = "blue")
                ^

R/DEploidR.R:316:9: style: Do not place spaces around code in parentheses or square brackets.

if ( length(potentialOutliers) > 0 ){
        ^

R/DEploidR.R:316:39: style: Do not place spaces around code in parentheses or square brackets.

if ( length(potentialOutliers) > 0 ){
                                      ^

R/DEploidR.R:326:1: style: Lines should not be more than 80 characters.

#' @description Plot observed alternative allele frequency within sample against expected WSAF.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:346:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageVcf$altCount, PG0390CoverageVcf$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:347:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:348:1: style: Lines should not be more than 80 characters.

#' PG0390CoverageVcf.deconv = dEploid(paste("-vcf", vcfFile, "-plaf", plafFile, "-noPanel"))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:349:1: style: Lines should not be more than 80 characters.

#' prop = PG0390CoverageVcf.deconv$Proportions[dim(PG0390CoverageVcf.deconv$Proportions)[1],]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:354:1: style: Variable or function name should be snake_case.

plotObsExpWSAF <- function (obsWSAF, expWSAF,
^~~~~~~~~~~~~~

R/DEploidR.R:354:28: style: Remove spaces before the left parenthesis in a function call.

plotObsExpWSAF <- function (obsWSAF, expWSAF,
                           ^

R/DEploidR.R:354:29: style: Variable or function name should be snake_case.

plotObsExpWSAF <- function (obsWSAF, expWSAF,
                            ^~~~~~~

R/DEploidR.R:354:38: style: Variable or function name should be snake_case.

plotObsExpWSAF <- function (obsWSAF, expWSAF,
                                     ^~~~~~~

R/DEploidR.R:356:23: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                      ^~~~~~~

R/DEploidR.R:356:36: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                   ^~~~~~~~

R/DEploidR.R:356:50: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                 ^~~~~~~~

R/DEploidR.R:356:62: style: Do not place spaces around code in parentheses or square brackets.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                             ^

R/DEploidR.R:367:1: style: Lines should not be more than 80 characters.

#' @description Compute observed allele frequency within sample from the allele counts.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:384:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageTxt$altCount, PG0390CoverageTxt$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:389:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageVcf$altCount, PG0390CoverageVcf$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:391:1: style: Variable or function name should be snake_case.

computeObsWSAF <- function (alt, ref) {
^~~~~~~~~~~~~~

R/DEploidR.R:391:28: style: Remove spaces before the left parenthesis in a function call.

computeObsWSAF <- function (alt, ref) {
                           ^

R/DEploidR.R:392:12: style: Remove spaces before the left parenthesis in a function call.

return ( alt / (ref + alt + 0.00000001) )
           ^

R/DEploidR.R:392:13: style: Do not place spaces around code in parentheses or square brackets.

return ( alt / (ref + alt + 0.00000001) )
            ^

R/DEploidR.R:392:44: style: Do not place spaces around code in parentheses or square brackets.

return ( alt / (ref + alt + 0.00000001) )
                                           ^

R/DEploidR.R:398:1: style: Lines should not be more than 80 characters.

#' @description Plot the posterior probabilities of a haplotype given the refernece panel.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:400:1: style: Lines should not be more than 80 characters.

#' @param posteriorProbabilities Posterior probabilities matrix with the size of number of loci by the number of reference strain.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:410:1: style: Variable or function name should be snake_case.

haplotypePainter <- function (posteriorProbabilities, title = "", labelScaling,
^~~~~~~~~~~~~~~~

R/DEploidR.R:410:30: style: Remove spaces before the left parenthesis in a function call.

haplotypePainter <- function (posteriorProbabilities, title = "", labelScaling,
                             ^

R/DEploidR.R:410:31: style: Variable or function name should be snake_case.

haplotypePainter <- function (posteriorProbabilities, title = "", labelScaling,
                              ^~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:410:67: style: Variable or function name should be snake_case.

haplotypePainter <- function (posteriorProbabilities, title = "", labelScaling,
                                                                  ^~~~~~~~~~~~

R/DEploidR.R:411:25: style: Variable or function name should be snake_case.

numberOfInbreeding = 0){
                        ^~~~~~~~~~~~~~~~~~

R/DEploidR.R:412:5: style: Variable or function name should be snake_case.

rainbowColorBin <- 16
    ^~~~~~~~~~~~~~~

R/DEploidR.R:413:5: style: Variable or function name should be snake_case.

rainbowColors <- rainbow(rainbowColorBin)
    ^~~~~~~~~~~~~

R/DEploidR.R:414:9: style: Do not place spaces around code in parentheses or square brackets.

if ( numberOfInbreeding > 0 ){
        ^

R/DEploidR.R:414:32: style: Do not place spaces around code in parentheses or square brackets.

if ( numberOfInbreeding > 0 ){
                               ^

R/DEploidR.R:415:9: style: Variable or function name should be snake_case.

panelSize <- dim(posteriorProbabilities)[2] - numberOfInbreeding
        ^~~~~~~~~

R/DEploidR.R:416:9: style: Variable or function name should be snake_case.

rainbowColors <- c(rep("#46a8e1", panelSize),
        ^~~~~~~~~~~~~

R/DEploidR.R:424:5: style: Variable or function name should be snake_case.

newXaxt <- round(seq(1, dim(posteriorProbabilities)[1], length.out = 6))
    ^~~~~~~

R/DEploidR.R:427:5: style: Variable or function name should be snake_case.

newYaxt <- seq(0, 1, length.out = 3)
    ^~~~~~~

tests/testthat/test-DEploid_tools.R:3:1: style: Variable or function name should be snake_case.

vcfFileName <- system.file("extdata", "PG0390-C.test.vcf.gz",
^~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:5:1: style: Variable or function name should be snake_case.

plafFileName <- system.file("extdata", "labStrains.test.PLAF.txt",
^~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:7:1: style: Variable or function name should be snake_case.

panelFileName <- system.file("extdata", "labStrains.test.panel.txt",
^~~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:9:1: style: Variable or function name should be snake_case.

refFileName <- system.file("extdata", "PG0390-C.test.ref", package = "DEploid")
^~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:10:1: style: Variable or function name should be snake_case.

altFileName <- system.file("extdata", "PG0390-C.test.alt", package = "DEploid")
^~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:12:1: style: Variable or function name should be snake_case.

PG0390CoverageVcf <- extractCoverageFromVcf(vcfFileName)
^~~~~~~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:15:1: style: Variable or function name should be snake_case.

PG0390Deconv <- dEploid(paste("-vcf", vcfFileName, "-plaf", plafFileName,
^~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:18:1: style: Variable or function name should be snake_case.

expWSAF <- t(PG0390Deconv$Haps) %*% prop
^~~~~~~

tests/testthat/test-DEploid_tools.R:21:5: style: Variable or function name should be snake_case.

PG0390CoverageTxt <- extractCoverageFromTxt(refFileName, altFileName)
    ^~~~~~~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:44:5: style: Variable or function name should be snake_case.

obsWSAF <- computeObsWSAF(PG0390CoverageVcf$altCount,
    ^~~~~~~

tests/testthat/test-DEploid_tools.R:54:30: style: Do not place spaces around code in parentheses or square brackets.

​    expect_null(plotAltVsRef( PG0390CoverageVcf$refCount,
                             ^

tests/testthat/test-DEploid_tools.R:55:35: style: Do not place spaces around code in parentheses or square brackets.

PG0390CoverageVcf$altCount ))
                                  ^

tests/testthat/test-dEploid.R:3:1: style: Variable or function name should be snake_case.

vcfFileName <- system.file("extdata", "PG0390-C.test.vcf.gz",
^~~~~~~~~~~

tests/testthat/test-dEploid.R:5:1: style: Variable or function name should be snake_case.

plafFileName <- system.file("extdata", "labStrains.test.PLAF.txt",
^~~~~~~~~~~~

@lintr-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

R/dEploid.R:5:1: style: Lines should not be more than 80 characters.

#' (MCMC) approaches, and builds a generic framework that allows haplotype searches
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploid.R:6:1: style: Lines should not be more than 80 characters.

#' in a multiple infection setting. This package is primarily developed as part of
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploid.R:8:1: style: Lines should not be more than 80 characters.

#' sequencing technologies to provide a high-resolution view of natural variation
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploid.R:9:1: style: Lines should not be more than 80 characters.

#' in the malaria parasite Plasmodium falciparum. Parasite DNA are extracted from
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploid.R:10:1: style: Lines should not be more than 80 characters.

#' patient blood sample, which often contains more than one parasite strain, with
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:3:1: style: Lines should not be more than 80 characters.

#' @description Extract read counts from tab-delimited text files of a single sample.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:5:1: style: Lines should not be more than 80 characters.

#' @note The allele count files must be tab-delimited. The allele count files contain three columns: chromosomes, positions and allele count.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:11:1: style: Lines should not be more than 80 characters.

#' @return A data.frame contains four columns: chromosomes, positions, reference allele count, alternative allele count.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:20:1: style: Variable or function name should be snake_case.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
^~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:20:36: style: Remove spaces before the left parenthesis in a function call.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                   ^

R/DEploidR.R:20:37: style: Do not place spaces around code in parentheses or square brackets.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                    ^

R/DEploidR.R:20:38: style: Variable or function name should be snake_case.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                     ^~~~~~~~~~~

R/DEploidR.R:20:51: style: Variable or function name should be snake_case.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                                  ^~~~~~~~~~~

R/DEploidR.R:20:62: style: Do not place spaces around code in parentheses or square brackets.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                                             ^

R/DEploidR.R:23:12: style: Remove spaces before the left parenthesis in a function call.

return ( data.frame( CHROM = ref[, 1],
           ^

R/DEploidR.R:23:13: style: Do not place spaces around code in parentheses or square brackets.

return ( data.frame( CHROM = ref[, 1],
            ^

R/DEploidR.R:23:25: style: Do not place spaces around code in parentheses or square brackets.

return ( data.frame( CHROM = ref[, 1],
                        ^

R/DEploidR.R:26:45: style: Do not place spaces around code in parentheses or square brackets.

altCount = alt[, 3] )
                                            ^

R/DEploidR.R:35:1: style: Lines should not be more than 80 characters.

#' @note The VCF file should only contain one sample. If more samples present in the VCF, it only returns coverage for of the first sample.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:39:1: style: Lines should not be more than 80 characters.

#' @param ADFieldIndex Index of the AD field of the sample field. For example, if the format is "GT:AD:DP:GQ:PL", the AD index is 2 (by default).
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:41:1: style: Lines should not be more than 80 characters.

#' @return A data.frame contains four columns: chromosomes, positions, reference allele count, alternative allele count.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:49:1: style: Variable or function name should be snake_case.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
^~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:49:36: style: Remove spaces before the left parenthesis in a function call.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                   ^

R/DEploidR.R:49:37: style: Do not place spaces around code in parentheses or square brackets.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                    ^

R/DEploidR.R:49:38: style: Variable or function name should be snake_case.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                     ^~~~~~~~~~~

R/DEploidR.R:49:51: style: Variable or function name should be snake_case.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                                  ^~~~~~~~~~~~

R/DEploidR.R:49:67: style: Do not place spaces around code in parentheses or square brackets.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                                                  ^

R/DEploidR.R:52:14: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
             ^

R/DEploidR.R:52:19: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
                  ^

R/DEploidR.R:52:26: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
                         ^

R/DEploidR.R:52:50: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
                                                 ^

R/DEploidR.R:52:52: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
                                                   ^

R/DEploidR.R:53:24: style: Do not place spaces around code in parentheses or square brackets.

​         invokeRestart( "muffleWarning" )
                       ^

R/DEploidR.R:53:40: style: Do not place spaces around code in parentheses or square brackets.

​         invokeRestart( "muffleWarning" )
                                       ^

R/DEploidR.R:57:5: style: Variable or function name should be snake_case.

numberOfHeaderLines <- 0
    ^~~~~~~~~~~~~~~~~~~

R/DEploidR.R:58:33: style: Do not place spaces around code in parentheses or square brackets.

line <- withCallingHandlers( readLines(gzf, n = 1), warning = h)
                                ^

R/DEploidR.R:59:12: style: Do not place spaces around code in parentheses or square brackets.

while ( length(line) > 0 ){
           ^

R/DEploidR.R:59:29: style: Do not place spaces around code in parentheses or square brackets.

while ( length(line) > 0 ){
                            ^

R/DEploidR.R:60:29: style: Do not place spaces around code in parentheses or square brackets.

if (grepl("##", line )){
                            ^

R/DEploidR.R:61:13: style: Variable or function name should be snake_case.

numberOfHeaderLines <- numberOfHeaderLines + 1
            ^~~~~~~~~~~~~~~~~~~

R/DEploidR.R:65:37: style: Do not place spaces around code in parentheses or square brackets.

line <- withCallingHandlers( readLines(gzf, n = 1), warning = h)
                                    ^

R/DEploidR.R:69:23: style: Do not place spaces around code in parentheses or square brackets.

vcf <- read.table( gzfile(vcfFileName), skip = numberOfHeaderLines,
                      ^

R/DEploidR.R:73:5: style: Variable or function name should be snake_case.

sampleName <- names(vcf)[10]
    ^~~~~~~~~~

R/DEploidR.R:78:5: style: Variable or function name should be snake_case.

tmpCovStr <- unlist(lapply(field, `[[`, ADFieldIndex))
    ^~~~~~~~~

R/DEploidR.R:79:5: style: Variable or function name should be snake_case.

tmpCov <- strsplit(as.character(tmpCovStr), ",")
    ^~~~~~

R/DEploidR.R:81:5: style: Variable or function name should be snake_case.

refCount <- as.numeric(unlist(lapply(tmpCov, `[[`, 1)))
    ^~~~~~~~

R/DEploidR.R:82:5: style: Variable or function name should be snake_case.

altCount <- as.numeric(unlist(lapply(tmpCov, `[[`, 2)))
    ^~~~~~~~

R/DEploidR.R:84:12: style: Remove spaces before the left parenthesis in a function call.

return ( data.frame( CHROM = vcf[, 1],
           ^

R/DEploidR.R:84:13: style: Do not place spaces around code in parentheses or square brackets.

return ( data.frame( CHROM = vcf[, 1],
            ^

R/DEploidR.R:84:25: style: Do not place spaces around code in parentheses or square brackets.

return ( data.frame( CHROM = vcf[, 1],
                        ^

R/DEploidR.R:87:45: style: Do not place spaces around code in parentheses or square brackets.

altCount = altCount )
                                            ^

R/DEploidR.R:96:1: style: Lines should not be more than 80 characters.

#' @note The text file must have header, and population level allele frequency recorded in the "PLAF" field.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:105:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:108:1: style: Variable or function name should be snake_case.

extractPLAF <- function ( plafFileName ){
^~~~~~~~~~~

R/DEploidR.R:108:25: style: Remove spaces before the left parenthesis in a function call.

extractPLAF <- function ( plafFileName ){
                        ^

R/DEploidR.R:108:26: style: Do not place spaces around code in parentheses or square brackets.

extractPLAF <- function ( plafFileName ){
                         ^

R/DEploidR.R:108:27: style: Variable or function name should be snake_case.

extractPLAF <- function ( plafFileName ){
                          ^~~~~~~~~~~~

R/DEploidR.R:108:39: style: Do not place spaces around code in parentheses or square brackets.

extractPLAF <- function ( plafFileName ){
                                      ^

R/DEploidR.R:109:12: style: Remove spaces before the left parenthesis in a function call.

return ( read.table(plafFileName, header = T)$PLAF )
           ^

R/DEploidR.R:109:13: style: Do not place spaces around code in parentheses or square brackets.

return ( read.table(plafFileName, header = T)$PLAF )
            ^

R/DEploidR.R:109:55: style: Do not place spaces around code in parentheses or square brackets.

return ( read.table(plafFileName, header = T)$PLAF )
                                                      ^

R/DEploidR.R:115:1: style: Lines should not be more than 80 characters.

#' @description Plot the MCMC samples of the proportion, indexed by the MCMC chain.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:117:1: style: Lines should not be more than 80 characters.

#' @param proportions Matrix of the MCMC proportion samples. The matrix size is number of the MCMC samples by the number of strains.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:131:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:132:1: style: Lines should not be more than 80 characters.

#' panelFile = system.file("extdata", "labStrains.test.panel.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:138:1: style: Lines should not be more than 80 characters.

#' plotProportions( PG0390CoverageTxt.deconv$Proportions, "PG0390-C proportions" )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:141:1: style: Variable or function name should be snake_case.

plotProportions <- function (proportions, title = "Components",
^~~~~~~~~~~~~~~

R/DEploidR.R:141:29: style: Remove spaces before the left parenthesis in a function call.

plotProportions <- function (proportions, title = "Components",
                            ^

R/DEploidR.R:142:24: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                       ^~~~~~~

R/DEploidR.R:142:37: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                    ^~~~~~~~

R/DEploidR.R:142:51: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                  ^~~~~~~~

R/DEploidR.R:142:63: style: Do not place spaces around code in parentheses or square brackets.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                              ^

R/DEploidR.R:143:5: style: Variable or function name should be snake_case.

rainbowColorBin <- 16
    ^~~~~~~~~~~~~~~

R/DEploidR.R:153:1: style: Lines should not be more than 80 characters.

#' @description Plot alternative allele count vs reference allele count at each site.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:161:1: style: Lines should not be more than 80 characters.

#' @param exclude.ref Numeric array of reference allele count at sites that are not deconvoluted.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:163:1: style: Lines should not be more than 80 characters.

#' @param exclude.alt Numeric array of alternative allele count at sites that are not deconvoluted
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:187:1: style: Variable or function name should be snake_case.

plotAltVsRef <- function ( ref, alt, title = "Alt vs Ref",
^~~~~~~~~~~~

R/DEploidR.R:187:26: style: Remove spaces before the left parenthesis in a function call.

plotAltVsRef <- function ( ref, alt, title = "Alt vs Ref",
                         ^

R/DEploidR.R:187:27: style: Do not place spaces around code in parentheses or square brackets.

plotAltVsRef <- function ( ref, alt, title = "Alt vs Ref",
                          ^

R/DEploidR.R:188:21: style: Variable or function name should be snake_case.

exclude.ref = c(), exclude.alt = c(),
                    ^~~~~~~~~~~

R/DEploidR.R:188:40: style: Variable or function name should be snake_case.

exclude.ref = c(), exclude.alt = c(),
                                       ^~~~~~~~~~~

R/DEploidR.R:189:21: style: Variable or function name should be snake_case.

potentialOutliers = c(), cex.lab = 1, cex.main = 1,
                    ^~~~~~~~~~~~~~~~~

R/DEploidR.R:189:46: style: Variable or function name should be snake_case.

potentialOutliers = c(), cex.lab = 1, cex.main = 1,
                                             ^~~~~~~

R/DEploidR.R:189:59: style: Variable or function name should be snake_case.

potentialOutliers = c(), cex.lab = 1, cex.main = 1,
                                                          ^~~~~~~~

R/DEploidR.R:190:21: style: Variable or function name should be snake_case.

cex.axis = 1 ){
                    ^~~~~~~~

R/DEploidR.R:190:33: style: Do not place spaces around code in parentheses or square brackets.

cex.axis = 1 ){
                                ^

R/DEploidR.R:194:5: style: Variable or function name should be snake_case.

tmpRange <- 1.1 * mean(max(alt), max(ref))
    ^~~~~~~~

R/DEploidR.R:195:10: style: Remove spaces before the left parenthesis in a function call.

​    plot ( ref, alt, xlim = c(0, tmpRange), ylim = c(0, tmpRange),
         ^

R/DEploidR.R:195:11: style: Do not place spaces around code in parentheses or square brackets.

​    plot ( ref, alt, xlim = c(0, tmpRange), ylim = c(0, tmpRange),
          ^

R/DEploidR.R:210:9: style: Do not place spaces around code in parentheses or square brackets.

if ( length(potentialOutliers) > 0 ){
        ^

R/DEploidR.R:210:39: style: Do not place spaces around code in parentheses or square brackets.

if ( length(potentialOutliers) > 0 ){
                                      ^

R/DEploidR.R:242:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageTxt$altCount, PG0390CoverageTxt$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:249:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageVcf$altCount, PG0390CoverageVcf$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:253:1: style: Variable or function name should be snake_case.

histWSAF <- function ( obsWSAF, exclusive = TRUE,
^~~~~~~~

R/DEploidR.R:253:22: style: Remove spaces before the left parenthesis in a function call.

histWSAF <- function ( obsWSAF, exclusive = TRUE,
                     ^

R/DEploidR.R:253:23: style: Do not place spaces around code in parentheses or square brackets.

histWSAF <- function ( obsWSAF, exclusive = TRUE,
                      ^

R/DEploidR.R:253:24: style: Variable or function name should be snake_case.

histWSAF <- function ( obsWSAF, exclusive = TRUE,
                       ^~~~~~~

R/DEploidR.R:255:17: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                ^~~~~~~

R/DEploidR.R:255:30: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                             ^~~~~~~~

R/DEploidR.R:255:44: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                           ^~~~~~~~

R/DEploidR.R:255:56: style: Do not place spaces around code in parentheses or square brackets.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                       ^

R/DEploidR.R:256:5: style: Variable or function name should be snake_case.

tmpWSAFIndex <- 1:length(obsWSAF)
    ^~~~~~~~~~~~

R/DEploidR.R:257:9: style: Do not place spaces around code in parentheses or square brackets.

if ( exclusive ){
        ^

R/DEploidR.R:257:19: style: Do not place spaces around code in parentheses or square brackets.

if ( exclusive ){
                  ^

R/DEploidR.R:258:9: style: Variable or function name should be snake_case.

tmpWSAFIndex <- which( ( (obsWSAF < 1) * (obsWSAF > 0) ) == 1)
        ^~~~~~~~~~~~

R/DEploidR.R:258:31: style: Do not place spaces around code in parentheses or square brackets.

tmpWSAFIndex <- which( ( (obsWSAF < 1) * (obsWSAF > 0) ) == 1)
                              ^

R/DEploidR.R:258:33: style: Do not place spaces around code in parentheses or square brackets.

tmpWSAFIndex <- which( ( (obsWSAF < 1) * (obsWSAF > 0) ) == 1)
                                ^

R/DEploidR.R:258:63: style: Do not place spaces around code in parentheses or square brackets.

tmpWSAFIndex <- which( ( (obsWSAF < 1) * (obsWSAF > 0) ) == 1)
                                                              ^

R/DEploidR.R:260:12: style: Remove spaces before the left parenthesis in a function call.

return (hist(obsWSAF[tmpWSAFIndex], main = title,
           ^

R/DEploidR.R:273:1: style: Lines should not be more than 80 characters.

#' @param obsWSAF Numeric array of observed altenative allele frequencies within sample.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:294:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageTxt$altCount, PG0390CoverageTxt$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:295:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:302:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageVcf$altCount, PG0390CoverageVcf$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:303:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:307:1: style: Variable or function name should be snake_case.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
^~~~~~~~~~~~~~

R/DEploidR.R:307:28: style: Remove spaces before the left parenthesis in a function call.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
                           ^

R/DEploidR.R:307:29: style: Do not place spaces around code in parentheses or square brackets.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
                            ^

R/DEploidR.R:307:36: style: Variable or function name should be snake_case.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
                                   ^~~~~~~

R/DEploidR.R:307:45: style: Variable or function name should be snake_case.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
                                            ^~~~~~~

R/DEploidR.R:308:23: style: Variable or function name should be snake_case.

potentialOutliers = c(), title = "WSAF vs PLAF",
                      ^~~~~~~~~~~~~~~~~

R/DEploidR.R:309:23: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                      ^~~~~~~

R/DEploidR.R:309:36: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                   ^~~~~~~~

R/DEploidR.R:309:50: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                 ^~~~~~~~

R/DEploidR.R:309:62: style: Do not place spaces around code in parentheses or square brackets.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                             ^

R/DEploidR.R:310:10: style: Remove spaces before the left parenthesis in a function call.

​    plot ( plaf, obsWSAF, cex = 0.5, xlim = c(0, 1), ylim = c(0, 1),
         ^

R/DEploidR.R:310:11: style: Do not place spaces around code in parentheses or square brackets.

​    plot ( plaf, obsWSAF, cex = 0.5, xlim = c(0, 1), ylim = c(0, 1),
          ^

R/DEploidR.R:313:9: style: Do not place spaces around code in parentheses or square brackets.

if ( length(expWSAF) > 0 ){
        ^

R/DEploidR.R:313:29: style: Do not place spaces around code in parentheses or square brackets.

if ( length(expWSAF) > 0 ){
                            ^

R/DEploidR.R:314:16: style: Remove spaces before the left parenthesis in a function call.

​        points ( plaf, expWSAF, cex = 0.5, col = "blue")
               ^

R/DEploidR.R:314:17: style: Do not place spaces around code in parentheses or square brackets.

​        points ( plaf, expWSAF, cex = 0.5, col = "blue")
                ^

R/DEploidR.R:316:9: style: Do not place spaces around code in parentheses or square brackets.

if ( length(potentialOutliers) > 0 ){
        ^

R/DEploidR.R:316:39: style: Do not place spaces around code in parentheses or square brackets.

if ( length(potentialOutliers) > 0 ){
                                      ^

R/DEploidR.R:326:1: style: Lines should not be more than 80 characters.

#' @description Plot observed alternative allele frequency within sample against expected WSAF.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:346:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageVcf$altCount, PG0390CoverageVcf$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:347:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:348:1: style: Lines should not be more than 80 characters.

#' PG0390CoverageVcf.deconv = dEploid(paste("-vcf", vcfFile, "-plaf", plafFile, "-noPanel"))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:349:1: style: Lines should not be more than 80 characters.

#' prop = PG0390CoverageVcf.deconv$Proportions[dim(PG0390CoverageVcf.deconv$Proportions)[1],]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:354:1: style: Variable or function name should be snake_case.

plotObsExpWSAF <- function (obsWSAF, expWSAF,
^~~~~~~~~~~~~~

R/DEploidR.R:354:28: style: Remove spaces before the left parenthesis in a function call.

plotObsExpWSAF <- function (obsWSAF, expWSAF,
                           ^

R/DEploidR.R:354:29: style: Variable or function name should be snake_case.

plotObsExpWSAF <- function (obsWSAF, expWSAF,
                            ^~~~~~~

R/DEploidR.R:354:38: style: Variable or function name should be snake_case.

plotObsExpWSAF <- function (obsWSAF, expWSAF,
                                     ^~~~~~~

R/DEploidR.R:356:23: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                      ^~~~~~~

R/DEploidR.R:356:36: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                   ^~~~~~~~

R/DEploidR.R:356:50: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                 ^~~~~~~~

R/DEploidR.R:356:62: style: Do not place spaces around code in parentheses or square brackets.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                             ^

R/DEploidR.R:367:1: style: Lines should not be more than 80 characters.

#' @description Compute observed allele frequency within sample from the allele counts.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:384:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageTxt$altCount, PG0390CoverageTxt$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:389:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageVcf$altCount, PG0390CoverageVcf$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:391:1: style: Variable or function name should be snake_case.

computeObsWSAF <- function (alt, ref) {
^~~~~~~~~~~~~~

R/DEploidR.R:391:28: style: Remove spaces before the left parenthesis in a function call.

computeObsWSAF <- function (alt, ref) {
                           ^

R/DEploidR.R:392:12: style: Remove spaces before the left parenthesis in a function call.

return ( alt / (ref + alt + 0.00000001) )
           ^

R/DEploidR.R:392:13: style: Do not place spaces around code in parentheses or square brackets.

return ( alt / (ref + alt + 0.00000001) )
            ^

R/DEploidR.R:392:44: style: Do not place spaces around code in parentheses or square brackets.

return ( alt / (ref + alt + 0.00000001) )
                                           ^

R/DEploidR.R:398:1: style: Lines should not be more than 80 characters.

#' @description Plot the posterior probabilities of a haplotype given the refernece panel.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:400:1: style: Lines should not be more than 80 characters.

#' @param posteriorProbabilities Posterior probabilities matrix with the size of number of loci by the number of reference strain.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:410:1: style: Variable or function name should be snake_case.

haplotypePainter <- function (posteriorProbabilities, title = "", labelScaling,
^~~~~~~~~~~~~~~~

R/DEploidR.R:410:30: style: Remove spaces before the left parenthesis in a function call.

haplotypePainter <- function (posteriorProbabilities, title = "", labelScaling,
                             ^

R/DEploidR.R:410:31: style: Variable or function name should be snake_case.

haplotypePainter <- function (posteriorProbabilities, title = "", labelScaling,
                              ^~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:410:67: style: Variable or function name should be snake_case.

haplotypePainter <- function (posteriorProbabilities, title = "", labelScaling,
                                                                  ^~~~~~~~~~~~

R/DEploidR.R:411:25: style: Variable or function name should be snake_case.

numberOfInbreeding = 0){
                        ^~~~~~~~~~~~~~~~~~

R/DEploidR.R:412:5: style: Variable or function name should be snake_case.

rainbowColorBin <- 16
    ^~~~~~~~~~~~~~~

R/DEploidR.R:413:5: style: Variable or function name should be snake_case.

rainbowColors <- rainbow(rainbowColorBin)
    ^~~~~~~~~~~~~

R/DEploidR.R:414:9: style: Do not place spaces around code in parentheses or square brackets.

if ( numberOfInbreeding > 0 ){
        ^

R/DEploidR.R:414:32: style: Do not place spaces around code in parentheses or square brackets.

if ( numberOfInbreeding > 0 ){
                               ^

R/DEploidR.R:415:9: style: Variable or function name should be snake_case.

panelSize <- dim(posteriorProbabilities)[2] - numberOfInbreeding
        ^~~~~~~~~

R/DEploidR.R:416:9: style: Variable or function name should be snake_case.

rainbowColors <- c(rep("#46a8e1", panelSize),
        ^~~~~~~~~~~~~

R/DEploidR.R:424:5: style: Variable or function name should be snake_case.

newXaxt <- round(seq(1, dim(posteriorProbabilities)[1], length.out = 6))
    ^~~~~~~

R/DEploidR.R:427:5: style: Variable or function name should be snake_case.

newYaxt <- seq(0, 1, length.out = 3)
    ^~~~~~~

tests/testthat/test-DEploid_tools.R:3:1: style: Variable or function name should be snake_case.

vcfFileName <- system.file("extdata", "PG0390-C.test.vcf.gz",
^~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:5:1: style: Variable or function name should be snake_case.

plafFileName <- system.file("extdata", "labStrains.test.PLAF.txt",
^~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:7:1: style: Variable or function name should be snake_case.

panelFileName <- system.file("extdata", "labStrains.test.panel.txt",
^~~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:9:1: style: Variable or function name should be snake_case.

refFileName <- system.file("extdata", "PG0390-C.test.ref", package = "DEploid")
^~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:10:1: style: Variable or function name should be snake_case.

altFileName <- system.file("extdata", "PG0390-C.test.alt", package = "DEploid")
^~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:12:1: style: Variable or function name should be snake_case.

PG0390CoverageVcf <- extractCoverageFromVcf(vcfFileName)
^~~~~~~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:15:1: style: Variable or function name should be snake_case.

PG0390Deconv <- dEploid(paste("-vcf", vcfFileName, "-plaf", plafFileName,
^~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:18:1: style: Variable or function name should be snake_case.

expWSAF <- t(PG0390Deconv$Haps) %*% prop
^~~~~~~

tests/testthat/test-DEploid_tools.R:21:5: style: Variable or function name should be snake_case.

PG0390CoverageTxt <- extractCoverageFromTxt(refFileName, altFileName)
    ^~~~~~~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:44:5: style: Variable or function name should be snake_case.

obsWSAF <- computeObsWSAF(PG0390CoverageVcf$altCount,
    ^~~~~~~

tests/testthat/test-DEploid_tools.R:54:30: style: Do not place spaces around code in parentheses or square brackets.

​    expect_null(plotAltVsRef( PG0390CoverageVcf$refCount,
                             ^

tests/testthat/test-DEploid_tools.R:55:35: style: Do not place spaces around code in parentheses or square brackets.

PG0390CoverageVcf$altCount ))
                                  ^

tests/testthat/test-dEploid.R:3:1: style: Variable or function name should be snake_case.

vcfFileName <- system.file("extdata", "PG0390-C.test.vcf.gz",
^~~~~~~~~~~

tests/testthat/test-dEploid.R:5:1: style: Variable or function name should be snake_case.

plafFileName <- system.file("extdata", "labStrains.test.PLAF.txt",
^~~~~~~~~~~~

@lintr-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

R/dEploid.R:5:1: style: Lines should not be more than 80 characters.

#' (MCMC) approaches, and builds a generic framework that allows haplotype searches
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploid.R:6:1: style: Lines should not be more than 80 characters.

#' in a multiple infection setting. This package is primarily developed as part of
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploid.R:8:1: style: Lines should not be more than 80 characters.

#' sequencing technologies to provide a high-resolution view of natural variation
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploid.R:9:1: style: Lines should not be more than 80 characters.

#' in the malaria parasite Plasmodium falciparum. Parasite DNA are extracted from
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploid.R:10:1: style: Lines should not be more than 80 characters.

#' patient blood sample, which often contains more than one parasite strain, with
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:3:1: style: Lines should not be more than 80 characters.

#' @description Extract read counts from tab-delimited text files of a single sample.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:5:1: style: Lines should not be more than 80 characters.

#' @note The allele count files must be tab-delimited. The allele count files contain three columns: chromosomes, positions and allele count.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:11:1: style: Lines should not be more than 80 characters.

#' @return A data.frame contains four columns: chromosomes, positions, reference allele count, alternative allele count.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:20:1: style: Variable or function name should be snake_case.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
^~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:20:36: style: Remove spaces before the left parenthesis in a function call.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                   ^

R/DEploidR.R:20:37: style: Do not place spaces around code in parentheses or square brackets.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                    ^

R/DEploidR.R:20:38: style: Variable or function name should be snake_case.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                     ^~~~~~~~~~~

R/DEploidR.R:20:51: style: Variable or function name should be snake_case.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                                  ^~~~~~~~~~~

R/DEploidR.R:20:62: style: Do not place spaces around code in parentheses or square brackets.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                                             ^

R/DEploidR.R:23:12: style: Remove spaces before the left parenthesis in a function call.

return ( data.frame( CHROM = ref[, 1],
           ^

R/DEploidR.R:23:13: style: Do not place spaces around code in parentheses or square brackets.

return ( data.frame( CHROM = ref[, 1],
            ^

R/DEploidR.R:23:25: style: Do not place spaces around code in parentheses or square brackets.

return ( data.frame( CHROM = ref[, 1],
                        ^

R/DEploidR.R:26:45: style: Do not place spaces around code in parentheses or square brackets.

altCount = alt[, 3] )
                                            ^

R/DEploidR.R:35:1: style: Lines should not be more than 80 characters.

#' @note The VCF file should only contain one sample. If more samples present in the VCF, it only returns coverage for of the first sample.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:39:1: style: Lines should not be more than 80 characters.

#' @param ADFieldIndex Index of the AD field of the sample field. For example, if the format is "GT:AD:DP:GQ:PL", the AD index is 2 (by default).
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:41:1: style: Lines should not be more than 80 characters.

#' @return A data.frame contains four columns: chromosomes, positions, reference allele count, alternative allele count.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:49:1: style: Variable or function name should be snake_case.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
^~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:49:36: style: Remove spaces before the left parenthesis in a function call.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                   ^

R/DEploidR.R:49:37: style: Do not place spaces around code in parentheses or square brackets.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                    ^

R/DEploidR.R:49:38: style: Variable or function name should be snake_case.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                     ^~~~~~~~~~~

R/DEploidR.R:49:51: style: Variable or function name should be snake_case.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                                  ^~~~~~~~~~~~

R/DEploidR.R:49:67: style: Do not place spaces around code in parentheses or square brackets.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                                                  ^

R/DEploidR.R:52:14: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
             ^

R/DEploidR.R:52:19: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
                  ^

R/DEploidR.R:52:26: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
                         ^

R/DEploidR.R:52:50: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
                                                 ^

R/DEploidR.R:52:52: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
                                                   ^

R/DEploidR.R:53:24: style: Do not place spaces around code in parentheses or square brackets.

​         invokeRestart( "muffleWarning" )
                       ^

R/DEploidR.R:53:40: style: Do not place spaces around code in parentheses or square brackets.

​         invokeRestart( "muffleWarning" )
                                       ^

R/DEploidR.R:57:5: style: Variable or function name should be snake_case.

numberOfHeaderLines <- 0
    ^~~~~~~~~~~~~~~~~~~

R/DEploidR.R:58:33: style: Do not place spaces around code in parentheses or square brackets.

line <- withCallingHandlers( readLines(gzf, n = 1), warning = h)
                                ^

R/DEploidR.R:59:12: style: Do not place spaces around code in parentheses or square brackets.

while ( length(line) > 0 ){
           ^

R/DEploidR.R:59:29: style: Do not place spaces around code in parentheses or square brackets.

while ( length(line) > 0 ){
                            ^

R/DEploidR.R:60:29: style: Do not place spaces around code in parentheses or square brackets.

if (grepl("##", line )){
                            ^

R/DEploidR.R:61:13: style: Variable or function name should be snake_case.

numberOfHeaderLines <- numberOfHeaderLines + 1
            ^~~~~~~~~~~~~~~~~~~

R/DEploidR.R:65:37: style: Do not place spaces around code in parentheses or square brackets.

line <- withCallingHandlers( readLines(gzf, n = 1), warning = h)
                                    ^

R/DEploidR.R:69:23: style: Do not place spaces around code in parentheses or square brackets.

vcf <- read.table( gzfile(vcfFileName), skip = numberOfHeaderLines,
                      ^

R/DEploidR.R:73:5: style: Variable or function name should be snake_case.

sampleName <- names(vcf)[10]
    ^~~~~~~~~~

R/DEploidR.R:78:5: style: Variable or function name should be snake_case.

tmpCovStr <- unlist(lapply(field, `[[`, ADFieldIndex))
    ^~~~~~~~~

R/DEploidR.R:79:5: style: Variable or function name should be snake_case.

tmpCov <- strsplit(as.character(tmpCovStr), ",")
    ^~~~~~

R/DEploidR.R:81:5: style: Variable or function name should be snake_case.

refCount <- as.numeric(unlist(lapply(tmpCov, `[[`, 1)))
    ^~~~~~~~

R/DEploidR.R:82:5: style: Variable or function name should be snake_case.

altCount <- as.numeric(unlist(lapply(tmpCov, `[[`, 2)))
    ^~~~~~~~

R/DEploidR.R:84:12: style: Remove spaces before the left parenthesis in a function call.

return ( data.frame( CHROM = vcf[, 1],
           ^

R/DEploidR.R:84:13: style: Do not place spaces around code in parentheses or square brackets.

return ( data.frame( CHROM = vcf[, 1],
            ^

R/DEploidR.R:84:25: style: Do not place spaces around code in parentheses or square brackets.

return ( data.frame( CHROM = vcf[, 1],
                        ^

R/DEploidR.R:87:45: style: Do not place spaces around code in parentheses or square brackets.

altCount = altCount )
                                            ^

R/DEploidR.R:96:1: style: Lines should not be more than 80 characters.

#' @note The text file must have header, and population level allele frequency recorded in the "PLAF" field.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:105:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:108:1: style: Variable or function name should be snake_case.

extractPLAF <- function ( plafFileName ){
^~~~~~~~~~~

R/DEploidR.R:108:25: style: Remove spaces before the left parenthesis in a function call.

extractPLAF <- function ( plafFileName ){
                        ^

R/DEploidR.R:108:26: style: Do not place spaces around code in parentheses or square brackets.

extractPLAF <- function ( plafFileName ){
                         ^

R/DEploidR.R:108:27: style: Variable or function name should be snake_case.

extractPLAF <- function ( plafFileName ){
                          ^~~~~~~~~~~~

R/DEploidR.R:108:39: style: Do not place spaces around code in parentheses or square brackets.

extractPLAF <- function ( plafFileName ){
                                      ^

R/DEploidR.R:109:12: style: Remove spaces before the left parenthesis in a function call.

return ( read.table(plafFileName, header = T)$PLAF )
           ^

R/DEploidR.R:109:13: style: Do not place spaces around code in parentheses or square brackets.

return ( read.table(plafFileName, header = T)$PLAF )
            ^

R/DEploidR.R:109:55: style: Do not place spaces around code in parentheses or square brackets.

return ( read.table(plafFileName, header = T)$PLAF )
                                                      ^

R/DEploidR.R:115:1: style: Lines should not be more than 80 characters.

#' @description Plot the MCMC samples of the proportion, indexed by the MCMC chain.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:117:1: style: Lines should not be more than 80 characters.

#' @param proportions Matrix of the MCMC proportion samples. The matrix size is number of the MCMC samples by the number of strains.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:131:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:132:1: style: Lines should not be more than 80 characters.

#' panelFile = system.file("extdata", "labStrains.test.panel.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:138:1: style: Lines should not be more than 80 characters.

#' plotProportions( PG0390CoverageTxt.deconv$Proportions, "PG0390-C proportions" )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:141:1: style: Variable or function name should be snake_case.

plotProportions <- function (proportions, title = "Components",
^~~~~~~~~~~~~~~

R/DEploidR.R:141:29: style: Remove spaces before the left parenthesis in a function call.

plotProportions <- function (proportions, title = "Components",
                            ^

R/DEploidR.R:142:24: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                       ^~~~~~~

R/DEploidR.R:142:37: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                    ^~~~~~~~

R/DEploidR.R:142:51: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                  ^~~~~~~~

R/DEploidR.R:142:63: style: Do not place spaces around code in parentheses or square brackets.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                              ^

R/DEploidR.R:143:5: style: Variable or function name should be snake_case.

rainbowColorBin <- 16
    ^~~~~~~~~~~~~~~

R/DEploidR.R:153:1: style: Lines should not be more than 80 characters.

#' @description Plot alternative allele count vs reference allele count at each site.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:161:1: style: Lines should not be more than 80 characters.

#' @param exclude.ref Numeric array of reference allele count at sites that are not deconvoluted.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:163:1: style: Lines should not be more than 80 characters.

#' @param exclude.alt Numeric array of alternative allele count at sites that are not deconvoluted
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:187:1: style: Variable or function name should be snake_case.

plotAltVsRef <- function ( ref, alt, title = "Alt vs Ref",
^~~~~~~~~~~~

R/DEploidR.R:187:26: style: Remove spaces before the left parenthesis in a function call.

plotAltVsRef <- function ( ref, alt, title = "Alt vs Ref",
                         ^

R/DEploidR.R:187:27: style: Do not place spaces around code in parentheses or square brackets.

plotAltVsRef <- function ( ref, alt, title = "Alt vs Ref",
                          ^

R/DEploidR.R:188:21: style: Variable or function name should be snake_case.

exclude.ref = c(), exclude.alt = c(),
                    ^~~~~~~~~~~

R/DEploidR.R:188:40: style: Variable or function name should be snake_case.

exclude.ref = c(), exclude.alt = c(),
                                       ^~~~~~~~~~~

R/DEploidR.R:189:21: style: Variable or function name should be snake_case.

potentialOutliers = c(), cex.lab = 1, cex.main = 1,
                    ^~~~~~~~~~~~~~~~~

R/DEploidR.R:189:46: style: Variable or function name should be snake_case.

potentialOutliers = c(), cex.lab = 1, cex.main = 1,
                                             ^~~~~~~

R/DEploidR.R:189:59: style: Variable or function name should be snake_case.

potentialOutliers = c(), cex.lab = 1, cex.main = 1,
                                                          ^~~~~~~~

R/DEploidR.R:190:21: style: Variable or function name should be snake_case.

cex.axis = 1 ){
                    ^~~~~~~~

R/DEploidR.R:190:33: style: Do not place spaces around code in parentheses or square brackets.

cex.axis = 1 ){
                                ^

R/DEploidR.R:194:5: style: Variable or function name should be snake_case.

tmpRange <- 1.1 * mean(max(alt), max(ref))
    ^~~~~~~~

R/DEploidR.R:195:10: style: Remove spaces before the left parenthesis in a function call.

​    plot ( ref, alt, xlim = c(0, tmpRange), ylim = c(0, tmpRange),
         ^

R/DEploidR.R:195:11: style: Do not place spaces around code in parentheses or square brackets.

​    plot ( ref, alt, xlim = c(0, tmpRange), ylim = c(0, tmpRange),
          ^

R/DEploidR.R:210:9: style: Do not place spaces around code in parentheses or square brackets.

if ( length(potentialOutliers) > 0 ){
        ^

R/DEploidR.R:210:39: style: Do not place spaces around code in parentheses or square brackets.

if ( length(potentialOutliers) > 0 ){
                                      ^

R/DEploidR.R:242:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageTxt$altCount, PG0390CoverageTxt$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:249:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageVcf$altCount, PG0390CoverageVcf$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:253:1: style: Variable or function name should be snake_case.

histWSAF <- function ( obsWSAF, exclusive = TRUE,
^~~~~~~~

R/DEploidR.R:253:22: style: Remove spaces before the left parenthesis in a function call.

histWSAF <- function ( obsWSAF, exclusive = TRUE,
                     ^

R/DEploidR.R:253:23: style: Do not place spaces around code in parentheses or square brackets.

histWSAF <- function ( obsWSAF, exclusive = TRUE,
                      ^

R/DEploidR.R:253:24: style: Variable or function name should be snake_case.

histWSAF <- function ( obsWSAF, exclusive = TRUE,
                       ^~~~~~~

R/DEploidR.R:255:17: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                ^~~~~~~

R/DEploidR.R:255:30: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                             ^~~~~~~~

R/DEploidR.R:255:44: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                           ^~~~~~~~

R/DEploidR.R:255:56: style: Do not place spaces around code in parentheses or square brackets.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                       ^

R/DEploidR.R:256:5: style: Variable or function name should be snake_case.

tmpWSAFIndex <- 1:length(obsWSAF)
    ^~~~~~~~~~~~

R/DEploidR.R:257:9: style: Do not place spaces around code in parentheses or square brackets.

if ( exclusive ){
        ^

R/DEploidR.R:257:19: style: Do not place spaces around code in parentheses or square brackets.

if ( exclusive ){
                  ^

R/DEploidR.R:258:9: style: Variable or function name should be snake_case.

tmpWSAFIndex <- which( ( (obsWSAF < 1) * (obsWSAF > 0) ) == 1)
        ^~~~~~~~~~~~

R/DEploidR.R:258:31: style: Do not place spaces around code in parentheses or square brackets.

tmpWSAFIndex <- which( ( (obsWSAF < 1) * (obsWSAF > 0) ) == 1)
                              ^

R/DEploidR.R:258:33: style: Do not place spaces around code in parentheses or square brackets.

tmpWSAFIndex <- which( ( (obsWSAF < 1) * (obsWSAF > 0) ) == 1)
                                ^

R/DEploidR.R:258:63: style: Do not place spaces around code in parentheses or square brackets.

tmpWSAFIndex <- which( ( (obsWSAF < 1) * (obsWSAF > 0) ) == 1)
                                                              ^

R/DEploidR.R:260:12: style: Remove spaces before the left parenthesis in a function call.

return (hist(obsWSAF[tmpWSAFIndex], main = title,
           ^

R/DEploidR.R:273:1: style: Lines should not be more than 80 characters.

#' @param obsWSAF Numeric array of observed altenative allele frequencies within sample.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:294:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageTxt$altCount, PG0390CoverageTxt$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:295:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:302:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageVcf$altCount, PG0390CoverageVcf$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:303:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:307:1: style: Variable or function name should be snake_case.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
^~~~~~~~~~~~~~

R/DEploidR.R:307:28: style: Remove spaces before the left parenthesis in a function call.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
                           ^

R/DEploidR.R:307:29: style: Do not place spaces around code in parentheses or square brackets.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
                            ^

R/DEploidR.R:307:36: style: Variable or function name should be snake_case.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
                                   ^~~~~~~

R/DEploidR.R:307:45: style: Variable or function name should be snake_case.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
                                            ^~~~~~~

R/DEploidR.R:308:23: style: Variable or function name should be snake_case.

potentialOutliers = c(), title = "WSAF vs PLAF",
                      ^~~~~~~~~~~~~~~~~

R/DEploidR.R:309:23: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                      ^~~~~~~

R/DEploidR.R:309:36: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                   ^~~~~~~~

R/DEploidR.R:309:50: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                 ^~~~~~~~

R/DEploidR.R:309:62: style: Do not place spaces around code in parentheses or square brackets.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                             ^

R/DEploidR.R:310:10: style: Remove spaces before the left parenthesis in a function call.

​    plot ( plaf, obsWSAF, cex = 0.5, xlim = c(0, 1), ylim = c(0, 1),
         ^

R/DEploidR.R:310:11: style: Do not place spaces around code in parentheses or square brackets.

​    plot ( plaf, obsWSAF, cex = 0.5, xlim = c(0, 1), ylim = c(0, 1),
          ^

R/DEploidR.R:313:9: style: Do not place spaces around code in parentheses or square brackets.

if ( length(expWSAF) > 0 ){
        ^

R/DEploidR.R:313:29: style: Do not place spaces around code in parentheses or square brackets.

if ( length(expWSAF) > 0 ){
                            ^

R/DEploidR.R:314:16: style: Remove spaces before the left parenthesis in a function call.

​        points ( plaf, expWSAF, cex = 0.5, col = "blue")
               ^

R/DEploidR.R:314:17: style: Do not place spaces around code in parentheses or square brackets.

​        points ( plaf, expWSAF, cex = 0.5, col = "blue")
                ^

R/DEploidR.R:316:9: style: Do not place spaces around code in parentheses or square brackets.

if ( length(potentialOutliers) > 0 ){
        ^

R/DEploidR.R:316:39: style: Do not place spaces around code in parentheses or square brackets.

if ( length(potentialOutliers) > 0 ){
                                      ^

R/DEploidR.R:326:1: style: Lines should not be more than 80 characters.

#' @description Plot observed alternative allele frequency within sample against expected WSAF.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:346:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageVcf$altCount, PG0390CoverageVcf$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:347:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:348:1: style: Lines should not be more than 80 characters.

#' PG0390CoverageVcf.deconv = dEploid(paste("-vcf", vcfFile, "-plaf", plafFile, "-noPanel"))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:349:1: style: Lines should not be more than 80 characters.

#' prop = PG0390CoverageVcf.deconv$Proportions[dim(PG0390CoverageVcf.deconv$Proportions)[1],]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:354:1: style: Variable or function name should be snake_case.

plotObsExpWSAF <- function (obsWSAF, expWSAF,
^~~~~~~~~~~~~~

R/DEploidR.R:354:28: style: Remove spaces before the left parenthesis in a function call.

plotObsExpWSAF <- function (obsWSAF, expWSAF,
                           ^

R/DEploidR.R:354:29: style: Variable or function name should be snake_case.

plotObsExpWSAF <- function (obsWSAF, expWSAF,
                            ^~~~~~~

R/DEploidR.R:354:38: style: Variable or function name should be snake_case.

plotObsExpWSAF <- function (obsWSAF, expWSAF,
                                     ^~~~~~~

R/DEploidR.R:356:23: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                      ^~~~~~~

R/DEploidR.R:356:36: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                   ^~~~~~~~

R/DEploidR.R:356:50: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                 ^~~~~~~~

R/DEploidR.R:356:62: style: Do not place spaces around code in parentheses or square brackets.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                             ^

R/DEploidR.R:367:1: style: Lines should not be more than 80 characters.

#' @description Compute observed allele frequency within sample from the allele counts.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:384:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageTxt$altCount, PG0390CoverageTxt$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:389:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageVcf$altCount, PG0390CoverageVcf$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:391:1: style: Variable or function name should be snake_case.

computeObsWSAF <- function (alt, ref) {
^~~~~~~~~~~~~~

R/DEploidR.R:391:28: style: Remove spaces before the left parenthesis in a function call.

computeObsWSAF <- function (alt, ref) {
                           ^

R/DEploidR.R:392:12: style: Remove spaces before the left parenthesis in a function call.

return ( alt / (ref + alt + 0.00000001) )
           ^

R/DEploidR.R:392:13: style: Do not place spaces around code in parentheses or square brackets.

return ( alt / (ref + alt + 0.00000001) )
            ^

R/DEploidR.R:392:44: style: Do not place spaces around code in parentheses or square brackets.

return ( alt / (ref + alt + 0.00000001) )
                                           ^

R/DEploidR.R:398:1: style: Lines should not be more than 80 characters.

#' @description Plot the posterior probabilities of a haplotype given the refernece panel.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:400:1: style: Lines should not be more than 80 characters.

#' @param posteriorProbabilities Posterior probabilities matrix with the size of number of loci by the number of reference strain.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:410:1: style: Variable or function name should be snake_case.

haplotypePainter <- function (posteriorProbabilities, title = "", labelScaling,
^~~~~~~~~~~~~~~~

R/DEploidR.R:410:30: style: Remove spaces before the left parenthesis in a function call.

haplotypePainter <- function (posteriorProbabilities, title = "", labelScaling,
                             ^

R/DEploidR.R:410:31: style: Variable or function name should be snake_case.

haplotypePainter <- function (posteriorProbabilities, title = "", labelScaling,
                              ^~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:410:67: style: Variable or function name should be snake_case.

haplotypePainter <- function (posteriorProbabilities, title = "", labelScaling,
                                                                  ^~~~~~~~~~~~

R/DEploidR.R:411:25: style: Variable or function name should be snake_case.

numberOfInbreeding = 0){
                        ^~~~~~~~~~~~~~~~~~

R/DEploidR.R:412:5: style: Variable or function name should be snake_case.

rainbowColorBin <- 16
    ^~~~~~~~~~~~~~~

R/DEploidR.R:413:5: style: Variable or function name should be snake_case.

rainbowColors <- rainbow(rainbowColorBin)
    ^~~~~~~~~~~~~

R/DEploidR.R:414:9: style: Do not place spaces around code in parentheses or square brackets.

if ( numberOfInbreeding > 0 ){
        ^

R/DEploidR.R:414:32: style: Do not place spaces around code in parentheses or square brackets.

if ( numberOfInbreeding > 0 ){
                               ^

R/DEploidR.R:415:9: style: Variable or function name should be snake_case.

panelSize <- dim(posteriorProbabilities)[2] - numberOfInbreeding
        ^~~~~~~~~

R/DEploidR.R:416:9: style: Variable or function name should be snake_case.

rainbowColors <- c(rep("#46a8e1", panelSize),
        ^~~~~~~~~~~~~

R/DEploidR.R:424:5: style: Variable or function name should be snake_case.

newXaxt <- round(seq(1, dim(posteriorProbabilities)[1], length.out = 6))
    ^~~~~~~

R/DEploidR.R:427:5: style: Variable or function name should be snake_case.

newYaxt <- seq(0, 1, length.out = 3)
    ^~~~~~~

tests/testthat/test-DEploid_tools.R:3:1: style: Variable or function name should be snake_case.

vcfFileName <- system.file("extdata", "PG0390-C.test.vcf.gz",
^~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:5:1: style: Variable or function name should be snake_case.

plafFileName <- system.file("extdata", "labStrains.test.PLAF.txt",
^~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:7:1: style: Variable or function name should be snake_case.

panelFileName <- system.file("extdata", "labStrains.test.panel.txt",
^~~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:9:1: style: Variable or function name should be snake_case.

refFileName <- system.file("extdata", "PG0390-C.test.ref", package = "DEploid")
^~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:10:1: style: Variable or function name should be snake_case.

altFileName <- system.file("extdata", "PG0390-C.test.alt", package = "DEploid")
^~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:12:1: style: Variable or function name should be snake_case.

PG0390CoverageVcf <- extractCoverageFromVcf(vcfFileName)
^~~~~~~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:15:1: style: Variable or function name should be snake_case.

PG0390Deconv <- dEploid(paste("-vcf", vcfFileName, "-plaf", plafFileName,
^~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:18:1: style: Variable or function name should be snake_case.

expWSAF <- t(PG0390Deconv$Haps) %*% prop
^~~~~~~

tests/testthat/test-DEploid_tools.R:21:5: style: Variable or function name should be snake_case.

PG0390CoverageTxt <- extractCoverageFromTxt(refFileName, altFileName)
    ^~~~~~~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:44:5: style: Variable or function name should be snake_case.

obsWSAF <- computeObsWSAF(PG0390CoverageVcf$altCount,
    ^~~~~~~

tests/testthat/test-DEploid_tools.R:54:30: style: Do not place spaces around code in parentheses or square brackets.

​    expect_null(plotAltVsRef( PG0390CoverageVcf$refCount,
                             ^

tests/testthat/test-DEploid_tools.R:55:35: style: Do not place spaces around code in parentheses or square brackets.

PG0390CoverageVcf$altCount ))
                                  ^

tests/testthat/test-dEploid.R:3:1: style: Variable or function name should be snake_case.

vcfFileName <- system.file("extdata", "PG0390-C.test.vcf.gz",
^~~~~~~~~~~

tests/testthat/test-dEploid.R:5:1: style: Variable or function name should be snake_case.

plafFileName <- system.file("extdata", "labStrains.test.PLAF.txt",
^~~~~~~~~~~~

@lintr-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

R/dEploid.R:5:1: style: Lines should not be more than 80 characters.

#' (MCMC) approaches, and builds a generic framework that allows haplotype searches
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploid.R:6:1: style: Lines should not be more than 80 characters.

#' in a multiple infection setting. This package is primarily developed as part of
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploid.R:8:1: style: Lines should not be more than 80 characters.

#' sequencing technologies to provide a high-resolution view of natural variation
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploid.R:9:1: style: Lines should not be more than 80 characters.

#' in the malaria parasite Plasmodium falciparum. Parasite DNA are extracted from
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploid.R:10:1: style: Lines should not be more than 80 characters.

#' patient blood sample, which often contains more than one parasite strain, with
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:3:1: style: Lines should not be more than 80 characters.

#' @description Extract read counts from tab-delimited text files of a single sample.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:5:1: style: Lines should not be more than 80 characters.

#' @note The allele count files must be tab-delimited. The allele count files contain three columns: chromosomes, positions and allele count.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:11:1: style: Lines should not be more than 80 characters.

#' @return A data.frame contains four columns: chromosomes, positions, reference allele count, alternative allele count.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:20:1: style: Variable or function name should be snake_case.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
^~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:20:36: style: Remove spaces before the left parenthesis in a function call.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                   ^

R/DEploidR.R:20:37: style: Do not place spaces around code in parentheses or square brackets.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                    ^

R/DEploidR.R:20:38: style: Variable or function name should be snake_case.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                     ^~~~~~~~~~~

R/DEploidR.R:20:51: style: Variable or function name should be snake_case.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                                  ^~~~~~~~~~~

R/DEploidR.R:20:62: style: Do not place spaces around code in parentheses or square brackets.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                                             ^

R/DEploidR.R:23:12: style: Remove spaces before the left parenthesis in a function call.

return ( data.frame( CHROM = ref[, 1],
           ^

R/DEploidR.R:23:13: style: Do not place spaces around code in parentheses or square brackets.

return ( data.frame( CHROM = ref[, 1],
            ^

R/DEploidR.R:23:25: style: Do not place spaces around code in parentheses or square brackets.

return ( data.frame( CHROM = ref[, 1],
                        ^

R/DEploidR.R:26:45: style: Do not place spaces around code in parentheses or square brackets.

altCount = alt[, 3] )
                                            ^

R/DEploidR.R:35:1: style: Lines should not be more than 80 characters.

#' @note The VCF file should only contain one sample. If more samples present in the VCF, it only returns coverage for of the first sample.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:39:1: style: Lines should not be more than 80 characters.

#' @param ADFieldIndex Index of the AD field of the sample field. For example, if the format is "GT:AD:DP:GQ:PL", the AD index is 2 (by default).
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:41:1: style: Lines should not be more than 80 characters.

#' @return A data.frame contains four columns: chromosomes, positions, reference allele count, alternative allele count.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:49:1: style: Variable or function name should be snake_case.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
^~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:49:36: style: Remove spaces before the left parenthesis in a function call.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                   ^

R/DEploidR.R:49:37: style: Do not place spaces around code in parentheses or square brackets.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                    ^

R/DEploidR.R:49:38: style: Variable or function name should be snake_case.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                     ^~~~~~~~~~~

R/DEploidR.R:49:51: style: Variable or function name should be snake_case.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                                  ^~~~~~~~~~~~

R/DEploidR.R:49:67: style: Do not place spaces around code in parentheses or square brackets.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                                                  ^

R/DEploidR.R:52:14: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
             ^

R/DEploidR.R:52:19: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
                  ^

R/DEploidR.R:52:26: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
                         ^

R/DEploidR.R:52:50: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
                                                 ^

R/DEploidR.R:52:52: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
                                                   ^

R/DEploidR.R:53:24: style: Do not place spaces around code in parentheses or square brackets.

​         invokeRestart( "muffleWarning" )
                       ^

R/DEploidR.R:53:40: style: Do not place spaces around code in parentheses or square brackets.

​         invokeRestart( "muffleWarning" )
                                       ^

R/DEploidR.R:57:5: style: Variable or function name should be snake_case.

numberOfHeaderLines <- 0
    ^~~~~~~~~~~~~~~~~~~

R/DEploidR.R:58:33: style: Do not place spaces around code in parentheses or square brackets.

line <- withCallingHandlers( readLines(gzf, n = 1), warning = h)
                                ^

R/DEploidR.R:59:12: style: Do not place spaces around code in parentheses or square brackets.

while ( length(line) > 0 ){
           ^

R/DEploidR.R:59:29: style: Do not place spaces around code in parentheses or square brackets.

while ( length(line) > 0 ){
                            ^

R/DEploidR.R:60:29: style: Do not place spaces around code in parentheses or square brackets.

if (grepl("##", line )){
                            ^

R/DEploidR.R:61:13: style: Variable or function name should be snake_case.

numberOfHeaderLines <- numberOfHeaderLines + 1
            ^~~~~~~~~~~~~~~~~~~

R/DEploidR.R:65:37: style: Do not place spaces around code in parentheses or square brackets.

line <- withCallingHandlers( readLines(gzf, n = 1), warning = h)
                                    ^

R/DEploidR.R:69:23: style: Do not place spaces around code in parentheses or square brackets.

vcf <- read.table( gzfile(vcfFileName), skip = numberOfHeaderLines,
                      ^

R/DEploidR.R:73:5: style: Variable or function name should be snake_case.

sampleName <- names(vcf)[10]
    ^~~~~~~~~~

R/DEploidR.R:78:5: style: Variable or function name should be snake_case.

tmpCovStr <- unlist(lapply(field, `[[`, ADFieldIndex))
    ^~~~~~~~~

R/DEploidR.R:79:5: style: Variable or function name should be snake_case.

tmpCov <- strsplit(as.character(tmpCovStr), ",")
    ^~~~~~

R/DEploidR.R:81:5: style: Variable or function name should be snake_case.

refCount <- as.numeric(unlist(lapply(tmpCov, `[[`, 1)))
    ^~~~~~~~

R/DEploidR.R:82:5: style: Variable or function name should be snake_case.

altCount <- as.numeric(unlist(lapply(tmpCov, `[[`, 2)))
    ^~~~~~~~

R/DEploidR.R:84:12: style: Remove spaces before the left parenthesis in a function call.

return ( data.frame( CHROM = vcf[, 1],
           ^

R/DEploidR.R:84:13: style: Do not place spaces around code in parentheses or square brackets.

return ( data.frame( CHROM = vcf[, 1],
            ^

R/DEploidR.R:84:25: style: Do not place spaces around code in parentheses or square brackets.

return ( data.frame( CHROM = vcf[, 1],
                        ^

R/DEploidR.R:87:45: style: Do not place spaces around code in parentheses or square brackets.

altCount = altCount )
                                            ^

R/DEploidR.R:96:1: style: Lines should not be more than 80 characters.

#' @note The text file must have header, and population level allele frequency recorded in the "PLAF" field.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:105:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:108:1: style: Variable or function name should be snake_case.

extractPLAF <- function ( plafFileName ){
^~~~~~~~~~~

R/DEploidR.R:108:25: style: Remove spaces before the left parenthesis in a function call.

extractPLAF <- function ( plafFileName ){
                        ^

R/DEploidR.R:108:26: style: Do not place spaces around code in parentheses or square brackets.

extractPLAF <- function ( plafFileName ){
                         ^

R/DEploidR.R:108:27: style: Variable or function name should be snake_case.

extractPLAF <- function ( plafFileName ){
                          ^~~~~~~~~~~~

R/DEploidR.R:108:39: style: Do not place spaces around code in parentheses or square brackets.

extractPLAF <- function ( plafFileName ){
                                      ^

R/DEploidR.R:109:12: style: Remove spaces before the left parenthesis in a function call.

return ( read.table(plafFileName, header = T)$PLAF )
           ^

R/DEploidR.R:109:13: style: Do not place spaces around code in parentheses or square brackets.

return ( read.table(plafFileName, header = T)$PLAF )
            ^

R/DEploidR.R:109:55: style: Do not place spaces around code in parentheses or square brackets.

return ( read.table(plafFileName, header = T)$PLAF )
                                                      ^

R/DEploidR.R:115:1: style: Lines should not be more than 80 characters.

#' @description Plot the MCMC samples of the proportion, indexed by the MCMC chain.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:117:1: style: Lines should not be more than 80 characters.

#' @param proportions Matrix of the MCMC proportion samples. The matrix size is number of the MCMC samples by the number of strains.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:131:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:132:1: style: Lines should not be more than 80 characters.

#' panelFile = system.file("extdata", "labStrains.test.panel.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:138:1: style: Lines should not be more than 80 characters.

#' plotProportions( PG0390CoverageTxt.deconv$Proportions, "PG0390-C proportions" )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:141:1: style: Variable or function name should be snake_case.

plotProportions <- function (proportions, title = "Components",
^~~~~~~~~~~~~~~

R/DEploidR.R:141:29: style: Remove spaces before the left parenthesis in a function call.

plotProportions <- function (proportions, title = "Components",
                            ^

R/DEploidR.R:142:24: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                       ^~~~~~~

R/DEploidR.R:142:37: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                    ^~~~~~~~

R/DEploidR.R:142:51: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                  ^~~~~~~~

R/DEploidR.R:142:63: style: Do not place spaces around code in parentheses or square brackets.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                              ^

R/DEploidR.R:143:5: style: Variable or function name should be snake_case.

rainbowColorBin <- 16
    ^~~~~~~~~~~~~~~

R/DEploidR.R:153:1: style: Lines should not be more than 80 characters.

#' @description Plot alternative allele count vs reference allele count at each site.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:161:1: style: Lines should not be more than 80 characters.

#' @param exclude.ref Numeric array of reference allele count at sites that are not deconvoluted.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:163:1: style: Lines should not be more than 80 characters.

#' @param exclude.alt Numeric array of alternative allele count at sites that are not deconvoluted
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:187:1: style: Variable or function name should be snake_case.

plotAltVsRef <- function ( ref, alt, title = "Alt vs Ref",
^~~~~~~~~~~~

R/DEploidR.R:187:26: style: Remove spaces before the left parenthesis in a function call.

plotAltVsRef <- function ( ref, alt, title = "Alt vs Ref",
                         ^

R/DEploidR.R:187:27: style: Do not place spaces around code in parentheses or square brackets.

plotAltVsRef <- function ( ref, alt, title = "Alt vs Ref",
                          ^

R/DEploidR.R:188:21: style: Variable or function name should be snake_case.

exclude.ref = c(), exclude.alt = c(),
                    ^~~~~~~~~~~

R/DEploidR.R:188:40: style: Variable or function name should be snake_case.

exclude.ref = c(), exclude.alt = c(),
                                       ^~~~~~~~~~~

R/DEploidR.R:189:21: style: Variable or function name should be snake_case.

potentialOutliers = c(), cex.lab = 1, cex.main = 1,
                    ^~~~~~~~~~~~~~~~~

R/DEploidR.R:189:46: style: Variable or function name should be snake_case.

potentialOutliers = c(), cex.lab = 1, cex.main = 1,
                                             ^~~~~~~

R/DEploidR.R:189:59: style: Variable or function name should be snake_case.

potentialOutliers = c(), cex.lab = 1, cex.main = 1,
                                                          ^~~~~~~~

R/DEploidR.R:190:21: style: Variable or function name should be snake_case.

cex.axis = 1 ){
                    ^~~~~~~~

R/DEploidR.R:190:33: style: Do not place spaces around code in parentheses or square brackets.

cex.axis = 1 ){
                                ^

R/DEploidR.R:194:5: style: Variable or function name should be snake_case.

tmpRange <- 1.1 * mean(max(alt), max(ref))
    ^~~~~~~~

R/DEploidR.R:195:10: style: Remove spaces before the left parenthesis in a function call.

​    plot ( ref, alt, xlim = c(0, tmpRange), ylim = c(0, tmpRange),
         ^

R/DEploidR.R:195:11: style: Do not place spaces around code in parentheses or square brackets.

​    plot ( ref, alt, xlim = c(0, tmpRange), ylim = c(0, tmpRange),
          ^

R/DEploidR.R:210:9: style: Do not place spaces around code in parentheses or square brackets.

if ( length(potentialOutliers) > 0 ){
        ^

R/DEploidR.R:210:39: style: Do not place spaces around code in parentheses or square brackets.

if ( length(potentialOutliers) > 0 ){
                                      ^

R/DEploidR.R:242:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageTxt$altCount, PG0390CoverageTxt$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:249:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageVcf$altCount, PG0390CoverageVcf$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:253:1: style: Variable or function name should be snake_case.

histWSAF <- function ( obsWSAF, exclusive = TRUE,
^~~~~~~~

R/DEploidR.R:253:22: style: Remove spaces before the left parenthesis in a function call.

histWSAF <- function ( obsWSAF, exclusive = TRUE,
                     ^

R/DEploidR.R:253:23: style: Do not place spaces around code in parentheses or square brackets.

histWSAF <- function ( obsWSAF, exclusive = TRUE,
                      ^

R/DEploidR.R:253:24: style: Variable or function name should be snake_case.

histWSAF <- function ( obsWSAF, exclusive = TRUE,
                       ^~~~~~~

R/DEploidR.R:255:17: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                ^~~~~~~

R/DEploidR.R:255:30: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                             ^~~~~~~~

R/DEploidR.R:255:44: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                           ^~~~~~~~

R/DEploidR.R:255:56: style: Do not place spaces around code in parentheses or square brackets.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                       ^

R/DEploidR.R:256:5: style: Variable or function name should be snake_case.

tmpWSAFIndex <- 1:length(obsWSAF)
    ^~~~~~~~~~~~

R/DEploidR.R:257:9: style: Do not place spaces around code in parentheses or square brackets.

if ( exclusive ){
        ^

R/DEploidR.R:257:19: style: Do not place spaces around code in parentheses or square brackets.

if ( exclusive ){
                  ^

R/DEploidR.R:258:9: style: Variable or function name should be snake_case.

tmpWSAFIndex <- which( ( (obsWSAF < 1) * (obsWSAF > 0) ) == 1)
        ^~~~~~~~~~~~

R/DEploidR.R:258:31: style: Do not place spaces around code in parentheses or square brackets.

tmpWSAFIndex <- which( ( (obsWSAF < 1) * (obsWSAF > 0) ) == 1)
                              ^

R/DEploidR.R:258:33: style: Do not place spaces around code in parentheses or square brackets.

tmpWSAFIndex <- which( ( (obsWSAF < 1) * (obsWSAF > 0) ) == 1)
                                ^

R/DEploidR.R:258:63: style: Do not place spaces around code in parentheses or square brackets.

tmpWSAFIndex <- which( ( (obsWSAF < 1) * (obsWSAF > 0) ) == 1)
                                                              ^

R/DEploidR.R:260:12: style: Remove spaces before the left parenthesis in a function call.

return (hist(obsWSAF[tmpWSAFIndex], main = title,
           ^

R/DEploidR.R:273:1: style: Lines should not be more than 80 characters.

#' @param obsWSAF Numeric array of observed altenative allele frequencies within sample.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:294:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageTxt$altCount, PG0390CoverageTxt$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:295:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:302:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageVcf$altCount, PG0390CoverageVcf$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:303:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:307:1: style: Variable or function name should be snake_case.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
^~~~~~~~~~~~~~

R/DEploidR.R:307:28: style: Remove spaces before the left parenthesis in a function call.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
                           ^

R/DEploidR.R:307:29: style: Do not place spaces around code in parentheses or square brackets.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
                            ^

R/DEploidR.R:307:36: style: Variable or function name should be snake_case.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
                                   ^~~~~~~

R/DEploidR.R:307:45: style: Variable or function name should be snake_case.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
                                            ^~~~~~~

R/DEploidR.R:308:23: style: Variable or function name should be snake_case.

potentialOutliers = c(), title = "WSAF vs PLAF",
                      ^~~~~~~~~~~~~~~~~

R/DEploidR.R:309:23: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                      ^~~~~~~

R/DEploidR.R:309:36: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                   ^~~~~~~~

R/DEploidR.R:309:50: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                 ^~~~~~~~

R/DEploidR.R:309:62: style: Do not place spaces around code in parentheses or square brackets.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                             ^

R/DEploidR.R:310:10: style: Remove spaces before the left parenthesis in a function call.

​    plot ( plaf, obsWSAF, cex = 0.5, xlim = c(0, 1), ylim = c(0, 1),
         ^

R/DEploidR.R:310:11: style: Do not place spaces around code in parentheses or square brackets.

​    plot ( plaf, obsWSAF, cex = 0.5, xlim = c(0, 1), ylim = c(0, 1),
          ^

R/DEploidR.R:313:9: style: Do not place spaces around code in parentheses or square brackets.

if ( length(expWSAF) > 0 ){
        ^

R/DEploidR.R:313:29: style: Do not place spaces around code in parentheses or square brackets.

if ( length(expWSAF) > 0 ){
                            ^

R/DEploidR.R:314:16: style: Remove spaces before the left parenthesis in a function call.

​        points ( plaf, expWSAF, cex = 0.5, col = "blue")
               ^

R/DEploidR.R:314:17: style: Do not place spaces around code in parentheses or square brackets.

​        points ( plaf, expWSAF, cex = 0.5, col = "blue")
                ^

R/DEploidR.R:316:9: style: Do not place spaces around code in parentheses or square brackets.

if ( length(potentialOutliers) > 0 ){
        ^

R/DEploidR.R:316:39: style: Do not place spaces around code in parentheses or square brackets.

if ( length(potentialOutliers) > 0 ){
                                      ^

R/DEploidR.R:326:1: style: Lines should not be more than 80 characters.

#' @description Plot observed alternative allele frequency within sample against expected WSAF.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:346:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageVcf$altCount, PG0390CoverageVcf$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:347:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:348:1: style: Lines should not be more than 80 characters.

#' PG0390CoverageVcf.deconv = dEploid(paste("-vcf", vcfFile, "-plaf", plafFile, "-noPanel"))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:349:1: style: Lines should not be more than 80 characters.

#' prop = PG0390CoverageVcf.deconv$Proportions[dim(PG0390CoverageVcf.deconv$Proportions)[1],]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:354:1: style: Variable or function name should be snake_case.

plotObsExpWSAF <- function (obsWSAF, expWSAF,
^~~~~~~~~~~~~~

R/DEploidR.R:354:28: style: Remove spaces before the left parenthesis in a function call.

plotObsExpWSAF <- function (obsWSAF, expWSAF,
                           ^

R/DEploidR.R:354:29: style: Variable or function name should be snake_case.

plotObsExpWSAF <- function (obsWSAF, expWSAF,
                            ^~~~~~~

R/DEploidR.R:354:38: style: Variable or function name should be snake_case.

plotObsExpWSAF <- function (obsWSAF, expWSAF,
                                     ^~~~~~~

R/DEploidR.R:356:23: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                      ^~~~~~~

R/DEploidR.R:356:36: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                   ^~~~~~~~

R/DEploidR.R:356:50: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                 ^~~~~~~~

R/DEploidR.R:356:62: style: Do not place spaces around code in parentheses or square brackets.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                             ^

R/DEploidR.R:367:1: style: Lines should not be more than 80 characters.

#' @description Compute observed allele frequency within sample from the allele counts.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:384:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageTxt$altCount, PG0390CoverageTxt$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:389:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageVcf$altCount, PG0390CoverageVcf$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:391:1: style: Variable or function name should be snake_case.

computeObsWSAF <- function (alt, ref) {
^~~~~~~~~~~~~~

R/DEploidR.R:391:28: style: Remove spaces before the left parenthesis in a function call.

computeObsWSAF <- function (alt, ref) {
                           ^

R/DEploidR.R:392:12: style: Remove spaces before the left parenthesis in a function call.

return ( alt / (ref + alt + 0.00000001) )
           ^

R/DEploidR.R:392:13: style: Do not place spaces around code in parentheses or square brackets.

return ( alt / (ref + alt + 0.00000001) )
            ^

R/DEploidR.R:392:44: style: Do not place spaces around code in parentheses or square brackets.

return ( alt / (ref + alt + 0.00000001) )
                                           ^

R/DEploidR.R:398:1: style: Lines should not be more than 80 characters.

#' @description Plot the posterior probabilities of a haplotype given the refernece panel.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:400:1: style: Lines should not be more than 80 characters.

#' @param posteriorProbabilities Posterior probabilities matrix with the size of number of loci by the number of reference strain.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:410:1: style: Variable or function name should be snake_case.

haplotypePainter <- function (posteriorProbabilities, title = "", labelScaling,
^~~~~~~~~~~~~~~~

R/DEploidR.R:410:30: style: Remove spaces before the left parenthesis in a function call.

haplotypePainter <- function (posteriorProbabilities, title = "", labelScaling,
                             ^

R/DEploidR.R:410:31: style: Variable or function name should be snake_case.

haplotypePainter <- function (posteriorProbabilities, title = "", labelScaling,
                              ^~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:410:67: style: Variable or function name should be snake_case.

haplotypePainter <- function (posteriorProbabilities, title = "", labelScaling,
                                                                  ^~~~~~~~~~~~

R/DEploidR.R:411:25: style: Variable or function name should be snake_case.

numberOfInbreeding = 0){
                        ^~~~~~~~~~~~~~~~~~

R/DEploidR.R:412:5: style: Variable or function name should be snake_case.

rainbowColorBin <- 16
    ^~~~~~~~~~~~~~~

R/DEploidR.R:413:5: style: Variable or function name should be snake_case.

rainbowColors <- rainbow(rainbowColorBin)
    ^~~~~~~~~~~~~

R/DEploidR.R:414:9: style: Do not place spaces around code in parentheses or square brackets.

if ( numberOfInbreeding > 0 ){
        ^

R/DEploidR.R:414:32: style: Do not place spaces around code in parentheses or square brackets.

if ( numberOfInbreeding > 0 ){
                               ^

R/DEploidR.R:415:9: style: Variable or function name should be snake_case.

panelSize <- dim(posteriorProbabilities)[2] - numberOfInbreeding
        ^~~~~~~~~

R/DEploidR.R:416:9: style: Variable or function name should be snake_case.

rainbowColors <- c(rep("#46a8e1", panelSize),
        ^~~~~~~~~~~~~

R/DEploidR.R:424:5: style: Variable or function name should be snake_case.

newXaxt <- round(seq(1, dim(posteriorProbabilities)[1], length.out = 6))
    ^~~~~~~

R/DEploidR.R:427:5: style: Variable or function name should be snake_case.

newYaxt <- seq(0, 1, length.out = 3)
    ^~~~~~~

tests/testthat/test-DEploid_tools.R:3:1: style: Variable or function name should be snake_case.

vcfFileName <- system.file("extdata", "PG0390-C.test.vcf.gz",
^~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:5:1: style: Variable or function name should be snake_case.

plafFileName <- system.file("extdata", "labStrains.test.PLAF.txt",
^~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:7:1: style: Variable or function name should be snake_case.

panelFileName <- system.file("extdata", "labStrains.test.panel.txt",
^~~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:9:1: style: Variable or function name should be snake_case.

refFileName <- system.file("extdata", "PG0390-C.test.ref", package = "DEploid")
^~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:10:1: style: Variable or function name should be snake_case.

altFileName <- system.file("extdata", "PG0390-C.test.alt", package = "DEploid")
^~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:12:1: style: Variable or function name should be snake_case.

PG0390CoverageVcf <- extractCoverageFromVcf(vcfFileName)
^~~~~~~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:15:1: style: Variable or function name should be snake_case.

PG0390Deconv <- dEploid(paste("-vcf", vcfFileName, "-plaf", plafFileName,
^~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:18:1: style: Variable or function name should be snake_case.

expWSAF <- t(PG0390Deconv$Haps) %*% prop
^~~~~~~

tests/testthat/test-DEploid_tools.R:21:5: style: Variable or function name should be snake_case.

PG0390CoverageTxt <- extractCoverageFromTxt(refFileName, altFileName)
    ^~~~~~~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:44:5: style: Variable or function name should be snake_case.

obsWSAF <- computeObsWSAF(PG0390CoverageVcf$altCount,
    ^~~~~~~

tests/testthat/test-DEploid_tools.R:54:30: style: Do not place spaces around code in parentheses or square brackets.

​    expect_null(plotAltVsRef( PG0390CoverageVcf$refCount,
                             ^

tests/testthat/test-DEploid_tools.R:55:35: style: Do not place spaces around code in parentheses or square brackets.

PG0390CoverageVcf$altCount ))
                                  ^

tests/testthat/test-dEploid.R:3:1: style: Variable or function name should be snake_case.

vcfFileName <- system.file("extdata", "PG0390-C.test.vcf.gz",
^~~~~~~~~~~

tests/testthat/test-dEploid.R:5:1: style: Variable or function name should be snake_case.

plafFileName <- system.file("extdata", "labStrains.test.PLAF.txt",
^~~~~~~~~~~~

@lintr-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

R/dEploid.R:5:1: style: Lines should not be more than 80 characters.

#' (MCMC) approaches, and builds a generic framework that allows haplotype searches
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploid.R:6:1: style: Lines should not be more than 80 characters.

#' in a multiple infection setting. This package is primarily developed as part of
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploid.R:8:1: style: Lines should not be more than 80 characters.

#' sequencing technologies to provide a high-resolution view of natural variation
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploid.R:9:1: style: Lines should not be more than 80 characters.

#' in the malaria parasite Plasmodium falciparum. Parasite DNA are extracted from
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploid.R:10:1: style: Lines should not be more than 80 characters.

#' patient blood sample, which often contains more than one parasite strain, with
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:3:1: style: Lines should not be more than 80 characters.

#' @description Extract read counts from tab-delimited text files of a single sample.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:5:1: style: Lines should not be more than 80 characters.

#' @note The allele count files must be tab-delimited. The allele count files contain three columns: chromosomes, positions and allele count.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:11:1: style: Lines should not be more than 80 characters.

#' @return A data.frame contains four columns: chromosomes, positions, reference allele count, alternative allele count.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:20:1: style: Variable or function name should be snake_case.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
^~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:20:36: style: Remove spaces before the left parenthesis in a function call.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                   ^

R/DEploidR.R:20:37: style: Do not place spaces around code in parentheses or square brackets.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                    ^

R/DEploidR.R:20:38: style: Variable or function name should be snake_case.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                     ^~~~~~~~~~~

R/DEploidR.R:20:51: style: Variable or function name should be snake_case.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                                  ^~~~~~~~~~~

R/DEploidR.R:20:62: style: Do not place spaces around code in parentheses or square brackets.

extractCoverageFromTxt <- function ( refFileName, altFileName ){
                                                             ^

R/DEploidR.R:23:12: style: Remove spaces before the left parenthesis in a function call.

return ( data.frame( CHROM = ref[, 1],
           ^

R/DEploidR.R:23:13: style: Do not place spaces around code in parentheses or square brackets.

return ( data.frame( CHROM = ref[, 1],
            ^

R/DEploidR.R:23:25: style: Do not place spaces around code in parentheses or square brackets.

return ( data.frame( CHROM = ref[, 1],
                        ^

R/DEploidR.R:26:45: style: Do not place spaces around code in parentheses or square brackets.

altCount = alt[, 3] )
                                            ^

R/DEploidR.R:35:1: style: Lines should not be more than 80 characters.

#' @note The VCF file should only contain one sample. If more samples present in the VCF, it only returns coverage for of the first sample.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:39:1: style: Lines should not be more than 80 characters.

#' @param ADFieldIndex Index of the AD field of the sample field. For example, if the format is "GT:AD:DP:GQ:PL", the AD index is 2 (by default).
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:41:1: style: Lines should not be more than 80 characters.

#' @return A data.frame contains four columns: chromosomes, positions, reference allele count, alternative allele count.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:49:1: style: Variable or function name should be snake_case.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
^~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:49:36: style: Remove spaces before the left parenthesis in a function call.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                   ^

R/DEploidR.R:49:37: style: Do not place spaces around code in parentheses or square brackets.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                    ^

R/DEploidR.R:49:38: style: Variable or function name should be snake_case.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                     ^~~~~~~~~~~

R/DEploidR.R:49:51: style: Variable or function name should be snake_case.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                                  ^~~~~~~~~~~~

R/DEploidR.R:49:67: style: Do not place spaces around code in parentheses or square brackets.

extractCoverageFromVcf <- function ( vcfFileName, ADFieldIndex = 2 ){
                                                                  ^

R/DEploidR.R:52:14: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
             ^

R/DEploidR.R:52:19: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
                  ^

R/DEploidR.R:52:26: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
                         ^

R/DEploidR.R:52:50: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
                                                 ^

R/DEploidR.R:52:52: style: Do not place spaces around code in parentheses or square brackets.

if ( any( grepl( "gzfile connection", w) ) )
                                                   ^

R/DEploidR.R:53:24: style: Do not place spaces around code in parentheses or square brackets.

​         invokeRestart( "muffleWarning" )
                       ^

R/DEploidR.R:53:40: style: Do not place spaces around code in parentheses or square brackets.

​         invokeRestart( "muffleWarning" )
                                       ^

R/DEploidR.R:57:5: style: Variable or function name should be snake_case.

numberOfHeaderLines <- 0
    ^~~~~~~~~~~~~~~~~~~

R/DEploidR.R:58:33: style: Do not place spaces around code in parentheses or square brackets.

line <- withCallingHandlers( readLines(gzf, n = 1), warning = h)
                                ^

R/DEploidR.R:59:12: style: Do not place spaces around code in parentheses or square brackets.

while ( length(line) > 0 ){
           ^

R/DEploidR.R:59:29: style: Do not place spaces around code in parentheses or square brackets.

while ( length(line) > 0 ){
                            ^

R/DEploidR.R:60:29: style: Do not place spaces around code in parentheses or square brackets.

if (grepl("##", line )){
                            ^

R/DEploidR.R:61:13: style: Variable or function name should be snake_case.

numberOfHeaderLines <- numberOfHeaderLines + 1
            ^~~~~~~~~~~~~~~~~~~

R/DEploidR.R:65:37: style: Do not place spaces around code in parentheses or square brackets.

line <- withCallingHandlers( readLines(gzf, n = 1), warning = h)
                                    ^

R/DEploidR.R:69:23: style: Do not place spaces around code in parentheses or square brackets.

vcf <- read.table( gzfile(vcfFileName), skip = numberOfHeaderLines,
                      ^

R/DEploidR.R:73:5: style: Variable or function name should be snake_case.

sampleName <- names(vcf)[10]
    ^~~~~~~~~~

R/DEploidR.R:78:5: style: Variable or function name should be snake_case.

tmpCovStr <- unlist(lapply(field, `[[`, ADFieldIndex))
    ^~~~~~~~~

R/DEploidR.R:79:5: style: Variable or function name should be snake_case.

tmpCov <- strsplit(as.character(tmpCovStr), ",")
    ^~~~~~

R/DEploidR.R:81:5: style: Variable or function name should be snake_case.

refCount <- as.numeric(unlist(lapply(tmpCov, `[[`, 1)))
    ^~~~~~~~

R/DEploidR.R:82:5: style: Variable or function name should be snake_case.

altCount <- as.numeric(unlist(lapply(tmpCov, `[[`, 2)))
    ^~~~~~~~

R/DEploidR.R:84:12: style: Remove spaces before the left parenthesis in a function call.

return ( data.frame( CHROM = vcf[, 1],
           ^

R/DEploidR.R:84:13: style: Do not place spaces around code in parentheses or square brackets.

return ( data.frame( CHROM = vcf[, 1],
            ^

R/DEploidR.R:84:25: style: Do not place spaces around code in parentheses or square brackets.

return ( data.frame( CHROM = vcf[, 1],
                        ^

R/DEploidR.R:87:45: style: Do not place spaces around code in parentheses or square brackets.

altCount = altCount )
                                            ^

R/DEploidR.R:96:1: style: Lines should not be more than 80 characters.

#' @note The text file must have header, and population level allele frequency recorded in the "PLAF" field.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:105:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:108:1: style: Variable or function name should be snake_case.

extractPLAF <- function ( plafFileName ){
^~~~~~~~~~~

R/DEploidR.R:108:25: style: Remove spaces before the left parenthesis in a function call.

extractPLAF <- function ( plafFileName ){
                        ^

R/DEploidR.R:108:26: style: Do not place spaces around code in parentheses or square brackets.

extractPLAF <- function ( plafFileName ){
                         ^

R/DEploidR.R:108:27: style: Variable or function name should be snake_case.

extractPLAF <- function ( plafFileName ){
                          ^~~~~~~~~~~~

R/DEploidR.R:108:39: style: Do not place spaces around code in parentheses or square brackets.

extractPLAF <- function ( plafFileName ){
                                      ^

R/DEploidR.R:109:12: style: Remove spaces before the left parenthesis in a function call.

return ( read.table(plafFileName, header = T)$PLAF )
           ^

R/DEploidR.R:109:13: style: Do not place spaces around code in parentheses or square brackets.

return ( read.table(plafFileName, header = T)$PLAF )
            ^

R/DEploidR.R:109:55: style: Do not place spaces around code in parentheses or square brackets.

return ( read.table(plafFileName, header = T)$PLAF )
                                                      ^

R/DEploidR.R:115:1: style: Lines should not be more than 80 characters.

#' @description Plot the MCMC samples of the proportion, indexed by the MCMC chain.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:117:1: style: Lines should not be more than 80 characters.

#' @param proportions Matrix of the MCMC proportion samples. The matrix size is number of the MCMC samples by the number of strains.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:131:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:132:1: style: Lines should not be more than 80 characters.

#' panelFile = system.file("extdata", "labStrains.test.panel.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:138:1: style: Lines should not be more than 80 characters.

#' plotProportions( PG0390CoverageTxt.deconv$Proportions, "PG0390-C proportions" )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:141:1: style: Variable or function name should be snake_case.

plotProportions <- function (proportions, title = "Components",
^~~~~~~~~~~~~~~

R/DEploidR.R:141:29: style: Remove spaces before the left parenthesis in a function call.

plotProportions <- function (proportions, title = "Components",
                            ^

R/DEploidR.R:142:24: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                       ^~~~~~~

R/DEploidR.R:142:37: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                    ^~~~~~~~

R/DEploidR.R:142:51: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                  ^~~~~~~~

R/DEploidR.R:142:63: style: Do not place spaces around code in parentheses or square brackets.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                              ^

R/DEploidR.R:143:5: style: Variable or function name should be snake_case.

rainbowColorBin <- 16
    ^~~~~~~~~~~~~~~

R/DEploidR.R:153:1: style: Lines should not be more than 80 characters.

#' @description Plot alternative allele count vs reference allele count at each site.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:161:1: style: Lines should not be more than 80 characters.

#' @param exclude.ref Numeric array of reference allele count at sites that are not deconvoluted.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:163:1: style: Lines should not be more than 80 characters.

#' @param exclude.alt Numeric array of alternative allele count at sites that are not deconvoluted
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:187:1: style: Variable or function name should be snake_case.

plotAltVsRef <- function ( ref, alt, title = "Alt vs Ref",
^~~~~~~~~~~~

R/DEploidR.R:187:26: style: Remove spaces before the left parenthesis in a function call.

plotAltVsRef <- function ( ref, alt, title = "Alt vs Ref",
                         ^

R/DEploidR.R:187:27: style: Do not place spaces around code in parentheses or square brackets.

plotAltVsRef <- function ( ref, alt, title = "Alt vs Ref",
                          ^

R/DEploidR.R:188:21: style: Variable or function name should be snake_case.

exclude.ref = c(), exclude.alt = c(),
                    ^~~~~~~~~~~

R/DEploidR.R:188:40: style: Variable or function name should be snake_case.

exclude.ref = c(), exclude.alt = c(),
                                       ^~~~~~~~~~~

R/DEploidR.R:189:21: style: Variable or function name should be snake_case.

potentialOutliers = c(), cex.lab = 1, cex.main = 1,
                    ^~~~~~~~~~~~~~~~~

R/DEploidR.R:189:46: style: Variable or function name should be snake_case.

potentialOutliers = c(), cex.lab = 1, cex.main = 1,
                                             ^~~~~~~

R/DEploidR.R:189:59: style: Variable or function name should be snake_case.

potentialOutliers = c(), cex.lab = 1, cex.main = 1,
                                                          ^~~~~~~~

R/DEploidR.R:190:21: style: Variable or function name should be snake_case.

cex.axis = 1 ){
                    ^~~~~~~~

R/DEploidR.R:190:33: style: Do not place spaces around code in parentheses or square brackets.

cex.axis = 1 ){
                                ^

R/DEploidR.R:194:5: style: Variable or function name should be snake_case.

tmpRange <- 1.1 * mean(max(alt), max(ref))
    ^~~~~~~~

R/DEploidR.R:195:10: style: Remove spaces before the left parenthesis in a function call.

​    plot ( ref, alt, xlim = c(0, tmpRange), ylim = c(0, tmpRange),
         ^

R/DEploidR.R:195:11: style: Do not place spaces around code in parentheses or square brackets.

​    plot ( ref, alt, xlim = c(0, tmpRange), ylim = c(0, tmpRange),
          ^

R/DEploidR.R:210:9: style: Do not place spaces around code in parentheses or square brackets.

if ( length(potentialOutliers) > 0 ){
        ^

R/DEploidR.R:210:39: style: Do not place spaces around code in parentheses or square brackets.

if ( length(potentialOutliers) > 0 ){
                                      ^

R/DEploidR.R:242:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageTxt$altCount, PG0390CoverageTxt$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:249:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageVcf$altCount, PG0390CoverageVcf$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:253:1: style: Variable or function name should be snake_case.

histWSAF <- function ( obsWSAF, exclusive = TRUE,
^~~~~~~~

R/DEploidR.R:253:22: style: Remove spaces before the left parenthesis in a function call.

histWSAF <- function ( obsWSAF, exclusive = TRUE,
                     ^

R/DEploidR.R:253:23: style: Do not place spaces around code in parentheses or square brackets.

histWSAF <- function ( obsWSAF, exclusive = TRUE,
                      ^

R/DEploidR.R:253:24: style: Variable or function name should be snake_case.

histWSAF <- function ( obsWSAF, exclusive = TRUE,
                       ^~~~~~~

R/DEploidR.R:255:17: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                ^~~~~~~

R/DEploidR.R:255:30: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                             ^~~~~~~~

R/DEploidR.R:255:44: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                           ^~~~~~~~

R/DEploidR.R:255:56: style: Do not place spaces around code in parentheses or square brackets.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                       ^

R/DEploidR.R:256:5: style: Variable or function name should be snake_case.

tmpWSAFIndex <- 1:length(obsWSAF)
    ^~~~~~~~~~~~

R/DEploidR.R:257:9: style: Do not place spaces around code in parentheses or square brackets.

if ( exclusive ){
        ^

R/DEploidR.R:257:19: style: Do not place spaces around code in parentheses or square brackets.

if ( exclusive ){
                  ^

R/DEploidR.R:258:9: style: Variable or function name should be snake_case.

tmpWSAFIndex <- which( ( (obsWSAF < 1) * (obsWSAF > 0) ) == 1)
        ^~~~~~~~~~~~

R/DEploidR.R:258:31: style: Do not place spaces around code in parentheses or square brackets.

tmpWSAFIndex <- which( ( (obsWSAF < 1) * (obsWSAF > 0) ) == 1)
                              ^

R/DEploidR.R:258:33: style: Do not place spaces around code in parentheses or square brackets.

tmpWSAFIndex <- which( ( (obsWSAF < 1) * (obsWSAF > 0) ) == 1)
                                ^

R/DEploidR.R:258:63: style: Do not place spaces around code in parentheses or square brackets.

tmpWSAFIndex <- which( ( (obsWSAF < 1) * (obsWSAF > 0) ) == 1)
                                                              ^

R/DEploidR.R:260:12: style: Remove spaces before the left parenthesis in a function call.

return (hist(obsWSAF[tmpWSAFIndex], main = title,
           ^

R/DEploidR.R:273:1: style: Lines should not be more than 80 characters.

#' @param obsWSAF Numeric array of observed altenative allele frequencies within sample.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:294:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageTxt$altCount, PG0390CoverageTxt$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:295:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:302:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageVcf$altCount, PG0390CoverageVcf$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:303:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:307:1: style: Variable or function name should be snake_case.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
^~~~~~~~~~~~~~

R/DEploidR.R:307:28: style: Remove spaces before the left parenthesis in a function call.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
                           ^

R/DEploidR.R:307:29: style: Do not place spaces around code in parentheses or square brackets.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
                            ^

R/DEploidR.R:307:36: style: Variable or function name should be snake_case.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
                                   ^~~~~~~

R/DEploidR.R:307:45: style: Variable or function name should be snake_case.

plotWSAFvsPLAF <- function ( plaf, obsWSAF, expWSAF = c(),
                                            ^~~~~~~

R/DEploidR.R:308:23: style: Variable or function name should be snake_case.

potentialOutliers = c(), title = "WSAF vs PLAF",
                      ^~~~~~~~~~~~~~~~~

R/DEploidR.R:309:23: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                      ^~~~~~~

R/DEploidR.R:309:36: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                   ^~~~~~~~

R/DEploidR.R:309:50: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                 ^~~~~~~~

R/DEploidR.R:309:62: style: Do not place spaces around code in parentheses or square brackets.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                             ^

R/DEploidR.R:310:10: style: Remove spaces before the left parenthesis in a function call.

​    plot ( plaf, obsWSAF, cex = 0.5, xlim = c(0, 1), ylim = c(0, 1),
         ^

R/DEploidR.R:310:11: style: Do not place spaces around code in parentheses or square brackets.

​    plot ( plaf, obsWSAF, cex = 0.5, xlim = c(0, 1), ylim = c(0, 1),
          ^

R/DEploidR.R:313:9: style: Do not place spaces around code in parentheses or square brackets.

if ( length(expWSAF) > 0 ){
        ^

R/DEploidR.R:313:29: style: Do not place spaces around code in parentheses or square brackets.

if ( length(expWSAF) > 0 ){
                            ^

R/DEploidR.R:314:16: style: Remove spaces before the left parenthesis in a function call.

​        points ( plaf, expWSAF, cex = 0.5, col = "blue")
               ^

R/DEploidR.R:314:17: style: Do not place spaces around code in parentheses or square brackets.

​        points ( plaf, expWSAF, cex = 0.5, col = "blue")
                ^

R/DEploidR.R:316:9: style: Do not place spaces around code in parentheses or square brackets.

if ( length(potentialOutliers) > 0 ){
        ^

R/DEploidR.R:316:39: style: Do not place spaces around code in parentheses or square brackets.

if ( length(potentialOutliers) > 0 ){
                                      ^

R/DEploidR.R:326:1: style: Lines should not be more than 80 characters.

#' @description Plot observed alternative allele frequency within sample against expected WSAF.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:346:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageVcf$altCount, PG0390CoverageVcf$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:347:1: style: Lines should not be more than 80 characters.

#' plafFile = system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:348:1: style: Lines should not be more than 80 characters.

#' PG0390CoverageVcf.deconv = dEploid(paste("-vcf", vcfFile, "-plaf", plafFile, "-noPanel"))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:349:1: style: Lines should not be more than 80 characters.

#' prop = PG0390CoverageVcf.deconv$Proportions[dim(PG0390CoverageVcf.deconv$Proportions)[1],]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:354:1: style: Variable or function name should be snake_case.

plotObsExpWSAF <- function (obsWSAF, expWSAF,
^~~~~~~~~~~~~~

R/DEploidR.R:354:28: style: Remove spaces before the left parenthesis in a function call.

plotObsExpWSAF <- function (obsWSAF, expWSAF,
                           ^

R/DEploidR.R:354:29: style: Variable or function name should be snake_case.

plotObsExpWSAF <- function (obsWSAF, expWSAF,
                            ^~~~~~~

R/DEploidR.R:354:38: style: Variable or function name should be snake_case.

plotObsExpWSAF <- function (obsWSAF, expWSAF,
                                     ^~~~~~~

R/DEploidR.R:356:23: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                      ^~~~~~~

R/DEploidR.R:356:36: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                   ^~~~~~~~

R/DEploidR.R:356:50: style: Variable or function name should be snake_case.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                 ^~~~~~~~

R/DEploidR.R:356:62: style: Do not place spaces around code in parentheses or square brackets.

cex.lab = 1, cex.main = 1, cex.axis = 1 ){
                                                             ^

R/DEploidR.R:367:1: style: Lines should not be more than 80 characters.

#' @description Compute observed allele frequency within sample from the allele counts.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:384:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageTxt$altCount, PG0390CoverageTxt$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:389:1: style: Lines should not be more than 80 characters.

#' obsWSAF = computeObsWSAF( PG0390CoverageVcf$altCount, PG0390CoverageVcf$refCount )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:391:1: style: Variable or function name should be snake_case.

computeObsWSAF <- function (alt, ref) {
^~~~~~~~~~~~~~

R/DEploidR.R:391:28: style: Remove spaces before the left parenthesis in a function call.

computeObsWSAF <- function (alt, ref) {
                           ^

R/DEploidR.R:392:12: style: Remove spaces before the left parenthesis in a function call.

return ( alt / (ref + alt + 0.00000001) )
           ^

R/DEploidR.R:392:13: style: Do not place spaces around code in parentheses or square brackets.

return ( alt / (ref + alt + 0.00000001) )
            ^

R/DEploidR.R:392:44: style: Do not place spaces around code in parentheses or square brackets.

return ( alt / (ref + alt + 0.00000001) )
                                           ^

R/DEploidR.R:398:1: style: Lines should not be more than 80 characters.

#' @description Plot the posterior probabilities of a haplotype given the refernece panel.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:400:1: style: Lines should not be more than 80 characters.

#' @param posteriorProbabilities Posterior probabilities matrix with the size of number of loci by the number of reference strain.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:410:1: style: Variable or function name should be snake_case.

haplotypePainter <- function (posteriorProbabilities, title = "", labelScaling,
^~~~~~~~~~~~~~~~

R/DEploidR.R:410:30: style: Remove spaces before the left parenthesis in a function call.

haplotypePainter <- function (posteriorProbabilities, title = "", labelScaling,
                             ^

R/DEploidR.R:410:31: style: Variable or function name should be snake_case.

haplotypePainter <- function (posteriorProbabilities, title = "", labelScaling,
                              ^~~~~~~~~~~~~~~~~~~~~~

R/DEploidR.R:410:67: style: Variable or function name should be snake_case.

haplotypePainter <- function (posteriorProbabilities, title = "", labelScaling,
                                                                  ^~~~~~~~~~~~

R/DEploidR.R:411:25: style: Variable or function name should be snake_case.

numberOfInbreeding = 0){
                        ^~~~~~~~~~~~~~~~~~

R/DEploidR.R:412:5: style: Variable or function name should be snake_case.

rainbowColorBin <- 16
    ^~~~~~~~~~~~~~~

R/DEploidR.R:413:5: style: Variable or function name should be snake_case.

rainbowColors <- rainbow(rainbowColorBin)
    ^~~~~~~~~~~~~

R/DEploidR.R:414:9: style: Do not place spaces around code in parentheses or square brackets.

if ( numberOfInbreeding > 0 ){
        ^

R/DEploidR.R:414:32: style: Do not place spaces around code in parentheses or square brackets.

if ( numberOfInbreeding > 0 ){
                               ^

R/DEploidR.R:415:9: style: Variable or function name should be snake_case.

panelSize <- dim(posteriorProbabilities)[2] - numberOfInbreeding
        ^~~~~~~~~

R/DEploidR.R:416:9: style: Variable or function name should be snake_case.

rainbowColors <- c(rep("#46a8e1", panelSize),
        ^~~~~~~~~~~~~

R/DEploidR.R:424:5: style: Variable or function name should be snake_case.

newXaxt <- round(seq(1, dim(posteriorProbabilities)[1], length.out = 6))
    ^~~~~~~

R/DEploidR.R:427:5: style: Variable or function name should be snake_case.

newYaxt <- seq(0, 1, length.out = 3)
    ^~~~~~~

tests/testthat/test-DEploid_tools.R:3:1: style: Variable or function name should be snake_case.

vcfFileName <- system.file("extdata", "PG0390-C.test.vcf.gz",
^~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:5:1: style: Variable or function name should be snake_case.

plafFileName <- system.file("extdata", "labStrains.test.PLAF.txt",
^~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:7:1: style: Variable or function name should be snake_case.

panelFileName <- system.file("extdata", "labStrains.test.panel.txt",
^~~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:9:1: style: Variable or function name should be snake_case.

refFileName <- system.file("extdata", "PG0390-C.test.ref", package = "DEploid")
^~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:10:1: style: Variable or function name should be snake_case.

altFileName <- system.file("extdata", "PG0390-C.test.alt", package = "DEploid")
^~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:12:1: style: Variable or function name should be snake_case.

PG0390CoverageVcf <- extractCoverageFromVcf(vcfFileName)
^~~~~~~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:15:1: style: Variable or function name should be snake_case.

PG0390Deconv <- dEploid(paste("-vcf", vcfFileName, "-plaf", plafFileName,
^~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:18:1: style: Variable or function name should be snake_case.

expWSAF <- t(PG0390Deconv$Haps) %*% prop
^~~~~~~

tests/testthat/test-DEploid_tools.R:21:5: style: Variable or function name should be snake_case.

PG0390CoverageTxt <- extractCoverageFromTxt(refFileName, altFileName)
    ^~~~~~~~~~~~~~~~~

tests/testthat/test-DEploid_tools.R:44:5: style: Variable or function name should be snake_case.

obsWSAF <- computeObsWSAF(PG0390CoverageVcf$altCount,
    ^~~~~~~

tests/testthat/test-DEploid_tools.R:54:30: style: Do not place spaces around code in parentheses or square brackets.

​    expect_null(plotAltVsRef( PG0390CoverageVcf$refCount,
                             ^

tests/testthat/test-DEploid_tools.R:55:35: style: Do not place spaces around code in parentheses or square brackets.

PG0390CoverageVcf$altCount ))
                                  ^

tests/testthat/test-dEploid.R:3:1: style: Variable or function name should be snake_case.

vcfFileName <- system.file("extdata", "PG0390-C.test.vcf.gz",
^~~~~~~~~~~

tests/testthat/test-dEploid.R:5:1: style: Variable or function name should be snake_case.

plafFileName <- system.file("extdata", "labStrains.test.PLAF.txt",
^~~~~~~~~~~~

Please sign in to comment.