Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
shajoezhu authored Oct 14, 2016
1 parent 5ac175d commit 01060c8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,32 @@ Installation

Please install `Rcpp` package first. From the `R`-console, type
```R
install.packages("Rcpp")
> install.packages("Rcpp")
```

On specific operating systems, please carry out the following:

### Unix-like system

```R
install.packages("DEploid_0.3.1.tar.gz", repos=NULL)
> install.packages("DEploid_0.3.1.tar.gz", repos=NULL)
```

### Windows

Please first install [https://cran.r-project.org/bin/windows/Rtools/](`Rtools`), then
```R
install.packages("DEploid_0.3.1.tar.gz", repos=NULL)
> install.packages("DEploid_0.3.1.tar.gz", repos=NULL)
```

Usage
-----

Please refer to the help page and examples for each function. For example,
```R
library(DEploid)
?dEploid
?plotProportions
> library(DEploid)
> ?dEploid
> ?plotProportions
```

Licence
Expand Down

6 comments on commit 01060c8

@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/dEploidTools.R:1:22: style: Do not place spaces around code in parentheses or square brackets.

fun.parse <- function( args ){
                     ^

R/dEploidTools.R:1:28: style: Do not place spaces around code in parentheses or square brackets.

fun.parse <- function( args ){
                           ^

R/dEploidTools.R:2:5: style: Variable and function names should be all lowercase.

fun.local.checkAndIncreaseArgI <- function ( ){
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:2:5: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.local.checkAndIncreaseArgI <- function ( ){
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:2:48: style: Do not place spaces around code in parentheses or square brackets.

fun.local.checkAndIncreaseArgI <- function ( ){
                                               ^

R/dEploidTools.R:3:15: style: Use <-, not =, for assignment.

arg_i = arg_i+1
              ^

R/dEploidTools.R:3:22: style: Put spaces around all infix operators.

arg_i = arg_i+1
                    ~^~

R/dEploidTools.R:6:5: style: Variable and function names should be all lowercase.

outPrefix = "dataExplore"
    ^~~~~~~~~

R/dEploidTools.R:6:15: style: Use <-, not =, for assignment.

outPrefix = "dataExplore"
              ^

R/dEploidTools.R:7:5: style: Variable and function names should be all lowercase.

vcfFileName = ""
    ^~~~~~~~~~~

R/dEploidTools.R:7:17: style: Use <-, not =, for assignment.

vcfFileName = ""
                ^

R/dEploidTools.R:8:5: style: Variable and function names should be all lowercase.

refFileName = ""
    ^~~~~~~~~~~

R/dEploidTools.R:8:17: style: Use <-, not =, for assignment.

refFileName = ""
                ^

R/dEploidTools.R:9:5: style: Variable and function names should be all lowercase.

altFileName = ""
    ^~~~~~~~~~~

R/dEploidTools.R:9:17: style: Use <-, not =, for assignment.

altFileName = ""
                ^

R/dEploidTools.R:10:5: style: Variable and function names should be all lowercase.

plafFileName = ""
    ^~~~~~~~~~~~

R/dEploidTools.R:10:18: style: Use <-, not =, for assignment.

plafFileName = ""
                 ^

R/dEploidTools.R:11:5: style: Variable and function names should be all lowercase.

excludeFileName = ""
    ^~~~~~~~~~~~~~~

R/dEploidTools.R:11:21: style: Use <-, not =, for assignment.

excludeFileName = ""
                    ^

R/dEploidTools.R:12:5: style: Variable and function names should be all lowercase.

dEploidPrefix = ""
    ^~~~~~~~~~~~~

R/dEploidTools.R:12:19: style: Use <-, not =, for assignment.

dEploidPrefix = ""
                  ^

R/dEploidTools.R:13:5: style: Variable and function names should be all lowercase.

excludeBool = FALSE
    ^~~~~~~~~~~

R/dEploidTools.R:13:17: style: Use <-, not =, for assignment.

excludeBool = FALSE
                ^

R/dEploidTools.R:15:11: style: Use <-, not =, for assignment.

arg_i = 1
          ^

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

while ( arg_i < length(args) ){
          ^

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

while ( arg_i < length(args) ){
                                ^

R/dEploidTools.R:17:14: style: Use <-, not =, for assignment.

argv = args[arg_i]
             ^

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

if ( argv == "-vcf" ){
           ^

R/dEploidTools.R:18:28: style: Do not place spaces around code in parentheses or square brackets.

if ( argv == "-vcf" ){
                           ^

R/dEploidTools.R:19:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:19:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:19:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:20:13: style: Variable and function names should be all lowercase.

vcfFileName = args[arg_i]
            ^~~~~~~~~~~

R/dEploidTools.R:20:25: style: Use <-, not =, for assignment.

vcfFileName = args[arg_i]
                        ^

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

​        } else if ( argv == "-plaf" ){
                  ^

R/dEploidTools.R:21:36: style: Do not place spaces around code in parentheses or square brackets.

​        } else if ( argv == "-plaf" ){
                                   ^

R/dEploidTools.R:22:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:22:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:22:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:23:13: style: Variable and function names should be all lowercase.

plafFileName = args[arg_i]
            ^~~~~~~~~~~~

R/dEploidTools.R:23:26: style: Use <-, not =, for assignment.

plafFileName = args[arg_i]
                         ^

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

​        } else if ( argv == "-ref" ){
                  ^

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

​        } else if ( argv == "-ref" ){
                                  ^

R/dEploidTools.R:25:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:25:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:25:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:26:13: style: Variable and function names should be all lowercase.

refFileName = args[arg_i]
            ^~~~~~~~~~~

R/dEploidTools.R:26:25: style: Use <-, not =, for assignment.

refFileName = args[arg_i]
                        ^

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

​        } else if ( argv == "-alt" ){
                  ^

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

​        } else if ( argv == "-alt" ){
                                  ^

R/dEploidTools.R:28:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:28:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:28:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:29:13: style: Variable and function names should be all lowercase.

altFileName = args[arg_i]
            ^~~~~~~~~~~

R/dEploidTools.R:29:25: style: Use <-, not =, for assignment.

altFileName = args[arg_i]
                        ^

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

​        } else if ( argv == "-exclude" ){
                  ^

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

​        } else if ( argv == "-exclude" ){
                                      ^

R/dEploidTools.R:31:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:31:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:31:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:32:13: style: Variable and function names should be all lowercase.

excludeFileName = args[arg_i]
            ^~~~~~~~~~~~~~~

R/dEploidTools.R:32:29: style: Use <-, not =, for assignment.

excludeFileName = args[arg_i]
                            ^

R/dEploidTools.R:33:13: style: Variable and function names should be all lowercase.

excludeBool = TRUE
            ^~~~~~~~~~~

R/dEploidTools.R:33:25: style: Use <-, not =, for assignment.

excludeBool = TRUE
                        ^

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

​        } else if ( argv == "-o" ){
                  ^

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

​        } else if ( argv == "-o" ){
                                ^

R/dEploidTools.R:35:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:35:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:35:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:36:13: style: Variable and function names should be all lowercase.

outPrefix = args[arg_i]
            ^~~~~~~~~

R/dEploidTools.R:36:23: style: Use <-, not =, for assignment.

outPrefix = args[arg_i]
                      ^

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

​        } else if ( argv == "-dEprefix" ){
                  ^

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

​        } else if ( argv == "-dEprefix" ){
                                       ^

R/dEploidTools.R:38:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:38:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:38:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:39:13: style: Variable and function names should be all lowercase.

dEploidPrefix = args[arg_i]
            ^~~~~~~~~~~~~

R/dEploidTools.R:39:27: style: Use <-, not =, for assignment.

dEploidPrefix = args[arg_i]
                          ^

R/dEploidTools.R:44:15: style: Use <-, not =, for assignment.

arg_i = arg_i + 1
              ^

R/dEploidTools.R:51:8: style: Do not place spaces around code in parentheses or square brackets.

if ( plafFileName == "" ){
       ^

R/dEploidTools.R:51:10: style: Variable and function names should be all lowercase.

if ( plafFileName == "" ){
         ^~~~~~~~~~~~

R/dEploidTools.R:51:28: style: Do not place spaces around code in parentheses or square brackets.

if ( plafFileName == "" ){
                           ^

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

return ( list ( vcfFileName = vcfFileName,
           ^

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

return ( list ( vcfFileName = vcfFileName,
                  ^

R/dEploidTools.R:58:35: style: Variable and function names should be all lowercase.

return ( list ( vcfFileName = vcfFileName,
                                  ^~~~~~~~~~~

R/dEploidTools.R:59:35: style: Variable and function names should be all lowercase.

refFileName = refFileName,
                                  ^~~~~~~~~~~

R/dEploidTools.R:60:35: style: Variable and function names should be all lowercase.

altFileName = altFileName,
                                  ^~~~~~~~~~~

R/dEploidTools.R:61:36: style: Variable and function names should be all lowercase.

plafFileName = plafFileName,
                                   ^~~~~~~~~~~~

R/dEploidTools.R:62:33: style: Variable and function names should be all lowercase.

outPrefix = outPrefix,
                                ^~~~~~~~~

R/dEploidTools.R:63:37: style: Variable and function names should be all lowercase.

dEploidPrefix = dEploidPrefix,
                                    ^~~~~~~~~~~~~

R/dEploidTools.R:64:39: style: Variable and function names should be all lowercase.

excludeFileName = excludeFileName,
                                      ^~~~~~~~~~~~~~~

R/dEploidTools.R:65:35: style: Variable and function names should be all lowercase.

excludeBool = excludeBool) )
                                  ^~~~~~~~~~~

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

excludeBool = excludeBool) )
                                              ^

R/dEploidTools.R:69:1: style: Variable and function names should be all lowercase.

fun.dEploidPrefix <- function ( prefix ){
^~~~~~~~~~~~~~~~~

R/dEploidTools.R:81:1: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.extract.coverage <- function ( inputs ){
^~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:82:17: style: Variable and function names should be all lowercase.

if ( inputs$vcfFileName != "" ){
                ^~~~~~~~~~~

R/dEploidTools.R:83:17: style: Variable and function names should be all lowercase.

return (extractCoverageFromVcf (inputs$vcfFileName))
                ^~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:83:17: warning: no visible global function definition for ‘extractCoverageFromVcf’

return (extractCoverageFromVcf (inputs$vcfFileName))
                ^~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:83:48: style: Variable and function names should be all lowercase.

return (extractCoverageFromVcf (inputs$vcfFileName))
                                               ^~~~~~~~~~~

R/dEploidTools.R:85:17: style: Variable and function names should be all lowercase.

return (extractCoverageFromTxt (inputs$refFileName, inputs$altFileName))
                ^~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:85:17: warning: no visible global function definition for ‘extractCoverageFromTxt’

return (extractCoverageFromTxt (inputs$refFileName, inputs$altFileName))
                ^~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:85:48: style: Variable and function names should be all lowercase.

return (extractCoverageFromTxt (inputs$refFileName, inputs$altFileName))
                                               ^~~~~~~~~~~

R/dEploidTools.R:85:68: style: Variable and function names should be all lowercase.

return (extractCoverageFromTxt (inputs$refFileName, inputs$altFileName))
                                                                   ^~~~~~~~~~~

R/dEploidTools.R:109:1: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:109:38: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:109:51: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:110:9: style: Use <-, not =, for assignment.

ref = read.table(refFileName, header = TRUE, comment.char = "")
        ^

R/dEploidTools.R:110:22: style: Variable and function names should be all lowercase.

ref = read.table(refFileName, header = TRUE, comment.char = "")
                     ^~~~~~~~~~~

R/dEploidTools.R:111:9: style: Use <-, not =, for assignment.

alt = read.table(altFileName, header = TRUE, comment.char = "")
        ^

R/dEploidTools.R:111:22: style: Variable and function names should be all lowercase.

alt = read.table(altFileName, header = TRUE, comment.char = "")
                     ^~~~~~~~~~~

R/dEploidTools.R:112:39: style: Commas should always have a space after.

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

R/dEploidTools.R:113:37: style: Commas should always have a space after.

POS = ref[,2],
                                    ^

R/dEploidTools.R:114:42: style: Commas should always have a space after.

refCount = ref[,3],
                                         ^

R/dEploidTools.R:115:42: style: Commas should always have a space after.

altCount = alt[,3] )
                                         ^

R/dEploidTools.R:120:1: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.extract.exclude <- function (excludeFileName, excludeBool){
^~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:120:34: style: Variable and function names should be all lowercase.

fun.extract.exclude <- function (excludeFileName, excludeBool){
                                 ^~~~~~~~~~~~~~~

R/dEploidTools.R:120:51: style: Variable and function names should be all lowercase.

fun.extract.exclude <- function (excludeFileName, excludeBool){
                                                  ^~~~~~~~~~~

R/dEploidTools.R:121:10: style: Variable and function names should be all lowercase.

if ( excludeBool ) {
         ^~~~~~~~~~~

R/dEploidTools.R:122:39: style: Variable and function names should be all lowercase.

return ( list ( excludeBool = excludeBool,
                                      ^~~~~~~~~~~

R/dEploidTools.R:123:1: style: lines should not be more than 80 characters.

excludeTable = read.table(excludeFileName, header = TRUE, comment.char = "")))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:123:51: style: Variable and function names should be all lowercase.

excludeTable = read.table(excludeFileName, header = TRUE, comment.char = "")))
                                                  ^~~~~~~~~~~~~~~

R/dEploidTools.R:125:39: style: Variable and function names should be all lowercase.

return ( list ( excludeBool = excludeBool ))
                                      ^~~~~~~~~~~

R/dEploidTools.R:147:1: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:147:38: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:147:47: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:150:12: style: Place a space before left parenthesis, except in a function call.

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

R/dEploidTools.R:154:9: style: Use <-, not =, for assignment.

gzf = gzfile(vcfFile, open = "rb")
        ^

R/dEploidTools.R:154:18: style: Variable and function names should be all lowercase.

gzf = gzfile(vcfFile, open = "rb")
                 ^~~~~~~

R/dEploidTools.R:154:18: warning: no visible binding for global variable ‘vcfFile’

gzf = gzfile(vcfFile, open = "rb")
                 ^~~~~~~

R/dEploidTools.R:155:5: style: Variable and function names should be all lowercase.

skipNum = 0
    ^~~~~~~

R/dEploidTools.R:155:13: style: Use <-, not =, for assignment.

skipNum = 0
            ^

R/dEploidTools.R:156:10: style: Use <-, not =, for assignment.

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

R/dEploidTools.R:156:49: style: Put spaces around all infix operators.

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

R/dEploidTools.R:156:61: style: Put spaces around all infix operators.

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

R/dEploidTools.R:158:21: style: Commented code should be removed.

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

R/dEploidTools.R:159:13: style: Variable and function names should be all lowercase.

skipNum = skipNum+1
            ^~~~~~~

R/dEploidTools.R:159:21: style: Use <-, not =, for assignment.

skipNum = skipNum+1
                    ^

R/dEploidTools.R:159:23: style: Variable and function names should be all lowercase.

skipNum = skipNum+1
                      ^~~~~~~

R/dEploidTools.R:159:30: style: Put spaces around all infix operators.

skipNum = skipNum+1
                            ~^~

R/dEploidTools.R:163:14: style: Use <-, not =, for assignment.

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

R/dEploidTools.R:163:53: style: Put spaces around all infix operators.

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

R/dEploidTools.R:163:65: style: Put spaces around all infix operators.

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

R/dEploidTools.R:167:1: style: lines should not be more than 80 characters.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:167:10: style: Use <-, not =, for assignment.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
         ^

R/dEploidTools.R:167:31: style: Variable and function names should be all lowercase.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                              ^~~~~~~

R/dEploidTools.R:167:45: style: Put spaces around all infix operators.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                           ~^~

R/dEploidTools.R:167:46: style: Variable and function names should be all lowercase.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                             ^~~~~~~

R/dEploidTools.R:167:61: style: Put spaces around all infix operators.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                                           ~^~

R/dEploidTools.R:167:77: style: Put spaces around all infix operators.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                                                           ~^~

R/dEploidTools.R:167:119: style: Put spaces around all infix operators.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                                                                                                     ~^~

R/dEploidTools.R:169:5: style: Variable and function names should be all lowercase.

sampleName = names(vcf)[10]
    ^~~~~~~~~~

R/dEploidTools.R:169:16: style: Use <-, not =, for assignment.

sampleName = names(vcf)[10]
               ^

R/dEploidTools.R:171:9: style: Use <-, not =, for assignment.

tmp = vcf[[sampleName]]
        ^

R/dEploidTools.R:171:16: style: Variable and function names should be all lowercase.

tmp = vcf[[sampleName]]
               ^~~~~~~~~~

R/dEploidTools.R:172:11: style: Use <-, not =, for assignment.

field = strsplit(as.character(tmp),":")
          ^

R/dEploidTools.R:172:40: style: Commas should always have a space after.

field = strsplit(as.character(tmp),":")
                                       ^

R/dEploidTools.R:174:5: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:174:15: style: Use <-, not =, for assignment.

tmpCovStr = unlist(lapply(field, `[[`, ADFieldIndex))
              ^

R/dEploidTools.R:174:44: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:175:5: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:175:12: style: Use <-, not =, for assignment.

tmpCov = strsplit(as.character(tmpCovStr),",")
           ^

R/dEploidTools.R:175:36: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:175:47: style: Commas should always have a space after.

tmpCov = strsplit(as.character(tmpCovStr),",")
                                              ^

R/dEploidTools.R:177:5: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:177:14: style: Use <-, not =, for assignment.

refCount = as.numeric(unlist(lapply(tmpCov, `[[`, 1)))
             ^

R/dEploidTools.R:177:41: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:178:5: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:178:14: style: Use <-, not =, for assignment.

altCount = as.numeric(unlist(lapply(tmpCov, `[[`, 2)))
             ^

R/dEploidTools.R:178:41: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:180:39: style: Commas should always have a space after.

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

R/dEploidTools.R:181:37: style: Commas should always have a space after.

POS = vcf[,2],
                                    ^

R/dEploidTools.R:182:37: style: Variable and function names should be all lowercase.

refCount = refCount,
                                    ^~~~~~~~

R/dEploidTools.R:183:37: style: Variable and function names should be all lowercase.

altCount = altCount )
                                    ^~~~~~~~

R/dEploidTools.R:204:1: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:204:12: style: Put spaces around all infix operators.

extractPLAF<- function ( plafName ){
          ~^

R/dEploidTools.R:204:26: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:205:25: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:205:41: style: Put spaces around all infix operators.

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

R/dEploidTools.R:210:11: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
         ~^~~

R/dEploidTools.R:210:19: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
                 ~^~

R/dEploidTools.R:210:23: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
                     ~^~

R/dEploidTools.R:210:24: style: Place a space before left parenthesis, except in a function call.

f.samp<-f.samp+err*(1-2*f.samp);
                       ^

R/dEploidTools.R:210:26: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
                        ~^~

R/dEploidTools.R:210:28: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
                          ~^~

R/dEploidTools.R:211:1: style: lines should not be more than 80 characters.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:211:8: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
      ~^~~

R/dEploidTools.R:211:23: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                     ~^~

R/dEploidTools.R:211:30: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                            ~^~

R/dEploidTools.R:211:43: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                         ~^~

R/dEploidTools.R:211:44: style: Place a space before left parenthesis, except in a function call.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                           ^

R/dEploidTools.R:211:46: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                            ~^~

R/dEploidTools.R:211:54: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                    ~^~

R/dEploidTools.R:211:59: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                         ~^~

R/dEploidTools.R:211:72: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                      ~^~

R/dEploidTools.R:211:77: style: Commas should always have a space after.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                            ^

R/dEploidTools.R:211:77: style: Place a space before left parenthesis, except in a function call.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                            ^

R/dEploidTools.R:211:79: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                             ~^~

R/dEploidTools.R:211:87: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                                     ~^~

R/dEploidTools.R:212:1: style: lines should not be more than 80 characters.

#  llk<-lgamma(fac*f.samp+cov.alt)+lgamma(fac*(1-f.samp)+cov.ref)-lgamma(fac*f.samp)-lgamma(fac*(1-f.samp));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:212:8: style: Commented code should be removed.

#  llk<-lgamma(fac*f.samp+cov.alt)+lgamma(fac*(1-f.samp)+cov.ref)-lgamma(fac*f.samp)-lgamma(fac*(1-f.samp));
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:213:25: style: Put spaces around all infix operators.

if (sum(is.nan(llk))>1){
                       ~^~

R/dEploidTools.R:220:1: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.dic.by.llk.var <- function ( tmpllk ){
^~~~~~~~~~~~~~~~~~

R/dEploidTools.R:221:1: style: lines should not be more than 80 characters.

return (  mean(-2*tmpllk) + var(-2*tmpllk)/2 )# D_bar + 1/2 var (D_theta), where D_theta = -2*tmpllk, and D_bar = mean(D_theta)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:221:23: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + var(-2*tmpllk)/2 )# D_bar + 1/2 var (D_theta), where D_theta = -2*tmpllk, and D_bar = mean(D_theta)
                     ~^~

R/dEploidTools.R:221:40: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + var(-2*tmpllk)/2 )# D_bar + 1/2 var (D_theta), where D_theta = -2*tmpllk, and D_bar = mean(D_theta)
                                      ~^~

R/dEploidTools.R:221:48: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + var(-2*tmpllk)/2 )# D_bar + 1/2 var (D_theta), where D_theta = -2*tmpllk, and D_bar = mean(D_theta)
                                              ~^~

R/dEploidTools.R:225:1: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.dic.by.theta <- function ( tmpllk, thetallk ){
^~~~~~~~~~~~~~~~

R/dEploidTools.R:226:5: style: Words within variable and function names should be separated by '_' rather than '.'.

DIC.WSAF.bar = -2 * sum(thetallk)
    ^~~~~~~~~~~~

R/dEploidTools.R:226:18: style: Use <-, not =, for assignment.

DIC.WSAF.bar = -2 * sum(thetallk)
                 ^

R/dEploidTools.R:227:1: style: lines should not be more than 80 characters.

return (  mean(-2*tmpllk) + (mean(-2*tmpllk) - DIC.WSAF.bar) ) # D_bar + pD, where pD = D_bar - D_theta, and D_bar = mean(D_theta)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:227:22: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + (mean(-2*tmpllk) - DIC.WSAF.bar) ) # D_bar + pD, where pD = D_bar - D_theta, and D_bar = mean(D_theta)
                    ~^~

R/dEploidTools.R:227:41: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + (mean(-2*tmpllk) - DIC.WSAF.bar) ) # D_bar + pD, where pD = D_bar - D_theta, and D_bar = mean(D_theta)
                                       ~^~

@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/dEploidTools.R:1:22: style: Do not place spaces around code in parentheses or square brackets.

fun.parse <- function( args ){
                     ^

R/dEploidTools.R:1:28: style: Do not place spaces around code in parentheses or square brackets.

fun.parse <- function( args ){
                           ^

R/dEploidTools.R:2:5: style: Variable and function names should be all lowercase.

fun.local.checkAndIncreaseArgI <- function ( ){
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:2:5: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.local.checkAndIncreaseArgI <- function ( ){
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:2:48: style: Do not place spaces around code in parentheses or square brackets.

fun.local.checkAndIncreaseArgI <- function ( ){
                                               ^

R/dEploidTools.R:3:15: style: Use <-, not =, for assignment.

arg_i = arg_i+1
              ^

R/dEploidTools.R:3:22: style: Put spaces around all infix operators.

arg_i = arg_i+1
                    ~^~

R/dEploidTools.R:6:5: style: Variable and function names should be all lowercase.

outPrefix = "dataExplore"
    ^~~~~~~~~

R/dEploidTools.R:6:15: style: Use <-, not =, for assignment.

outPrefix = "dataExplore"
              ^

R/dEploidTools.R:7:5: style: Variable and function names should be all lowercase.

vcfFileName = ""
    ^~~~~~~~~~~

R/dEploidTools.R:7:17: style: Use <-, not =, for assignment.

vcfFileName = ""
                ^

R/dEploidTools.R:8:5: style: Variable and function names should be all lowercase.

refFileName = ""
    ^~~~~~~~~~~

R/dEploidTools.R:8:17: style: Use <-, not =, for assignment.

refFileName = ""
                ^

R/dEploidTools.R:9:5: style: Variable and function names should be all lowercase.

altFileName = ""
    ^~~~~~~~~~~

R/dEploidTools.R:9:17: style: Use <-, not =, for assignment.

altFileName = ""
                ^

R/dEploidTools.R:10:5: style: Variable and function names should be all lowercase.

plafFileName = ""
    ^~~~~~~~~~~~

R/dEploidTools.R:10:18: style: Use <-, not =, for assignment.

plafFileName = ""
                 ^

R/dEploidTools.R:11:5: style: Variable and function names should be all lowercase.

excludeFileName = ""
    ^~~~~~~~~~~~~~~

R/dEploidTools.R:11:21: style: Use <-, not =, for assignment.

excludeFileName = ""
                    ^

R/dEploidTools.R:12:5: style: Variable and function names should be all lowercase.

dEploidPrefix = ""
    ^~~~~~~~~~~~~

R/dEploidTools.R:12:19: style: Use <-, not =, for assignment.

dEploidPrefix = ""
                  ^

R/dEploidTools.R:13:5: style: Variable and function names should be all lowercase.

excludeBool = FALSE
    ^~~~~~~~~~~

R/dEploidTools.R:13:17: style: Use <-, not =, for assignment.

excludeBool = FALSE
                ^

R/dEploidTools.R:15:11: style: Use <-, not =, for assignment.

arg_i = 1
          ^

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

while ( arg_i < length(args) ){
          ^

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

while ( arg_i < length(args) ){
                                ^

R/dEploidTools.R:17:14: style: Use <-, not =, for assignment.

argv = args[arg_i]
             ^

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

if ( argv == "-vcf" ){
           ^

R/dEploidTools.R:18:28: style: Do not place spaces around code in parentheses or square brackets.

if ( argv == "-vcf" ){
                           ^

R/dEploidTools.R:19:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:19:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:19:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:20:13: style: Variable and function names should be all lowercase.

vcfFileName = args[arg_i]
            ^~~~~~~~~~~

R/dEploidTools.R:20:25: style: Use <-, not =, for assignment.

vcfFileName = args[arg_i]
                        ^

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

​        } else if ( argv == "-plaf" ){
                  ^

R/dEploidTools.R:21:36: style: Do not place spaces around code in parentheses or square brackets.

​        } else if ( argv == "-plaf" ){
                                   ^

R/dEploidTools.R:22:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:22:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:22:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:23:13: style: Variable and function names should be all lowercase.

plafFileName = args[arg_i]
            ^~~~~~~~~~~~

R/dEploidTools.R:23:26: style: Use <-, not =, for assignment.

plafFileName = args[arg_i]
                         ^

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

​        } else if ( argv == "-ref" ){
                  ^

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

​        } else if ( argv == "-ref" ){
                                  ^

R/dEploidTools.R:25:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:25:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:25:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:26:13: style: Variable and function names should be all lowercase.

refFileName = args[arg_i]
            ^~~~~~~~~~~

R/dEploidTools.R:26:25: style: Use <-, not =, for assignment.

refFileName = args[arg_i]
                        ^

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

​        } else if ( argv == "-alt" ){
                  ^

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

​        } else if ( argv == "-alt" ){
                                  ^

R/dEploidTools.R:28:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:28:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:28:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:29:13: style: Variable and function names should be all lowercase.

altFileName = args[arg_i]
            ^~~~~~~~~~~

R/dEploidTools.R:29:25: style: Use <-, not =, for assignment.

altFileName = args[arg_i]
                        ^

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

​        } else if ( argv == "-exclude" ){
                  ^

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

​        } else if ( argv == "-exclude" ){
                                      ^

R/dEploidTools.R:31:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:31:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:31:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:32:13: style: Variable and function names should be all lowercase.

excludeFileName = args[arg_i]
            ^~~~~~~~~~~~~~~

R/dEploidTools.R:32:29: style: Use <-, not =, for assignment.

excludeFileName = args[arg_i]
                            ^

R/dEploidTools.R:33:13: style: Variable and function names should be all lowercase.

excludeBool = TRUE
            ^~~~~~~~~~~

R/dEploidTools.R:33:25: style: Use <-, not =, for assignment.

excludeBool = TRUE
                        ^

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

​        } else if ( argv == "-o" ){
                  ^

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

​        } else if ( argv == "-o" ){
                                ^

R/dEploidTools.R:35:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:35:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:35:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:36:13: style: Variable and function names should be all lowercase.

outPrefix = args[arg_i]
            ^~~~~~~~~

R/dEploidTools.R:36:23: style: Use <-, not =, for assignment.

outPrefix = args[arg_i]
                      ^

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

​        } else if ( argv == "-dEprefix" ){
                  ^

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

​        } else if ( argv == "-dEprefix" ){
                                       ^

R/dEploidTools.R:38:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:38:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:38:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:39:13: style: Variable and function names should be all lowercase.

dEploidPrefix = args[arg_i]
            ^~~~~~~~~~~~~

R/dEploidTools.R:39:27: style: Use <-, not =, for assignment.

dEploidPrefix = args[arg_i]
                          ^

R/dEploidTools.R:44:15: style: Use <-, not =, for assignment.

arg_i = arg_i + 1
              ^

R/dEploidTools.R:51:8: style: Do not place spaces around code in parentheses or square brackets.

if ( plafFileName == "" ){
       ^

R/dEploidTools.R:51:10: style: Variable and function names should be all lowercase.

if ( plafFileName == "" ){
         ^~~~~~~~~~~~

R/dEploidTools.R:51:28: style: Do not place spaces around code in parentheses or square brackets.

if ( plafFileName == "" ){
                           ^

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

return ( list ( vcfFileName = vcfFileName,
           ^

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

return ( list ( vcfFileName = vcfFileName,
                  ^

R/dEploidTools.R:58:35: style: Variable and function names should be all lowercase.

return ( list ( vcfFileName = vcfFileName,
                                  ^~~~~~~~~~~

R/dEploidTools.R:59:35: style: Variable and function names should be all lowercase.

refFileName = refFileName,
                                  ^~~~~~~~~~~

R/dEploidTools.R:60:35: style: Variable and function names should be all lowercase.

altFileName = altFileName,
                                  ^~~~~~~~~~~

R/dEploidTools.R:61:36: style: Variable and function names should be all lowercase.

plafFileName = plafFileName,
                                   ^~~~~~~~~~~~

R/dEploidTools.R:62:33: style: Variable and function names should be all lowercase.

outPrefix = outPrefix,
                                ^~~~~~~~~

R/dEploidTools.R:63:37: style: Variable and function names should be all lowercase.

dEploidPrefix = dEploidPrefix,
                                    ^~~~~~~~~~~~~

R/dEploidTools.R:64:39: style: Variable and function names should be all lowercase.

excludeFileName = excludeFileName,
                                      ^~~~~~~~~~~~~~~

R/dEploidTools.R:65:35: style: Variable and function names should be all lowercase.

excludeBool = excludeBool) )
                                  ^~~~~~~~~~~

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

excludeBool = excludeBool) )
                                              ^

R/dEploidTools.R:69:1: style: Variable and function names should be all lowercase.

fun.dEploidPrefix <- function ( prefix ){
^~~~~~~~~~~~~~~~~

R/dEploidTools.R:81:1: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.extract.coverage <- function ( inputs ){
^~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:82:17: style: Variable and function names should be all lowercase.

if ( inputs$vcfFileName != "" ){
                ^~~~~~~~~~~

R/dEploidTools.R:83:17: style: Variable and function names should be all lowercase.

return (extractCoverageFromVcf (inputs$vcfFileName))
                ^~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:83:17: warning: no visible global function definition for ‘extractCoverageFromVcf’

return (extractCoverageFromVcf (inputs$vcfFileName))
                ^~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:83:48: style: Variable and function names should be all lowercase.

return (extractCoverageFromVcf (inputs$vcfFileName))
                                               ^~~~~~~~~~~

R/dEploidTools.R:85:17: style: Variable and function names should be all lowercase.

return (extractCoverageFromTxt (inputs$refFileName, inputs$altFileName))
                ^~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:85:17: warning: no visible global function definition for ‘extractCoverageFromTxt’

return (extractCoverageFromTxt (inputs$refFileName, inputs$altFileName))
                ^~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:85:48: style: Variable and function names should be all lowercase.

return (extractCoverageFromTxt (inputs$refFileName, inputs$altFileName))
                                               ^~~~~~~~~~~

R/dEploidTools.R:85:68: style: Variable and function names should be all lowercase.

return (extractCoverageFromTxt (inputs$refFileName, inputs$altFileName))
                                                                   ^~~~~~~~~~~

R/dEploidTools.R:109:1: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:109:38: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:109:51: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:110:9: style: Use <-, not =, for assignment.

ref = read.table(refFileName, header = TRUE, comment.char = "")
        ^

R/dEploidTools.R:110:22: style: Variable and function names should be all lowercase.

ref = read.table(refFileName, header = TRUE, comment.char = "")
                     ^~~~~~~~~~~

R/dEploidTools.R:111:9: style: Use <-, not =, for assignment.

alt = read.table(altFileName, header = TRUE, comment.char = "")
        ^

R/dEploidTools.R:111:22: style: Variable and function names should be all lowercase.

alt = read.table(altFileName, header = TRUE, comment.char = "")
                     ^~~~~~~~~~~

R/dEploidTools.R:112:39: style: Commas should always have a space after.

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

R/dEploidTools.R:113:37: style: Commas should always have a space after.

POS = ref[,2],
                                    ^

R/dEploidTools.R:114:42: style: Commas should always have a space after.

refCount = ref[,3],
                                         ^

R/dEploidTools.R:115:42: style: Commas should always have a space after.

altCount = alt[,3] )
                                         ^

R/dEploidTools.R:120:1: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.extract.exclude <- function (excludeFileName, excludeBool){
^~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:120:34: style: Variable and function names should be all lowercase.

fun.extract.exclude <- function (excludeFileName, excludeBool){
                                 ^~~~~~~~~~~~~~~

R/dEploidTools.R:120:51: style: Variable and function names should be all lowercase.

fun.extract.exclude <- function (excludeFileName, excludeBool){
                                                  ^~~~~~~~~~~

R/dEploidTools.R:121:10: style: Variable and function names should be all lowercase.

if ( excludeBool ) {
         ^~~~~~~~~~~

R/dEploidTools.R:122:39: style: Variable and function names should be all lowercase.

return ( list ( excludeBool = excludeBool,
                                      ^~~~~~~~~~~

R/dEploidTools.R:123:1: style: lines should not be more than 80 characters.

excludeTable = read.table(excludeFileName, header = TRUE, comment.char = "")))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:123:51: style: Variable and function names should be all lowercase.

excludeTable = read.table(excludeFileName, header = TRUE, comment.char = "")))
                                                  ^~~~~~~~~~~~~~~

R/dEploidTools.R:125:39: style: Variable and function names should be all lowercase.

return ( list ( excludeBool = excludeBool ))
                                      ^~~~~~~~~~~

R/dEploidTools.R:147:1: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:147:38: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:147:47: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:150:12: style: Place a space before left parenthesis, except in a function call.

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

R/dEploidTools.R:154:9: style: Use <-, not =, for assignment.

gzf = gzfile(vcfFile, open = "rb")
        ^

R/dEploidTools.R:154:18: style: Variable and function names should be all lowercase.

gzf = gzfile(vcfFile, open = "rb")
                 ^~~~~~~

R/dEploidTools.R:154:18: warning: no visible binding for global variable ‘vcfFile’

gzf = gzfile(vcfFile, open = "rb")
                 ^~~~~~~

R/dEploidTools.R:155:5: style: Variable and function names should be all lowercase.

skipNum = 0
    ^~~~~~~

R/dEploidTools.R:155:13: style: Use <-, not =, for assignment.

skipNum = 0
            ^

R/dEploidTools.R:156:10: style: Use <-, not =, for assignment.

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

R/dEploidTools.R:156:49: style: Put spaces around all infix operators.

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

R/dEploidTools.R:156:61: style: Put spaces around all infix operators.

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

R/dEploidTools.R:158:21: style: Commented code should be removed.

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

R/dEploidTools.R:159:13: style: Variable and function names should be all lowercase.

skipNum = skipNum+1
            ^~~~~~~

R/dEploidTools.R:159:21: style: Use <-, not =, for assignment.

skipNum = skipNum+1
                    ^

R/dEploidTools.R:159:23: style: Variable and function names should be all lowercase.

skipNum = skipNum+1
                      ^~~~~~~

R/dEploidTools.R:159:30: style: Put spaces around all infix operators.

skipNum = skipNum+1
                            ~^~

R/dEploidTools.R:163:14: style: Use <-, not =, for assignment.

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

R/dEploidTools.R:163:53: style: Put spaces around all infix operators.

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

R/dEploidTools.R:163:65: style: Put spaces around all infix operators.

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

R/dEploidTools.R:167:1: style: lines should not be more than 80 characters.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:167:10: style: Use <-, not =, for assignment.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
         ^

R/dEploidTools.R:167:31: style: Variable and function names should be all lowercase.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                              ^~~~~~~

R/dEploidTools.R:167:45: style: Put spaces around all infix operators.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                           ~^~

R/dEploidTools.R:167:46: style: Variable and function names should be all lowercase.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                             ^~~~~~~

R/dEploidTools.R:167:61: style: Put spaces around all infix operators.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                                           ~^~

R/dEploidTools.R:167:77: style: Put spaces around all infix operators.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                                                           ~^~

R/dEploidTools.R:167:119: style: Put spaces around all infix operators.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                                                                                                     ~^~

R/dEploidTools.R:169:5: style: Variable and function names should be all lowercase.

sampleName = names(vcf)[10]
    ^~~~~~~~~~

R/dEploidTools.R:169:16: style: Use <-, not =, for assignment.

sampleName = names(vcf)[10]
               ^

R/dEploidTools.R:171:9: style: Use <-, not =, for assignment.

tmp = vcf[[sampleName]]
        ^

R/dEploidTools.R:171:16: style: Variable and function names should be all lowercase.

tmp = vcf[[sampleName]]
               ^~~~~~~~~~

R/dEploidTools.R:172:11: style: Use <-, not =, for assignment.

field = strsplit(as.character(tmp),":")
          ^

R/dEploidTools.R:172:40: style: Commas should always have a space after.

field = strsplit(as.character(tmp),":")
                                       ^

R/dEploidTools.R:174:5: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:174:15: style: Use <-, not =, for assignment.

tmpCovStr = unlist(lapply(field, `[[`, ADFieldIndex))
              ^

R/dEploidTools.R:174:44: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:175:5: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:175:12: style: Use <-, not =, for assignment.

tmpCov = strsplit(as.character(tmpCovStr),",")
           ^

R/dEploidTools.R:175:36: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:175:47: style: Commas should always have a space after.

tmpCov = strsplit(as.character(tmpCovStr),",")
                                              ^

R/dEploidTools.R:177:5: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:177:14: style: Use <-, not =, for assignment.

refCount = as.numeric(unlist(lapply(tmpCov, `[[`, 1)))
             ^

R/dEploidTools.R:177:41: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:178:5: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:178:14: style: Use <-, not =, for assignment.

altCount = as.numeric(unlist(lapply(tmpCov, `[[`, 2)))
             ^

R/dEploidTools.R:178:41: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:180:39: style: Commas should always have a space after.

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

R/dEploidTools.R:181:37: style: Commas should always have a space after.

POS = vcf[,2],
                                    ^

R/dEploidTools.R:182:37: style: Variable and function names should be all lowercase.

refCount = refCount,
                                    ^~~~~~~~

R/dEploidTools.R:183:37: style: Variable and function names should be all lowercase.

altCount = altCount )
                                    ^~~~~~~~

R/dEploidTools.R:204:1: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:204:12: style: Put spaces around all infix operators.

extractPLAF<- function ( plafName ){
          ~^

R/dEploidTools.R:204:26: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:205:25: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:205:41: style: Put spaces around all infix operators.

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

R/dEploidTools.R:210:11: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
         ~^~~

R/dEploidTools.R:210:19: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
                 ~^~

R/dEploidTools.R:210:23: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
                     ~^~

R/dEploidTools.R:210:24: style: Place a space before left parenthesis, except in a function call.

f.samp<-f.samp+err*(1-2*f.samp);
                       ^

R/dEploidTools.R:210:26: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
                        ~^~

R/dEploidTools.R:210:28: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
                          ~^~

R/dEploidTools.R:211:1: style: lines should not be more than 80 characters.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:211:8: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
      ~^~~

R/dEploidTools.R:211:23: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                     ~^~

R/dEploidTools.R:211:30: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                            ~^~

R/dEploidTools.R:211:43: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                         ~^~

R/dEploidTools.R:211:44: style: Place a space before left parenthesis, except in a function call.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                           ^

R/dEploidTools.R:211:46: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                            ~^~

R/dEploidTools.R:211:54: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                    ~^~

R/dEploidTools.R:211:59: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                         ~^~

R/dEploidTools.R:211:72: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                      ~^~

R/dEploidTools.R:211:77: style: Commas should always have a space after.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                            ^

R/dEploidTools.R:211:77: style: Place a space before left parenthesis, except in a function call.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                            ^

R/dEploidTools.R:211:79: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                             ~^~

R/dEploidTools.R:211:87: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                                     ~^~

R/dEploidTools.R:212:1: style: lines should not be more than 80 characters.

#  llk<-lgamma(fac*f.samp+cov.alt)+lgamma(fac*(1-f.samp)+cov.ref)-lgamma(fac*f.samp)-lgamma(fac*(1-f.samp));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:212:8: style: Commented code should be removed.

#  llk<-lgamma(fac*f.samp+cov.alt)+lgamma(fac*(1-f.samp)+cov.ref)-lgamma(fac*f.samp)-lgamma(fac*(1-f.samp));
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:213:25: style: Put spaces around all infix operators.

if (sum(is.nan(llk))>1){
                       ~^~

R/dEploidTools.R:220:1: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.dic.by.llk.var <- function ( tmpllk ){
^~~~~~~~~~~~~~~~~~

R/dEploidTools.R:221:1: style: lines should not be more than 80 characters.

return (  mean(-2*tmpllk) + var(-2*tmpllk)/2 )# D_bar + 1/2 var (D_theta), where D_theta = -2*tmpllk, and D_bar = mean(D_theta)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:221:23: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + var(-2*tmpllk)/2 )# D_bar + 1/2 var (D_theta), where D_theta = -2*tmpllk, and D_bar = mean(D_theta)
                     ~^~

R/dEploidTools.R:221:40: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + var(-2*tmpllk)/2 )# D_bar + 1/2 var (D_theta), where D_theta = -2*tmpllk, and D_bar = mean(D_theta)
                                      ~^~

R/dEploidTools.R:221:48: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + var(-2*tmpllk)/2 )# D_bar + 1/2 var (D_theta), where D_theta = -2*tmpllk, and D_bar = mean(D_theta)
                                              ~^~

R/dEploidTools.R:225:1: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.dic.by.theta <- function ( tmpllk, thetallk ){
^~~~~~~~~~~~~~~~

R/dEploidTools.R:226:5: style: Words within variable and function names should be separated by '_' rather than '.'.

DIC.WSAF.bar = -2 * sum(thetallk)
    ^~~~~~~~~~~~

R/dEploidTools.R:226:18: style: Use <-, not =, for assignment.

DIC.WSAF.bar = -2 * sum(thetallk)
                 ^

R/dEploidTools.R:227:1: style: lines should not be more than 80 characters.

return (  mean(-2*tmpllk) + (mean(-2*tmpllk) - DIC.WSAF.bar) ) # D_bar + pD, where pD = D_bar - D_theta, and D_bar = mean(D_theta)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:227:22: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + (mean(-2*tmpllk) - DIC.WSAF.bar) ) # D_bar + pD, where pD = D_bar - D_theta, and D_bar = mean(D_theta)
                    ~^~

R/dEploidTools.R:227:41: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + (mean(-2*tmpllk) - DIC.WSAF.bar) ) # D_bar + pD, where pD = D_bar - D_theta, and D_bar = mean(D_theta)
                                       ~^~

@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/dEploidTools.R:1:22: style: Do not place spaces around code in parentheses or square brackets.

fun.parse <- function( args ){
                     ^

R/dEploidTools.R:1:28: style: Do not place spaces around code in parentheses or square brackets.

fun.parse <- function( args ){
                           ^

R/dEploidTools.R:2:5: style: Variable and function names should be all lowercase.

fun.local.checkAndIncreaseArgI <- function ( ){
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:2:5: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.local.checkAndIncreaseArgI <- function ( ){
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:2:48: style: Do not place spaces around code in parentheses or square brackets.

fun.local.checkAndIncreaseArgI <- function ( ){
                                               ^

R/dEploidTools.R:3:15: style: Use <-, not =, for assignment.

arg_i = arg_i+1
              ^

R/dEploidTools.R:3:22: style: Put spaces around all infix operators.

arg_i = arg_i+1
                    ~^~

R/dEploidTools.R:6:5: style: Variable and function names should be all lowercase.

outPrefix = "dataExplore"
    ^~~~~~~~~

R/dEploidTools.R:6:15: style: Use <-, not =, for assignment.

outPrefix = "dataExplore"
              ^

R/dEploidTools.R:7:5: style: Variable and function names should be all lowercase.

vcfFileName = ""
    ^~~~~~~~~~~

R/dEploidTools.R:7:17: style: Use <-, not =, for assignment.

vcfFileName = ""
                ^

R/dEploidTools.R:8:5: style: Variable and function names should be all lowercase.

refFileName = ""
    ^~~~~~~~~~~

R/dEploidTools.R:8:17: style: Use <-, not =, for assignment.

refFileName = ""
                ^

R/dEploidTools.R:9:5: style: Variable and function names should be all lowercase.

altFileName = ""
    ^~~~~~~~~~~

R/dEploidTools.R:9:17: style: Use <-, not =, for assignment.

altFileName = ""
                ^

R/dEploidTools.R:10:5: style: Variable and function names should be all lowercase.

plafFileName = ""
    ^~~~~~~~~~~~

R/dEploidTools.R:10:18: style: Use <-, not =, for assignment.

plafFileName = ""
                 ^

R/dEploidTools.R:11:5: style: Variable and function names should be all lowercase.

excludeFileName = ""
    ^~~~~~~~~~~~~~~

R/dEploidTools.R:11:21: style: Use <-, not =, for assignment.

excludeFileName = ""
                    ^

R/dEploidTools.R:12:5: style: Variable and function names should be all lowercase.

dEploidPrefix = ""
    ^~~~~~~~~~~~~

R/dEploidTools.R:12:19: style: Use <-, not =, for assignment.

dEploidPrefix = ""
                  ^

R/dEploidTools.R:13:5: style: Variable and function names should be all lowercase.

excludeBool = FALSE
    ^~~~~~~~~~~

R/dEploidTools.R:13:17: style: Use <-, not =, for assignment.

excludeBool = FALSE
                ^

R/dEploidTools.R:15:11: style: Use <-, not =, for assignment.

arg_i = 1
          ^

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

while ( arg_i < length(args) ){
          ^

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

while ( arg_i < length(args) ){
                                ^

R/dEploidTools.R:17:14: style: Use <-, not =, for assignment.

argv = args[arg_i]
             ^

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

if ( argv == "-vcf" ){
           ^

R/dEploidTools.R:18:28: style: Do not place spaces around code in parentheses or square brackets.

if ( argv == "-vcf" ){
                           ^

R/dEploidTools.R:19:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:19:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:19:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:20:13: style: Variable and function names should be all lowercase.

vcfFileName = args[arg_i]
            ^~~~~~~~~~~

R/dEploidTools.R:20:25: style: Use <-, not =, for assignment.

vcfFileName = args[arg_i]
                        ^

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

​        } else if ( argv == "-plaf" ){
                  ^

R/dEploidTools.R:21:36: style: Do not place spaces around code in parentheses or square brackets.

​        } else if ( argv == "-plaf" ){
                                   ^

R/dEploidTools.R:22:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:22:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:22:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:23:13: style: Variable and function names should be all lowercase.

plafFileName = args[arg_i]
            ^~~~~~~~~~~~

R/dEploidTools.R:23:26: style: Use <-, not =, for assignment.

plafFileName = args[arg_i]
                         ^

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

​        } else if ( argv == "-ref" ){
                  ^

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

​        } else if ( argv == "-ref" ){
                                  ^

R/dEploidTools.R:25:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:25:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:25:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:26:13: style: Variable and function names should be all lowercase.

refFileName = args[arg_i]
            ^~~~~~~~~~~

R/dEploidTools.R:26:25: style: Use <-, not =, for assignment.

refFileName = args[arg_i]
                        ^

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

​        } else if ( argv == "-alt" ){
                  ^

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

​        } else if ( argv == "-alt" ){
                                  ^

R/dEploidTools.R:28:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:28:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:28:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:29:13: style: Variable and function names should be all lowercase.

altFileName = args[arg_i]
            ^~~~~~~~~~~

R/dEploidTools.R:29:25: style: Use <-, not =, for assignment.

altFileName = args[arg_i]
                        ^

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

​        } else if ( argv == "-exclude" ){
                  ^

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

​        } else if ( argv == "-exclude" ){
                                      ^

R/dEploidTools.R:31:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:31:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:31:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:32:13: style: Variable and function names should be all lowercase.

excludeFileName = args[arg_i]
            ^~~~~~~~~~~~~~~

R/dEploidTools.R:32:29: style: Use <-, not =, for assignment.

excludeFileName = args[arg_i]
                            ^

R/dEploidTools.R:33:13: style: Variable and function names should be all lowercase.

excludeBool = TRUE
            ^~~~~~~~~~~

R/dEploidTools.R:33:25: style: Use <-, not =, for assignment.

excludeBool = TRUE
                        ^

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

​        } else if ( argv == "-o" ){
                  ^

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

​        } else if ( argv == "-o" ){
                                ^

R/dEploidTools.R:35:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:35:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:35:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:36:13: style: Variable and function names should be all lowercase.

outPrefix = args[arg_i]
            ^~~~~~~~~

R/dEploidTools.R:36:23: style: Use <-, not =, for assignment.

outPrefix = args[arg_i]
                      ^

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

​        } else if ( argv == "-dEprefix" ){
                  ^

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

​        } else if ( argv == "-dEprefix" ){
                                       ^

R/dEploidTools.R:38:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:38:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:38:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:39:13: style: Variable and function names should be all lowercase.

dEploidPrefix = args[arg_i]
            ^~~~~~~~~~~~~

R/dEploidTools.R:39:27: style: Use <-, not =, for assignment.

dEploidPrefix = args[arg_i]
                          ^

R/dEploidTools.R:44:15: style: Use <-, not =, for assignment.

arg_i = arg_i + 1
              ^

R/dEploidTools.R:51:8: style: Do not place spaces around code in parentheses or square brackets.

if ( plafFileName == "" ){
       ^

R/dEploidTools.R:51:10: style: Variable and function names should be all lowercase.

if ( plafFileName == "" ){
         ^~~~~~~~~~~~

R/dEploidTools.R:51:28: style: Do not place spaces around code in parentheses or square brackets.

if ( plafFileName == "" ){
                           ^

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

return ( list ( vcfFileName = vcfFileName,
           ^

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

return ( list ( vcfFileName = vcfFileName,
                  ^

R/dEploidTools.R:58:35: style: Variable and function names should be all lowercase.

return ( list ( vcfFileName = vcfFileName,
                                  ^~~~~~~~~~~

R/dEploidTools.R:59:35: style: Variable and function names should be all lowercase.

refFileName = refFileName,
                                  ^~~~~~~~~~~

R/dEploidTools.R:60:35: style: Variable and function names should be all lowercase.

altFileName = altFileName,
                                  ^~~~~~~~~~~

R/dEploidTools.R:61:36: style: Variable and function names should be all lowercase.

plafFileName = plafFileName,
                                   ^~~~~~~~~~~~

R/dEploidTools.R:62:33: style: Variable and function names should be all lowercase.

outPrefix = outPrefix,
                                ^~~~~~~~~

R/dEploidTools.R:63:37: style: Variable and function names should be all lowercase.

dEploidPrefix = dEploidPrefix,
                                    ^~~~~~~~~~~~~

R/dEploidTools.R:64:39: style: Variable and function names should be all lowercase.

excludeFileName = excludeFileName,
                                      ^~~~~~~~~~~~~~~

R/dEploidTools.R:65:35: style: Variable and function names should be all lowercase.

excludeBool = excludeBool) )
                                  ^~~~~~~~~~~

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

excludeBool = excludeBool) )
                                              ^

R/dEploidTools.R:69:1: style: Variable and function names should be all lowercase.

fun.dEploidPrefix <- function ( prefix ){
^~~~~~~~~~~~~~~~~

R/dEploidTools.R:81:1: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.extract.coverage <- function ( inputs ){
^~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:82:17: style: Variable and function names should be all lowercase.

if ( inputs$vcfFileName != "" ){
                ^~~~~~~~~~~

R/dEploidTools.R:83:17: style: Variable and function names should be all lowercase.

return (extractCoverageFromVcf (inputs$vcfFileName))
                ^~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:83:17: warning: no visible global function definition for ‘extractCoverageFromVcf’

return (extractCoverageFromVcf (inputs$vcfFileName))
                ^~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:83:48: style: Variable and function names should be all lowercase.

return (extractCoverageFromVcf (inputs$vcfFileName))
                                               ^~~~~~~~~~~

R/dEploidTools.R:85:17: style: Variable and function names should be all lowercase.

return (extractCoverageFromTxt (inputs$refFileName, inputs$altFileName))
                ^~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:85:17: warning: no visible global function definition for ‘extractCoverageFromTxt’

return (extractCoverageFromTxt (inputs$refFileName, inputs$altFileName))
                ^~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:85:48: style: Variable and function names should be all lowercase.

return (extractCoverageFromTxt (inputs$refFileName, inputs$altFileName))
                                               ^~~~~~~~~~~

R/dEploidTools.R:85:68: style: Variable and function names should be all lowercase.

return (extractCoverageFromTxt (inputs$refFileName, inputs$altFileName))
                                                                   ^~~~~~~~~~~

R/dEploidTools.R:109:1: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:109:38: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:109:51: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:110:9: style: Use <-, not =, for assignment.

ref = read.table(refFileName, header = TRUE, comment.char = "")
        ^

R/dEploidTools.R:110:22: style: Variable and function names should be all lowercase.

ref = read.table(refFileName, header = TRUE, comment.char = "")
                     ^~~~~~~~~~~

R/dEploidTools.R:111:9: style: Use <-, not =, for assignment.

alt = read.table(altFileName, header = TRUE, comment.char = "")
        ^

R/dEploidTools.R:111:22: style: Variable and function names should be all lowercase.

alt = read.table(altFileName, header = TRUE, comment.char = "")
                     ^~~~~~~~~~~

R/dEploidTools.R:112:39: style: Commas should always have a space after.

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

R/dEploidTools.R:113:37: style: Commas should always have a space after.

POS = ref[,2],
                                    ^

R/dEploidTools.R:114:42: style: Commas should always have a space after.

refCount = ref[,3],
                                         ^

R/dEploidTools.R:115:42: style: Commas should always have a space after.

altCount = alt[,3] )
                                         ^

R/dEploidTools.R:120:1: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.extract.exclude <- function (excludeFileName, excludeBool){
^~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:120:34: style: Variable and function names should be all lowercase.

fun.extract.exclude <- function (excludeFileName, excludeBool){
                                 ^~~~~~~~~~~~~~~

R/dEploidTools.R:120:51: style: Variable and function names should be all lowercase.

fun.extract.exclude <- function (excludeFileName, excludeBool){
                                                  ^~~~~~~~~~~

R/dEploidTools.R:121:10: style: Variable and function names should be all lowercase.

if ( excludeBool ) {
         ^~~~~~~~~~~

R/dEploidTools.R:122:39: style: Variable and function names should be all lowercase.

return ( list ( excludeBool = excludeBool,
                                      ^~~~~~~~~~~

R/dEploidTools.R:123:1: style: lines should not be more than 80 characters.

excludeTable = read.table(excludeFileName, header = TRUE, comment.char = "")))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:123:51: style: Variable and function names should be all lowercase.

excludeTable = read.table(excludeFileName, header = TRUE, comment.char = "")))
                                                  ^~~~~~~~~~~~~~~

R/dEploidTools.R:125:39: style: Variable and function names should be all lowercase.

return ( list ( excludeBool = excludeBool ))
                                      ^~~~~~~~~~~

R/dEploidTools.R:147:1: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:147:38: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:147:47: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:150:12: style: Place a space before left parenthesis, except in a function call.

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

R/dEploidTools.R:154:9: style: Use <-, not =, for assignment.

gzf = gzfile(vcfFile, open = "rb")
        ^

R/dEploidTools.R:154:18: style: Variable and function names should be all lowercase.

gzf = gzfile(vcfFile, open = "rb")
                 ^~~~~~~

R/dEploidTools.R:154:18: warning: no visible binding for global variable ‘vcfFile’

gzf = gzfile(vcfFile, open = "rb")
                 ^~~~~~~

R/dEploidTools.R:155:5: style: Variable and function names should be all lowercase.

skipNum = 0
    ^~~~~~~

R/dEploidTools.R:155:13: style: Use <-, not =, for assignment.

skipNum = 0
            ^

R/dEploidTools.R:156:10: style: Use <-, not =, for assignment.

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

R/dEploidTools.R:156:49: style: Put spaces around all infix operators.

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

R/dEploidTools.R:156:61: style: Put spaces around all infix operators.

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

R/dEploidTools.R:158:21: style: Commented code should be removed.

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

R/dEploidTools.R:159:13: style: Variable and function names should be all lowercase.

skipNum = skipNum+1
            ^~~~~~~

R/dEploidTools.R:159:21: style: Use <-, not =, for assignment.

skipNum = skipNum+1
                    ^

R/dEploidTools.R:159:23: style: Variable and function names should be all lowercase.

skipNum = skipNum+1
                      ^~~~~~~

R/dEploidTools.R:159:30: style: Put spaces around all infix operators.

skipNum = skipNum+1
                            ~^~

R/dEploidTools.R:163:14: style: Use <-, not =, for assignment.

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

R/dEploidTools.R:163:53: style: Put spaces around all infix operators.

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

R/dEploidTools.R:163:65: style: Put spaces around all infix operators.

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

R/dEploidTools.R:167:1: style: lines should not be more than 80 characters.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:167:10: style: Use <-, not =, for assignment.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
         ^

R/dEploidTools.R:167:31: style: Variable and function names should be all lowercase.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                              ^~~~~~~

R/dEploidTools.R:167:45: style: Put spaces around all infix operators.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                           ~^~

R/dEploidTools.R:167:46: style: Variable and function names should be all lowercase.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                             ^~~~~~~

R/dEploidTools.R:167:61: style: Put spaces around all infix operators.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                                           ~^~

R/dEploidTools.R:167:77: style: Put spaces around all infix operators.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                                                           ~^~

R/dEploidTools.R:167:119: style: Put spaces around all infix operators.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                                                                                                     ~^~

R/dEploidTools.R:169:5: style: Variable and function names should be all lowercase.

sampleName = names(vcf)[10]
    ^~~~~~~~~~

R/dEploidTools.R:169:16: style: Use <-, not =, for assignment.

sampleName = names(vcf)[10]
               ^

R/dEploidTools.R:171:9: style: Use <-, not =, for assignment.

tmp = vcf[[sampleName]]
        ^

R/dEploidTools.R:171:16: style: Variable and function names should be all lowercase.

tmp = vcf[[sampleName]]
               ^~~~~~~~~~

R/dEploidTools.R:172:11: style: Use <-, not =, for assignment.

field = strsplit(as.character(tmp),":")
          ^

R/dEploidTools.R:172:40: style: Commas should always have a space after.

field = strsplit(as.character(tmp),":")
                                       ^

R/dEploidTools.R:174:5: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:174:15: style: Use <-, not =, for assignment.

tmpCovStr = unlist(lapply(field, `[[`, ADFieldIndex))
              ^

R/dEploidTools.R:174:44: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:175:5: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:175:12: style: Use <-, not =, for assignment.

tmpCov = strsplit(as.character(tmpCovStr),",")
           ^

R/dEploidTools.R:175:36: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:175:47: style: Commas should always have a space after.

tmpCov = strsplit(as.character(tmpCovStr),",")
                                              ^

R/dEploidTools.R:177:5: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:177:14: style: Use <-, not =, for assignment.

refCount = as.numeric(unlist(lapply(tmpCov, `[[`, 1)))
             ^

R/dEploidTools.R:177:41: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:178:5: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:178:14: style: Use <-, not =, for assignment.

altCount = as.numeric(unlist(lapply(tmpCov, `[[`, 2)))
             ^

R/dEploidTools.R:178:41: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:180:39: style: Commas should always have a space after.

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

R/dEploidTools.R:181:37: style: Commas should always have a space after.

POS = vcf[,2],
                                    ^

R/dEploidTools.R:182:37: style: Variable and function names should be all lowercase.

refCount = refCount,
                                    ^~~~~~~~

R/dEploidTools.R:183:37: style: Variable and function names should be all lowercase.

altCount = altCount )
                                    ^~~~~~~~

R/dEploidTools.R:204:1: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:204:12: style: Put spaces around all infix operators.

extractPLAF<- function ( plafName ){
          ~^

R/dEploidTools.R:204:26: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:205:25: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:205:41: style: Put spaces around all infix operators.

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

R/dEploidTools.R:210:11: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
         ~^~~

R/dEploidTools.R:210:19: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
                 ~^~

R/dEploidTools.R:210:23: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
                     ~^~

R/dEploidTools.R:210:24: style: Place a space before left parenthesis, except in a function call.

f.samp<-f.samp+err*(1-2*f.samp);
                       ^

R/dEploidTools.R:210:26: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
                        ~^~

R/dEploidTools.R:210:28: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
                          ~^~

R/dEploidTools.R:211:1: style: lines should not be more than 80 characters.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:211:8: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
      ~^~~

R/dEploidTools.R:211:23: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                     ~^~

R/dEploidTools.R:211:30: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                            ~^~

R/dEploidTools.R:211:43: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                         ~^~

R/dEploidTools.R:211:44: style: Place a space before left parenthesis, except in a function call.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                           ^

R/dEploidTools.R:211:46: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                            ~^~

R/dEploidTools.R:211:54: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                    ~^~

R/dEploidTools.R:211:59: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                         ~^~

R/dEploidTools.R:211:72: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                      ~^~

R/dEploidTools.R:211:77: style: Commas should always have a space after.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                            ^

R/dEploidTools.R:211:77: style: Place a space before left parenthesis, except in a function call.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                            ^

R/dEploidTools.R:211:79: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                             ~^~

R/dEploidTools.R:211:87: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                                     ~^~

R/dEploidTools.R:212:1: style: lines should not be more than 80 characters.

#  llk<-lgamma(fac*f.samp+cov.alt)+lgamma(fac*(1-f.samp)+cov.ref)-lgamma(fac*f.samp)-lgamma(fac*(1-f.samp));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:212:8: style: Commented code should be removed.

#  llk<-lgamma(fac*f.samp+cov.alt)+lgamma(fac*(1-f.samp)+cov.ref)-lgamma(fac*f.samp)-lgamma(fac*(1-f.samp));
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:213:25: style: Put spaces around all infix operators.

if (sum(is.nan(llk))>1){
                       ~^~

R/dEploidTools.R:220:1: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.dic.by.llk.var <- function ( tmpllk ){
^~~~~~~~~~~~~~~~~~

R/dEploidTools.R:221:1: style: lines should not be more than 80 characters.

return (  mean(-2*tmpllk) + var(-2*tmpllk)/2 )# D_bar + 1/2 var (D_theta), where D_theta = -2*tmpllk, and D_bar = mean(D_theta)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:221:23: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + var(-2*tmpllk)/2 )# D_bar + 1/2 var (D_theta), where D_theta = -2*tmpllk, and D_bar = mean(D_theta)
                     ~^~

R/dEploidTools.R:221:40: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + var(-2*tmpllk)/2 )# D_bar + 1/2 var (D_theta), where D_theta = -2*tmpllk, and D_bar = mean(D_theta)
                                      ~^~

R/dEploidTools.R:221:48: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + var(-2*tmpllk)/2 )# D_bar + 1/2 var (D_theta), where D_theta = -2*tmpllk, and D_bar = mean(D_theta)
                                              ~^~

R/dEploidTools.R:225:1: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.dic.by.theta <- function ( tmpllk, thetallk ){
^~~~~~~~~~~~~~~~

R/dEploidTools.R:226:5: style: Words within variable and function names should be separated by '_' rather than '.'.

DIC.WSAF.bar = -2 * sum(thetallk)
    ^~~~~~~~~~~~

R/dEploidTools.R:226:18: style: Use <-, not =, for assignment.

DIC.WSAF.bar = -2 * sum(thetallk)
                 ^

R/dEploidTools.R:227:1: style: lines should not be more than 80 characters.

return (  mean(-2*tmpllk) + (mean(-2*tmpllk) - DIC.WSAF.bar) ) # D_bar + pD, where pD = D_bar - D_theta, and D_bar = mean(D_theta)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:227:22: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + (mean(-2*tmpllk) - DIC.WSAF.bar) ) # D_bar + pD, where pD = D_bar - D_theta, and D_bar = mean(D_theta)
                    ~^~

R/dEploidTools.R:227:41: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + (mean(-2*tmpllk) - DIC.WSAF.bar) ) # D_bar + pD, where pD = D_bar - D_theta, and D_bar = mean(D_theta)
                                       ~^~

@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/dEploidTools.R:1:22: style: Do not place spaces around code in parentheses or square brackets.

fun.parse <- function( args ){
                     ^

R/dEploidTools.R:1:28: style: Do not place spaces around code in parentheses or square brackets.

fun.parse <- function( args ){
                           ^

R/dEploidTools.R:2:5: style: Variable and function names should be all lowercase.

fun.local.checkAndIncreaseArgI <- function ( ){
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:2:5: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.local.checkAndIncreaseArgI <- function ( ){
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:2:48: style: Do not place spaces around code in parentheses or square brackets.

fun.local.checkAndIncreaseArgI <- function ( ){
                                               ^

R/dEploidTools.R:3:15: style: Use <-, not =, for assignment.

arg_i = arg_i+1
              ^

R/dEploidTools.R:3:22: style: Put spaces around all infix operators.

arg_i = arg_i+1
                    ~^~

R/dEploidTools.R:6:5: style: Variable and function names should be all lowercase.

outPrefix = "dataExplore"
    ^~~~~~~~~

R/dEploidTools.R:6:15: style: Use <-, not =, for assignment.

outPrefix = "dataExplore"
              ^

R/dEploidTools.R:7:5: style: Variable and function names should be all lowercase.

vcfFileName = ""
    ^~~~~~~~~~~

R/dEploidTools.R:7:17: style: Use <-, not =, for assignment.

vcfFileName = ""
                ^

R/dEploidTools.R:8:5: style: Variable and function names should be all lowercase.

refFileName = ""
    ^~~~~~~~~~~

R/dEploidTools.R:8:17: style: Use <-, not =, for assignment.

refFileName = ""
                ^

R/dEploidTools.R:9:5: style: Variable and function names should be all lowercase.

altFileName = ""
    ^~~~~~~~~~~

R/dEploidTools.R:9:17: style: Use <-, not =, for assignment.

altFileName = ""
                ^

R/dEploidTools.R:10:5: style: Variable and function names should be all lowercase.

plafFileName = ""
    ^~~~~~~~~~~~

R/dEploidTools.R:10:18: style: Use <-, not =, for assignment.

plafFileName = ""
                 ^

R/dEploidTools.R:11:5: style: Variable and function names should be all lowercase.

excludeFileName = ""
    ^~~~~~~~~~~~~~~

R/dEploidTools.R:11:21: style: Use <-, not =, for assignment.

excludeFileName = ""
                    ^

R/dEploidTools.R:12:5: style: Variable and function names should be all lowercase.

dEploidPrefix = ""
    ^~~~~~~~~~~~~

R/dEploidTools.R:12:19: style: Use <-, not =, for assignment.

dEploidPrefix = ""
                  ^

R/dEploidTools.R:13:5: style: Variable and function names should be all lowercase.

excludeBool = FALSE
    ^~~~~~~~~~~

R/dEploidTools.R:13:17: style: Use <-, not =, for assignment.

excludeBool = FALSE
                ^

R/dEploidTools.R:15:11: style: Use <-, not =, for assignment.

arg_i = 1
          ^

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

while ( arg_i < length(args) ){
          ^

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

while ( arg_i < length(args) ){
                                ^

R/dEploidTools.R:17:14: style: Use <-, not =, for assignment.

argv = args[arg_i]
             ^

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

if ( argv == "-vcf" ){
           ^

R/dEploidTools.R:18:28: style: Do not place spaces around code in parentheses or square brackets.

if ( argv == "-vcf" ){
                           ^

R/dEploidTools.R:19:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:19:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:19:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:20:13: style: Variable and function names should be all lowercase.

vcfFileName = args[arg_i]
            ^~~~~~~~~~~

R/dEploidTools.R:20:25: style: Use <-, not =, for assignment.

vcfFileName = args[arg_i]
                        ^

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

​        } else if ( argv == "-plaf" ){
                  ^

R/dEploidTools.R:21:36: style: Do not place spaces around code in parentheses or square brackets.

​        } else if ( argv == "-plaf" ){
                                   ^

R/dEploidTools.R:22:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:22:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:22:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:23:13: style: Variable and function names should be all lowercase.

plafFileName = args[arg_i]
            ^~~~~~~~~~~~

R/dEploidTools.R:23:26: style: Use <-, not =, for assignment.

plafFileName = args[arg_i]
                         ^

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

​        } else if ( argv == "-ref" ){
                  ^

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

​        } else if ( argv == "-ref" ){
                                  ^

R/dEploidTools.R:25:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:25:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:25:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:26:13: style: Variable and function names should be all lowercase.

refFileName = args[arg_i]
            ^~~~~~~~~~~

R/dEploidTools.R:26:25: style: Use <-, not =, for assignment.

refFileName = args[arg_i]
                        ^

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

​        } else if ( argv == "-alt" ){
                  ^

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

​        } else if ( argv == "-alt" ){
                                  ^

R/dEploidTools.R:28:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:28:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:28:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:29:13: style: Variable and function names should be all lowercase.

altFileName = args[arg_i]
            ^~~~~~~~~~~

R/dEploidTools.R:29:25: style: Use <-, not =, for assignment.

altFileName = args[arg_i]
                        ^

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

​        } else if ( argv == "-exclude" ){
                  ^

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

​        } else if ( argv == "-exclude" ){
                                      ^

R/dEploidTools.R:31:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:31:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:31:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:32:13: style: Variable and function names should be all lowercase.

excludeFileName = args[arg_i]
            ^~~~~~~~~~~~~~~

R/dEploidTools.R:32:29: style: Use <-, not =, for assignment.

excludeFileName = args[arg_i]
                            ^

R/dEploidTools.R:33:13: style: Variable and function names should be all lowercase.

excludeBool = TRUE
            ^~~~~~~~~~~

R/dEploidTools.R:33:25: style: Use <-, not =, for assignment.

excludeBool = TRUE
                        ^

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

​        } else if ( argv == "-o" ){
                  ^

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

​        } else if ( argv == "-o" ){
                                ^

R/dEploidTools.R:35:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:35:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:35:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:36:13: style: Variable and function names should be all lowercase.

outPrefix = args[arg_i]
            ^~~~~~~~~

R/dEploidTools.R:36:23: style: Use <-, not =, for assignment.

outPrefix = args[arg_i]
                      ^

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

​        } else if ( argv == "-dEprefix" ){
                  ^

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

​        } else if ( argv == "-dEprefix" ){
                                       ^

R/dEploidTools.R:38:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:38:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:38:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:39:13: style: Variable and function names should be all lowercase.

dEploidPrefix = args[arg_i]
            ^~~~~~~~~~~~~

R/dEploidTools.R:39:27: style: Use <-, not =, for assignment.

dEploidPrefix = args[arg_i]
                          ^

R/dEploidTools.R:44:15: style: Use <-, not =, for assignment.

arg_i = arg_i + 1
              ^

R/dEploidTools.R:51:8: style: Do not place spaces around code in parentheses or square brackets.

if ( plafFileName == "" ){
       ^

R/dEploidTools.R:51:10: style: Variable and function names should be all lowercase.

if ( plafFileName == "" ){
         ^~~~~~~~~~~~

R/dEploidTools.R:51:28: style: Do not place spaces around code in parentheses or square brackets.

if ( plafFileName == "" ){
                           ^

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

return ( list ( vcfFileName = vcfFileName,
           ^

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

return ( list ( vcfFileName = vcfFileName,
                  ^

R/dEploidTools.R:58:35: style: Variable and function names should be all lowercase.

return ( list ( vcfFileName = vcfFileName,
                                  ^~~~~~~~~~~

R/dEploidTools.R:59:35: style: Variable and function names should be all lowercase.

refFileName = refFileName,
                                  ^~~~~~~~~~~

R/dEploidTools.R:60:35: style: Variable and function names should be all lowercase.

altFileName = altFileName,
                                  ^~~~~~~~~~~

R/dEploidTools.R:61:36: style: Variable and function names should be all lowercase.

plafFileName = plafFileName,
                                   ^~~~~~~~~~~~

R/dEploidTools.R:62:33: style: Variable and function names should be all lowercase.

outPrefix = outPrefix,
                                ^~~~~~~~~

R/dEploidTools.R:63:37: style: Variable and function names should be all lowercase.

dEploidPrefix = dEploidPrefix,
                                    ^~~~~~~~~~~~~

R/dEploidTools.R:64:39: style: Variable and function names should be all lowercase.

excludeFileName = excludeFileName,
                                      ^~~~~~~~~~~~~~~

R/dEploidTools.R:65:35: style: Variable and function names should be all lowercase.

excludeBool = excludeBool) )
                                  ^~~~~~~~~~~

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

excludeBool = excludeBool) )
                                              ^

R/dEploidTools.R:69:1: style: Variable and function names should be all lowercase.

fun.dEploidPrefix <- function ( prefix ){
^~~~~~~~~~~~~~~~~

R/dEploidTools.R:81:1: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.extract.coverage <- function ( inputs ){
^~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:82:17: style: Variable and function names should be all lowercase.

if ( inputs$vcfFileName != "" ){
                ^~~~~~~~~~~

R/dEploidTools.R:83:17: style: Variable and function names should be all lowercase.

return (extractCoverageFromVcf (inputs$vcfFileName))
                ^~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:83:17: warning: no visible global function definition for ‘extractCoverageFromVcf’

return (extractCoverageFromVcf (inputs$vcfFileName))
                ^~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:83:48: style: Variable and function names should be all lowercase.

return (extractCoverageFromVcf (inputs$vcfFileName))
                                               ^~~~~~~~~~~

R/dEploidTools.R:85:17: style: Variable and function names should be all lowercase.

return (extractCoverageFromTxt (inputs$refFileName, inputs$altFileName))
                ^~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:85:17: warning: no visible global function definition for ‘extractCoverageFromTxt’

return (extractCoverageFromTxt (inputs$refFileName, inputs$altFileName))
                ^~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:85:48: style: Variable and function names should be all lowercase.

return (extractCoverageFromTxt (inputs$refFileName, inputs$altFileName))
                                               ^~~~~~~~~~~

R/dEploidTools.R:85:68: style: Variable and function names should be all lowercase.

return (extractCoverageFromTxt (inputs$refFileName, inputs$altFileName))
                                                                   ^~~~~~~~~~~

R/dEploidTools.R:109:1: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:109:38: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:109:51: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:110:9: style: Use <-, not =, for assignment.

ref = read.table(refFileName, header = TRUE, comment.char = "")
        ^

R/dEploidTools.R:110:22: style: Variable and function names should be all lowercase.

ref = read.table(refFileName, header = TRUE, comment.char = "")
                     ^~~~~~~~~~~

R/dEploidTools.R:111:9: style: Use <-, not =, for assignment.

alt = read.table(altFileName, header = TRUE, comment.char = "")
        ^

R/dEploidTools.R:111:22: style: Variable and function names should be all lowercase.

alt = read.table(altFileName, header = TRUE, comment.char = "")
                     ^~~~~~~~~~~

R/dEploidTools.R:112:39: style: Commas should always have a space after.

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

R/dEploidTools.R:113:37: style: Commas should always have a space after.

POS = ref[,2],
                                    ^

R/dEploidTools.R:114:42: style: Commas should always have a space after.

refCount = ref[,3],
                                         ^

R/dEploidTools.R:115:42: style: Commas should always have a space after.

altCount = alt[,3] )
                                         ^

R/dEploidTools.R:120:1: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.extract.exclude <- function (excludeFileName, excludeBool){
^~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:120:34: style: Variable and function names should be all lowercase.

fun.extract.exclude <- function (excludeFileName, excludeBool){
                                 ^~~~~~~~~~~~~~~

R/dEploidTools.R:120:51: style: Variable and function names should be all lowercase.

fun.extract.exclude <- function (excludeFileName, excludeBool){
                                                  ^~~~~~~~~~~

R/dEploidTools.R:121:10: style: Variable and function names should be all lowercase.

if ( excludeBool ) {
         ^~~~~~~~~~~

R/dEploidTools.R:122:39: style: Variable and function names should be all lowercase.

return ( list ( excludeBool = excludeBool,
                                      ^~~~~~~~~~~

R/dEploidTools.R:123:1: style: lines should not be more than 80 characters.

excludeTable = read.table(excludeFileName, header = TRUE, comment.char = "")))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:123:51: style: Variable and function names should be all lowercase.

excludeTable = read.table(excludeFileName, header = TRUE, comment.char = "")))
                                                  ^~~~~~~~~~~~~~~

R/dEploidTools.R:125:39: style: Variable and function names should be all lowercase.

return ( list ( excludeBool = excludeBool ))
                                      ^~~~~~~~~~~

R/dEploidTools.R:147:1: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:147:38: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:147:47: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:150:12: style: Place a space before left parenthesis, except in a function call.

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

R/dEploidTools.R:154:9: style: Use <-, not =, for assignment.

gzf = gzfile(vcfFile, open = "rb")
        ^

R/dEploidTools.R:154:18: style: Variable and function names should be all lowercase.

gzf = gzfile(vcfFile, open = "rb")
                 ^~~~~~~

R/dEploidTools.R:154:18: warning: no visible binding for global variable ‘vcfFile’

gzf = gzfile(vcfFile, open = "rb")
                 ^~~~~~~

R/dEploidTools.R:155:5: style: Variable and function names should be all lowercase.

skipNum = 0
    ^~~~~~~

R/dEploidTools.R:155:13: style: Use <-, not =, for assignment.

skipNum = 0
            ^

R/dEploidTools.R:156:10: style: Use <-, not =, for assignment.

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

R/dEploidTools.R:156:49: style: Put spaces around all infix operators.

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

R/dEploidTools.R:156:61: style: Put spaces around all infix operators.

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

R/dEploidTools.R:158:21: style: Commented code should be removed.

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

R/dEploidTools.R:159:13: style: Variable and function names should be all lowercase.

skipNum = skipNum+1
            ^~~~~~~

R/dEploidTools.R:159:21: style: Use <-, not =, for assignment.

skipNum = skipNum+1
                    ^

R/dEploidTools.R:159:23: style: Variable and function names should be all lowercase.

skipNum = skipNum+1
                      ^~~~~~~

R/dEploidTools.R:159:30: style: Put spaces around all infix operators.

skipNum = skipNum+1
                            ~^~

R/dEploidTools.R:163:14: style: Use <-, not =, for assignment.

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

R/dEploidTools.R:163:53: style: Put spaces around all infix operators.

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

R/dEploidTools.R:163:65: style: Put spaces around all infix operators.

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

R/dEploidTools.R:167:1: style: lines should not be more than 80 characters.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:167:10: style: Use <-, not =, for assignment.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
         ^

R/dEploidTools.R:167:31: style: Variable and function names should be all lowercase.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                              ^~~~~~~

R/dEploidTools.R:167:45: style: Put spaces around all infix operators.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                           ~^~

R/dEploidTools.R:167:46: style: Variable and function names should be all lowercase.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                             ^~~~~~~

R/dEploidTools.R:167:61: style: Put spaces around all infix operators.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                                           ~^~

R/dEploidTools.R:167:77: style: Put spaces around all infix operators.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                                                           ~^~

R/dEploidTools.R:167:119: style: Put spaces around all infix operators.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                                                                                                     ~^~

R/dEploidTools.R:169:5: style: Variable and function names should be all lowercase.

sampleName = names(vcf)[10]
    ^~~~~~~~~~

R/dEploidTools.R:169:16: style: Use <-, not =, for assignment.

sampleName = names(vcf)[10]
               ^

R/dEploidTools.R:171:9: style: Use <-, not =, for assignment.

tmp = vcf[[sampleName]]
        ^

R/dEploidTools.R:171:16: style: Variable and function names should be all lowercase.

tmp = vcf[[sampleName]]
               ^~~~~~~~~~

R/dEploidTools.R:172:11: style: Use <-, not =, for assignment.

field = strsplit(as.character(tmp),":")
          ^

R/dEploidTools.R:172:40: style: Commas should always have a space after.

field = strsplit(as.character(tmp),":")
                                       ^

R/dEploidTools.R:174:5: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:174:15: style: Use <-, not =, for assignment.

tmpCovStr = unlist(lapply(field, `[[`, ADFieldIndex))
              ^

R/dEploidTools.R:174:44: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:175:5: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:175:12: style: Use <-, not =, for assignment.

tmpCov = strsplit(as.character(tmpCovStr),",")
           ^

R/dEploidTools.R:175:36: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:175:47: style: Commas should always have a space after.

tmpCov = strsplit(as.character(tmpCovStr),",")
                                              ^

R/dEploidTools.R:177:5: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:177:14: style: Use <-, not =, for assignment.

refCount = as.numeric(unlist(lapply(tmpCov, `[[`, 1)))
             ^

R/dEploidTools.R:177:41: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:178:5: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:178:14: style: Use <-, not =, for assignment.

altCount = as.numeric(unlist(lapply(tmpCov, `[[`, 2)))
             ^

R/dEploidTools.R:178:41: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:180:39: style: Commas should always have a space after.

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

R/dEploidTools.R:181:37: style: Commas should always have a space after.

POS = vcf[,2],
                                    ^

R/dEploidTools.R:182:37: style: Variable and function names should be all lowercase.

refCount = refCount,
                                    ^~~~~~~~

R/dEploidTools.R:183:37: style: Variable and function names should be all lowercase.

altCount = altCount )
                                    ^~~~~~~~

R/dEploidTools.R:204:1: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:204:12: style: Put spaces around all infix operators.

extractPLAF<- function ( plafName ){
          ~^

R/dEploidTools.R:204:26: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:205:25: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:205:41: style: Put spaces around all infix operators.

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

R/dEploidTools.R:210:11: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
         ~^~~

R/dEploidTools.R:210:19: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
                 ~^~

R/dEploidTools.R:210:23: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
                     ~^~

R/dEploidTools.R:210:24: style: Place a space before left parenthesis, except in a function call.

f.samp<-f.samp+err*(1-2*f.samp);
                       ^

R/dEploidTools.R:210:26: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
                        ~^~

R/dEploidTools.R:210:28: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
                          ~^~

R/dEploidTools.R:211:1: style: lines should not be more than 80 characters.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:211:8: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
      ~^~~

R/dEploidTools.R:211:23: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                     ~^~

R/dEploidTools.R:211:30: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                            ~^~

R/dEploidTools.R:211:43: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                         ~^~

R/dEploidTools.R:211:44: style: Place a space before left parenthesis, except in a function call.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                           ^

R/dEploidTools.R:211:46: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                            ~^~

R/dEploidTools.R:211:54: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                    ~^~

R/dEploidTools.R:211:59: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                         ~^~

R/dEploidTools.R:211:72: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                      ~^~

R/dEploidTools.R:211:77: style: Commas should always have a space after.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                            ^

R/dEploidTools.R:211:77: style: Place a space before left parenthesis, except in a function call.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                            ^

R/dEploidTools.R:211:79: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                             ~^~

R/dEploidTools.R:211:87: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                                     ~^~

R/dEploidTools.R:212:1: style: lines should not be more than 80 characters.

#  llk<-lgamma(fac*f.samp+cov.alt)+lgamma(fac*(1-f.samp)+cov.ref)-lgamma(fac*f.samp)-lgamma(fac*(1-f.samp));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:212:8: style: Commented code should be removed.

#  llk<-lgamma(fac*f.samp+cov.alt)+lgamma(fac*(1-f.samp)+cov.ref)-lgamma(fac*f.samp)-lgamma(fac*(1-f.samp));
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:213:25: style: Put spaces around all infix operators.

if (sum(is.nan(llk))>1){
                       ~^~

R/dEploidTools.R:220:1: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.dic.by.llk.var <- function ( tmpllk ){
^~~~~~~~~~~~~~~~~~

R/dEploidTools.R:221:1: style: lines should not be more than 80 characters.

return (  mean(-2*tmpllk) + var(-2*tmpllk)/2 )# D_bar + 1/2 var (D_theta), where D_theta = -2*tmpllk, and D_bar = mean(D_theta)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:221:23: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + var(-2*tmpllk)/2 )# D_bar + 1/2 var (D_theta), where D_theta = -2*tmpllk, and D_bar = mean(D_theta)
                     ~^~

R/dEploidTools.R:221:40: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + var(-2*tmpllk)/2 )# D_bar + 1/2 var (D_theta), where D_theta = -2*tmpllk, and D_bar = mean(D_theta)
                                      ~^~

R/dEploidTools.R:221:48: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + var(-2*tmpllk)/2 )# D_bar + 1/2 var (D_theta), where D_theta = -2*tmpllk, and D_bar = mean(D_theta)
                                              ~^~

R/dEploidTools.R:225:1: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.dic.by.theta <- function ( tmpllk, thetallk ){
^~~~~~~~~~~~~~~~

R/dEploidTools.R:226:5: style: Words within variable and function names should be separated by '_' rather than '.'.

DIC.WSAF.bar = -2 * sum(thetallk)
    ^~~~~~~~~~~~

R/dEploidTools.R:226:18: style: Use <-, not =, for assignment.

DIC.WSAF.bar = -2 * sum(thetallk)
                 ^

R/dEploidTools.R:227:1: style: lines should not be more than 80 characters.

return (  mean(-2*tmpllk) + (mean(-2*tmpllk) - DIC.WSAF.bar) ) # D_bar + pD, where pD = D_bar - D_theta, and D_bar = mean(D_theta)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:227:22: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + (mean(-2*tmpllk) - DIC.WSAF.bar) ) # D_bar + pD, where pD = D_bar - D_theta, and D_bar = mean(D_theta)
                    ~^~

R/dEploidTools.R:227:41: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + (mean(-2*tmpllk) - DIC.WSAF.bar) ) # D_bar + pD, where pD = D_bar - D_theta, and D_bar = mean(D_theta)
                                       ~^~

@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/dEploidTools.R:1:22: style: Do not place spaces around code in parentheses or square brackets.

fun.parse <- function( args ){
                     ^

R/dEploidTools.R:1:28: style: Do not place spaces around code in parentheses or square brackets.

fun.parse <- function( args ){
                           ^

R/dEploidTools.R:2:5: style: Variable and function names should be all lowercase.

fun.local.checkAndIncreaseArgI <- function ( ){
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:2:5: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.local.checkAndIncreaseArgI <- function ( ){
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:2:48: style: Do not place spaces around code in parentheses or square brackets.

fun.local.checkAndIncreaseArgI <- function ( ){
                                               ^

R/dEploidTools.R:3:15: style: Use <-, not =, for assignment.

arg_i = arg_i+1
              ^

R/dEploidTools.R:3:22: style: Put spaces around all infix operators.

arg_i = arg_i+1
                    ~^~

R/dEploidTools.R:6:5: style: Variable and function names should be all lowercase.

outPrefix = "dataExplore"
    ^~~~~~~~~

R/dEploidTools.R:6:15: style: Use <-, not =, for assignment.

outPrefix = "dataExplore"
              ^

R/dEploidTools.R:7:5: style: Variable and function names should be all lowercase.

vcfFileName = ""
    ^~~~~~~~~~~

R/dEploidTools.R:7:17: style: Use <-, not =, for assignment.

vcfFileName = ""
                ^

R/dEploidTools.R:8:5: style: Variable and function names should be all lowercase.

refFileName = ""
    ^~~~~~~~~~~

R/dEploidTools.R:8:17: style: Use <-, not =, for assignment.

refFileName = ""
                ^

R/dEploidTools.R:9:5: style: Variable and function names should be all lowercase.

altFileName = ""
    ^~~~~~~~~~~

R/dEploidTools.R:9:17: style: Use <-, not =, for assignment.

altFileName = ""
                ^

R/dEploidTools.R:10:5: style: Variable and function names should be all lowercase.

plafFileName = ""
    ^~~~~~~~~~~~

R/dEploidTools.R:10:18: style: Use <-, not =, for assignment.

plafFileName = ""
                 ^

R/dEploidTools.R:11:5: style: Variable and function names should be all lowercase.

excludeFileName = ""
    ^~~~~~~~~~~~~~~

R/dEploidTools.R:11:21: style: Use <-, not =, for assignment.

excludeFileName = ""
                    ^

R/dEploidTools.R:12:5: style: Variable and function names should be all lowercase.

dEploidPrefix = ""
    ^~~~~~~~~~~~~

R/dEploidTools.R:12:19: style: Use <-, not =, for assignment.

dEploidPrefix = ""
                  ^

R/dEploidTools.R:13:5: style: Variable and function names should be all lowercase.

excludeBool = FALSE
    ^~~~~~~~~~~

R/dEploidTools.R:13:17: style: Use <-, not =, for assignment.

excludeBool = FALSE
                ^

R/dEploidTools.R:15:11: style: Use <-, not =, for assignment.

arg_i = 1
          ^

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

while ( arg_i < length(args) ){
          ^

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

while ( arg_i < length(args) ){
                                ^

R/dEploidTools.R:17:14: style: Use <-, not =, for assignment.

argv = args[arg_i]
             ^

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

if ( argv == "-vcf" ){
           ^

R/dEploidTools.R:18:28: style: Do not place spaces around code in parentheses or square brackets.

if ( argv == "-vcf" ){
                           ^

R/dEploidTools.R:19:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:19:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:19:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:20:13: style: Variable and function names should be all lowercase.

vcfFileName = args[arg_i]
            ^~~~~~~~~~~

R/dEploidTools.R:20:25: style: Use <-, not =, for assignment.

vcfFileName = args[arg_i]
                        ^

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

​        } else if ( argv == "-plaf" ){
                  ^

R/dEploidTools.R:21:36: style: Do not place spaces around code in parentheses or square brackets.

​        } else if ( argv == "-plaf" ){
                                   ^

R/dEploidTools.R:22:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:22:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:22:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:23:13: style: Variable and function names should be all lowercase.

plafFileName = args[arg_i]
            ^~~~~~~~~~~~

R/dEploidTools.R:23:26: style: Use <-, not =, for assignment.

plafFileName = args[arg_i]
                         ^

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

​        } else if ( argv == "-ref" ){
                  ^

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

​        } else if ( argv == "-ref" ){
                                  ^

R/dEploidTools.R:25:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:25:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:25:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:26:13: style: Variable and function names should be all lowercase.

refFileName = args[arg_i]
            ^~~~~~~~~~~

R/dEploidTools.R:26:25: style: Use <-, not =, for assignment.

refFileName = args[arg_i]
                        ^

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

​        } else if ( argv == "-alt" ){
                  ^

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

​        } else if ( argv == "-alt" ){
                                  ^

R/dEploidTools.R:28:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:28:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:28:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:29:13: style: Variable and function names should be all lowercase.

altFileName = args[arg_i]
            ^~~~~~~~~~~

R/dEploidTools.R:29:25: style: Use <-, not =, for assignment.

altFileName = args[arg_i]
                        ^

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

​        } else if ( argv == "-exclude" ){
                  ^

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

​        } else if ( argv == "-exclude" ){
                                      ^

R/dEploidTools.R:31:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:31:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:31:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:32:13: style: Variable and function names should be all lowercase.

excludeFileName = args[arg_i]
            ^~~~~~~~~~~~~~~

R/dEploidTools.R:32:29: style: Use <-, not =, for assignment.

excludeFileName = args[arg_i]
                            ^

R/dEploidTools.R:33:13: style: Variable and function names should be all lowercase.

excludeBool = TRUE
            ^~~~~~~~~~~

R/dEploidTools.R:33:25: style: Use <-, not =, for assignment.

excludeBool = TRUE
                        ^

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

​        } else if ( argv == "-o" ){
                  ^

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

​        } else if ( argv == "-o" ){
                                ^

R/dEploidTools.R:35:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:35:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:35:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:36:13: style: Variable and function names should be all lowercase.

outPrefix = args[arg_i]
            ^~~~~~~~~

R/dEploidTools.R:36:23: style: Use <-, not =, for assignment.

outPrefix = args[arg_i]
                      ^

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

​        } else if ( argv == "-dEprefix" ){
                  ^

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

​        } else if ( argv == "-dEprefix" ){
                                       ^

R/dEploidTools.R:38:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:38:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:38:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:39:13: style: Variable and function names should be all lowercase.

dEploidPrefix = args[arg_i]
            ^~~~~~~~~~~~~

R/dEploidTools.R:39:27: style: Use <-, not =, for assignment.

dEploidPrefix = args[arg_i]
                          ^

R/dEploidTools.R:44:15: style: Use <-, not =, for assignment.

arg_i = arg_i + 1
              ^

R/dEploidTools.R:51:8: style: Do not place spaces around code in parentheses or square brackets.

if ( plafFileName == "" ){
       ^

R/dEploidTools.R:51:10: style: Variable and function names should be all lowercase.

if ( plafFileName == "" ){
         ^~~~~~~~~~~~

R/dEploidTools.R:51:28: style: Do not place spaces around code in parentheses or square brackets.

if ( plafFileName == "" ){
                           ^

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

return ( list ( vcfFileName = vcfFileName,
           ^

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

return ( list ( vcfFileName = vcfFileName,
                  ^

R/dEploidTools.R:58:35: style: Variable and function names should be all lowercase.

return ( list ( vcfFileName = vcfFileName,
                                  ^~~~~~~~~~~

R/dEploidTools.R:59:35: style: Variable and function names should be all lowercase.

refFileName = refFileName,
                                  ^~~~~~~~~~~

R/dEploidTools.R:60:35: style: Variable and function names should be all lowercase.

altFileName = altFileName,
                                  ^~~~~~~~~~~

R/dEploidTools.R:61:36: style: Variable and function names should be all lowercase.

plafFileName = plafFileName,
                                   ^~~~~~~~~~~~

R/dEploidTools.R:62:33: style: Variable and function names should be all lowercase.

outPrefix = outPrefix,
                                ^~~~~~~~~

R/dEploidTools.R:63:37: style: Variable and function names should be all lowercase.

dEploidPrefix = dEploidPrefix,
                                    ^~~~~~~~~~~~~

R/dEploidTools.R:64:39: style: Variable and function names should be all lowercase.

excludeFileName = excludeFileName,
                                      ^~~~~~~~~~~~~~~

R/dEploidTools.R:65:35: style: Variable and function names should be all lowercase.

excludeBool = excludeBool) )
                                  ^~~~~~~~~~~

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

excludeBool = excludeBool) )
                                              ^

R/dEploidTools.R:69:1: style: Variable and function names should be all lowercase.

fun.dEploidPrefix <- function ( prefix ){
^~~~~~~~~~~~~~~~~

R/dEploidTools.R:81:1: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.extract.coverage <- function ( inputs ){
^~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:82:17: style: Variable and function names should be all lowercase.

if ( inputs$vcfFileName != "" ){
                ^~~~~~~~~~~

R/dEploidTools.R:83:17: style: Variable and function names should be all lowercase.

return (extractCoverageFromVcf (inputs$vcfFileName))
                ^~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:83:17: warning: no visible global function definition for ‘extractCoverageFromVcf’

return (extractCoverageFromVcf (inputs$vcfFileName))
                ^~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:83:48: style: Variable and function names should be all lowercase.

return (extractCoverageFromVcf (inputs$vcfFileName))
                                               ^~~~~~~~~~~

R/dEploidTools.R:85:17: style: Variable and function names should be all lowercase.

return (extractCoverageFromTxt (inputs$refFileName, inputs$altFileName))
                ^~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:85:17: warning: no visible global function definition for ‘extractCoverageFromTxt’

return (extractCoverageFromTxt (inputs$refFileName, inputs$altFileName))
                ^~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:85:48: style: Variable and function names should be all lowercase.

return (extractCoverageFromTxt (inputs$refFileName, inputs$altFileName))
                                               ^~~~~~~~~~~

R/dEploidTools.R:85:68: style: Variable and function names should be all lowercase.

return (extractCoverageFromTxt (inputs$refFileName, inputs$altFileName))
                                                                   ^~~~~~~~~~~

R/dEploidTools.R:109:1: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:109:38: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:109:51: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:110:9: style: Use <-, not =, for assignment.

ref = read.table(refFileName, header = TRUE, comment.char = "")
        ^

R/dEploidTools.R:110:22: style: Variable and function names should be all lowercase.

ref = read.table(refFileName, header = TRUE, comment.char = "")
                     ^~~~~~~~~~~

R/dEploidTools.R:111:9: style: Use <-, not =, for assignment.

alt = read.table(altFileName, header = TRUE, comment.char = "")
        ^

R/dEploidTools.R:111:22: style: Variable and function names should be all lowercase.

alt = read.table(altFileName, header = TRUE, comment.char = "")
                     ^~~~~~~~~~~

R/dEploidTools.R:112:39: style: Commas should always have a space after.

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

R/dEploidTools.R:113:37: style: Commas should always have a space after.

POS = ref[,2],
                                    ^

R/dEploidTools.R:114:42: style: Commas should always have a space after.

refCount = ref[,3],
                                         ^

R/dEploidTools.R:115:42: style: Commas should always have a space after.

altCount = alt[,3] )
                                         ^

R/dEploidTools.R:120:1: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.extract.exclude <- function (excludeFileName, excludeBool){
^~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:120:34: style: Variable and function names should be all lowercase.

fun.extract.exclude <- function (excludeFileName, excludeBool){
                                 ^~~~~~~~~~~~~~~

R/dEploidTools.R:120:51: style: Variable and function names should be all lowercase.

fun.extract.exclude <- function (excludeFileName, excludeBool){
                                                  ^~~~~~~~~~~

R/dEploidTools.R:121:10: style: Variable and function names should be all lowercase.

if ( excludeBool ) {
         ^~~~~~~~~~~

R/dEploidTools.R:122:39: style: Variable and function names should be all lowercase.

return ( list ( excludeBool = excludeBool,
                                      ^~~~~~~~~~~

R/dEploidTools.R:123:1: style: lines should not be more than 80 characters.

excludeTable = read.table(excludeFileName, header = TRUE, comment.char = "")))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:123:51: style: Variable and function names should be all lowercase.

excludeTable = read.table(excludeFileName, header = TRUE, comment.char = "")))
                                                  ^~~~~~~~~~~~~~~

R/dEploidTools.R:125:39: style: Variable and function names should be all lowercase.

return ( list ( excludeBool = excludeBool ))
                                      ^~~~~~~~~~~

R/dEploidTools.R:147:1: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:147:38: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:147:47: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:150:12: style: Place a space before left parenthesis, except in a function call.

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

R/dEploidTools.R:154:9: style: Use <-, not =, for assignment.

gzf = gzfile(vcfFile, open = "rb")
        ^

R/dEploidTools.R:154:18: style: Variable and function names should be all lowercase.

gzf = gzfile(vcfFile, open = "rb")
                 ^~~~~~~

R/dEploidTools.R:154:18: warning: no visible binding for global variable ‘vcfFile’

gzf = gzfile(vcfFile, open = "rb")
                 ^~~~~~~

R/dEploidTools.R:155:5: style: Variable and function names should be all lowercase.

skipNum = 0
    ^~~~~~~

R/dEploidTools.R:155:13: style: Use <-, not =, for assignment.

skipNum = 0
            ^

R/dEploidTools.R:156:10: style: Use <-, not =, for assignment.

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

R/dEploidTools.R:156:49: style: Put spaces around all infix operators.

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

R/dEploidTools.R:156:61: style: Put spaces around all infix operators.

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

R/dEploidTools.R:158:21: style: Commented code should be removed.

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

R/dEploidTools.R:159:13: style: Variable and function names should be all lowercase.

skipNum = skipNum+1
            ^~~~~~~

R/dEploidTools.R:159:21: style: Use <-, not =, for assignment.

skipNum = skipNum+1
                    ^

R/dEploidTools.R:159:23: style: Variable and function names should be all lowercase.

skipNum = skipNum+1
                      ^~~~~~~

R/dEploidTools.R:159:30: style: Put spaces around all infix operators.

skipNum = skipNum+1
                            ~^~

R/dEploidTools.R:163:14: style: Use <-, not =, for assignment.

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

R/dEploidTools.R:163:53: style: Put spaces around all infix operators.

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

R/dEploidTools.R:163:65: style: Put spaces around all infix operators.

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

R/dEploidTools.R:167:1: style: lines should not be more than 80 characters.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:167:10: style: Use <-, not =, for assignment.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
         ^

R/dEploidTools.R:167:31: style: Variable and function names should be all lowercase.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                              ^~~~~~~

R/dEploidTools.R:167:45: style: Put spaces around all infix operators.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                           ~^~

R/dEploidTools.R:167:46: style: Variable and function names should be all lowercase.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                             ^~~~~~~

R/dEploidTools.R:167:61: style: Put spaces around all infix operators.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                                           ~^~

R/dEploidTools.R:167:77: style: Put spaces around all infix operators.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                                                           ~^~

R/dEploidTools.R:167:119: style: Put spaces around all infix operators.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                                                                                                     ~^~

R/dEploidTools.R:169:5: style: Variable and function names should be all lowercase.

sampleName = names(vcf)[10]
    ^~~~~~~~~~

R/dEploidTools.R:169:16: style: Use <-, not =, for assignment.

sampleName = names(vcf)[10]
               ^

R/dEploidTools.R:171:9: style: Use <-, not =, for assignment.

tmp = vcf[[sampleName]]
        ^

R/dEploidTools.R:171:16: style: Variable and function names should be all lowercase.

tmp = vcf[[sampleName]]
               ^~~~~~~~~~

R/dEploidTools.R:172:11: style: Use <-, not =, for assignment.

field = strsplit(as.character(tmp),":")
          ^

R/dEploidTools.R:172:40: style: Commas should always have a space after.

field = strsplit(as.character(tmp),":")
                                       ^

R/dEploidTools.R:174:5: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:174:15: style: Use <-, not =, for assignment.

tmpCovStr = unlist(lapply(field, `[[`, ADFieldIndex))
              ^

R/dEploidTools.R:174:44: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:175:5: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:175:12: style: Use <-, not =, for assignment.

tmpCov = strsplit(as.character(tmpCovStr),",")
           ^

R/dEploidTools.R:175:36: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:175:47: style: Commas should always have a space after.

tmpCov = strsplit(as.character(tmpCovStr),",")
                                              ^

R/dEploidTools.R:177:5: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:177:14: style: Use <-, not =, for assignment.

refCount = as.numeric(unlist(lapply(tmpCov, `[[`, 1)))
             ^

R/dEploidTools.R:177:41: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:178:5: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:178:14: style: Use <-, not =, for assignment.

altCount = as.numeric(unlist(lapply(tmpCov, `[[`, 2)))
             ^

R/dEploidTools.R:178:41: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:180:39: style: Commas should always have a space after.

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

R/dEploidTools.R:181:37: style: Commas should always have a space after.

POS = vcf[,2],
                                    ^

R/dEploidTools.R:182:37: style: Variable and function names should be all lowercase.

refCount = refCount,
                                    ^~~~~~~~

R/dEploidTools.R:183:37: style: Variable and function names should be all lowercase.

altCount = altCount )
                                    ^~~~~~~~

R/dEploidTools.R:204:1: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:204:12: style: Put spaces around all infix operators.

extractPLAF<- function ( plafName ){
          ~^

R/dEploidTools.R:204:26: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:205:25: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:205:41: style: Put spaces around all infix operators.

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

R/dEploidTools.R:210:11: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
         ~^~~

R/dEploidTools.R:210:19: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
                 ~^~

R/dEploidTools.R:210:23: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
                     ~^~

R/dEploidTools.R:210:24: style: Place a space before left parenthesis, except in a function call.

f.samp<-f.samp+err*(1-2*f.samp);
                       ^

R/dEploidTools.R:210:26: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
                        ~^~

R/dEploidTools.R:210:28: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
                          ~^~

R/dEploidTools.R:211:1: style: lines should not be more than 80 characters.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:211:8: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
      ~^~~

R/dEploidTools.R:211:23: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                     ~^~

R/dEploidTools.R:211:30: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                            ~^~

R/dEploidTools.R:211:43: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                         ~^~

R/dEploidTools.R:211:44: style: Place a space before left parenthesis, except in a function call.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                           ^

R/dEploidTools.R:211:46: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                            ~^~

R/dEploidTools.R:211:54: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                    ~^~

R/dEploidTools.R:211:59: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                         ~^~

R/dEploidTools.R:211:72: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                      ~^~

R/dEploidTools.R:211:77: style: Commas should always have a space after.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                            ^

R/dEploidTools.R:211:77: style: Place a space before left parenthesis, except in a function call.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                            ^

R/dEploidTools.R:211:79: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                             ~^~

R/dEploidTools.R:211:87: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                                     ~^~

R/dEploidTools.R:212:1: style: lines should not be more than 80 characters.

#  llk<-lgamma(fac*f.samp+cov.alt)+lgamma(fac*(1-f.samp)+cov.ref)-lgamma(fac*f.samp)-lgamma(fac*(1-f.samp));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:212:8: style: Commented code should be removed.

#  llk<-lgamma(fac*f.samp+cov.alt)+lgamma(fac*(1-f.samp)+cov.ref)-lgamma(fac*f.samp)-lgamma(fac*(1-f.samp));
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:213:25: style: Put spaces around all infix operators.

if (sum(is.nan(llk))>1){
                       ~^~

R/dEploidTools.R:220:1: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.dic.by.llk.var <- function ( tmpllk ){
^~~~~~~~~~~~~~~~~~

R/dEploidTools.R:221:1: style: lines should not be more than 80 characters.

return (  mean(-2*tmpllk) + var(-2*tmpllk)/2 )# D_bar + 1/2 var (D_theta), where D_theta = -2*tmpllk, and D_bar = mean(D_theta)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:221:23: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + var(-2*tmpllk)/2 )# D_bar + 1/2 var (D_theta), where D_theta = -2*tmpllk, and D_bar = mean(D_theta)
                     ~^~

R/dEploidTools.R:221:40: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + var(-2*tmpllk)/2 )# D_bar + 1/2 var (D_theta), where D_theta = -2*tmpllk, and D_bar = mean(D_theta)
                                      ~^~

R/dEploidTools.R:221:48: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + var(-2*tmpllk)/2 )# D_bar + 1/2 var (D_theta), where D_theta = -2*tmpllk, and D_bar = mean(D_theta)
                                              ~^~

R/dEploidTools.R:225:1: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.dic.by.theta <- function ( tmpllk, thetallk ){
^~~~~~~~~~~~~~~~

R/dEploidTools.R:226:5: style: Words within variable and function names should be separated by '_' rather than '.'.

DIC.WSAF.bar = -2 * sum(thetallk)
    ^~~~~~~~~~~~

R/dEploidTools.R:226:18: style: Use <-, not =, for assignment.

DIC.WSAF.bar = -2 * sum(thetallk)
                 ^

R/dEploidTools.R:227:1: style: lines should not be more than 80 characters.

return (  mean(-2*tmpllk) + (mean(-2*tmpllk) - DIC.WSAF.bar) ) # D_bar + pD, where pD = D_bar - D_theta, and D_bar = mean(D_theta)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:227:22: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + (mean(-2*tmpllk) - DIC.WSAF.bar) ) # D_bar + pD, where pD = D_bar - D_theta, and D_bar = mean(D_theta)
                    ~^~

R/dEploidTools.R:227:41: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + (mean(-2*tmpllk) - DIC.WSAF.bar) ) # D_bar + pD, where pD = D_bar - D_theta, and D_bar = mean(D_theta)
                                       ~^~

@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/dEploidTools.R:1:22: style: Do not place spaces around code in parentheses or square brackets.

fun.parse <- function( args ){
                     ^

R/dEploidTools.R:1:28: style: Do not place spaces around code in parentheses or square brackets.

fun.parse <- function( args ){
                           ^

R/dEploidTools.R:2:5: style: Variable and function names should be all lowercase.

fun.local.checkAndIncreaseArgI <- function ( ){
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:2:5: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.local.checkAndIncreaseArgI <- function ( ){
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:2:48: style: Do not place spaces around code in parentheses or square brackets.

fun.local.checkAndIncreaseArgI <- function ( ){
                                               ^

R/dEploidTools.R:3:15: style: Use <-, not =, for assignment.

arg_i = arg_i+1
              ^

R/dEploidTools.R:3:22: style: Put spaces around all infix operators.

arg_i = arg_i+1
                    ~^~

R/dEploidTools.R:6:5: style: Variable and function names should be all lowercase.

outPrefix = "dataExplore"
    ^~~~~~~~~

R/dEploidTools.R:6:15: style: Use <-, not =, for assignment.

outPrefix = "dataExplore"
              ^

R/dEploidTools.R:7:5: style: Variable and function names should be all lowercase.

vcfFileName = ""
    ^~~~~~~~~~~

R/dEploidTools.R:7:17: style: Use <-, not =, for assignment.

vcfFileName = ""
                ^

R/dEploidTools.R:8:5: style: Variable and function names should be all lowercase.

refFileName = ""
    ^~~~~~~~~~~

R/dEploidTools.R:8:17: style: Use <-, not =, for assignment.

refFileName = ""
                ^

R/dEploidTools.R:9:5: style: Variable and function names should be all lowercase.

altFileName = ""
    ^~~~~~~~~~~

R/dEploidTools.R:9:17: style: Use <-, not =, for assignment.

altFileName = ""
                ^

R/dEploidTools.R:10:5: style: Variable and function names should be all lowercase.

plafFileName = ""
    ^~~~~~~~~~~~

R/dEploidTools.R:10:18: style: Use <-, not =, for assignment.

plafFileName = ""
                 ^

R/dEploidTools.R:11:5: style: Variable and function names should be all lowercase.

excludeFileName = ""
    ^~~~~~~~~~~~~~~

R/dEploidTools.R:11:21: style: Use <-, not =, for assignment.

excludeFileName = ""
                    ^

R/dEploidTools.R:12:5: style: Variable and function names should be all lowercase.

dEploidPrefix = ""
    ^~~~~~~~~~~~~

R/dEploidTools.R:12:19: style: Use <-, not =, for assignment.

dEploidPrefix = ""
                  ^

R/dEploidTools.R:13:5: style: Variable and function names should be all lowercase.

excludeBool = FALSE
    ^~~~~~~~~~~

R/dEploidTools.R:13:17: style: Use <-, not =, for assignment.

excludeBool = FALSE
                ^

R/dEploidTools.R:15:11: style: Use <-, not =, for assignment.

arg_i = 1
          ^

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

while ( arg_i < length(args) ){
          ^

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

while ( arg_i < length(args) ){
                                ^

R/dEploidTools.R:17:14: style: Use <-, not =, for assignment.

argv = args[arg_i]
             ^

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

if ( argv == "-vcf" ){
           ^

R/dEploidTools.R:18:28: style: Do not place spaces around code in parentheses or square brackets.

if ( argv == "-vcf" ){
                           ^

R/dEploidTools.R:19:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:19:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:19:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:20:13: style: Variable and function names should be all lowercase.

vcfFileName = args[arg_i]
            ^~~~~~~~~~~

R/dEploidTools.R:20:25: style: Use <-, not =, for assignment.

vcfFileName = args[arg_i]
                        ^

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

​        } else if ( argv == "-plaf" ){
                  ^

R/dEploidTools.R:21:36: style: Do not place spaces around code in parentheses or square brackets.

​        } else if ( argv == "-plaf" ){
                                   ^

R/dEploidTools.R:22:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:22:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:22:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:23:13: style: Variable and function names should be all lowercase.

plafFileName = args[arg_i]
            ^~~~~~~~~~~~

R/dEploidTools.R:23:26: style: Use <-, not =, for assignment.

plafFileName = args[arg_i]
                         ^

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

​        } else if ( argv == "-ref" ){
                  ^

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

​        } else if ( argv == "-ref" ){
                                  ^

R/dEploidTools.R:25:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:25:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:25:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:26:13: style: Variable and function names should be all lowercase.

refFileName = args[arg_i]
            ^~~~~~~~~~~

R/dEploidTools.R:26:25: style: Use <-, not =, for assignment.

refFileName = args[arg_i]
                        ^

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

​        } else if ( argv == "-alt" ){
                  ^

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

​        } else if ( argv == "-alt" ){
                                  ^

R/dEploidTools.R:28:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:28:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:28:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:29:13: style: Variable and function names should be all lowercase.

altFileName = args[arg_i]
            ^~~~~~~~~~~

R/dEploidTools.R:29:25: style: Use <-, not =, for assignment.

altFileName = args[arg_i]
                        ^

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

​        } else if ( argv == "-exclude" ){
                  ^

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

​        } else if ( argv == "-exclude" ){
                                      ^

R/dEploidTools.R:31:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:31:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:31:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:32:13: style: Variable and function names should be all lowercase.

excludeFileName = args[arg_i]
            ^~~~~~~~~~~~~~~

R/dEploidTools.R:32:29: style: Use <-, not =, for assignment.

excludeFileName = args[arg_i]
                            ^

R/dEploidTools.R:33:13: style: Variable and function names should be all lowercase.

excludeBool = TRUE
            ^~~~~~~~~~~

R/dEploidTools.R:33:25: style: Use <-, not =, for assignment.

excludeBool = TRUE
                        ^

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

​        } else if ( argv == "-o" ){
                  ^

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

​        } else if ( argv == "-o" ){
                                ^

R/dEploidTools.R:35:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:35:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:35:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:36:13: style: Variable and function names should be all lowercase.

outPrefix = args[arg_i]
            ^~~~~~~~~

R/dEploidTools.R:36:23: style: Use <-, not =, for assignment.

outPrefix = args[arg_i]
                      ^

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

​        } else if ( argv == "-dEprefix" ){
                  ^

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

​        } else if ( argv == "-dEprefix" ){
                                       ^

R/dEploidTools.R:38:19: style: Use <-, not =, for assignment.

arg_i = fun.local.checkAndIncreaseArgI ( )
                  ^

R/dEploidTools.R:38:21: style: Variable and function names should be all lowercase.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:38:21: style: Words within variable and function names should be separated by '_' rather than '.'.

arg_i = fun.local.checkAndIncreaseArgI ( )
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

arg_i = fun.local.checkAndIncreaseArgI ( )
                                                   ^

R/dEploidTools.R:39:13: style: Variable and function names should be all lowercase.

dEploidPrefix = args[arg_i]
            ^~~~~~~~~~~~~

R/dEploidTools.R:39:27: style: Use <-, not =, for assignment.

dEploidPrefix = args[arg_i]
                          ^

R/dEploidTools.R:44:15: style: Use <-, not =, for assignment.

arg_i = arg_i + 1
              ^

R/dEploidTools.R:51:8: style: Do not place spaces around code in parentheses or square brackets.

if ( plafFileName == "" ){
       ^

R/dEploidTools.R:51:10: style: Variable and function names should be all lowercase.

if ( plafFileName == "" ){
         ^~~~~~~~~~~~

R/dEploidTools.R:51:28: style: Do not place spaces around code in parentheses or square brackets.

if ( plafFileName == "" ){
                           ^

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

return ( list ( vcfFileName = vcfFileName,
           ^

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

return ( list ( vcfFileName = vcfFileName,
                  ^

R/dEploidTools.R:58:35: style: Variable and function names should be all lowercase.

return ( list ( vcfFileName = vcfFileName,
                                  ^~~~~~~~~~~

R/dEploidTools.R:59:35: style: Variable and function names should be all lowercase.

refFileName = refFileName,
                                  ^~~~~~~~~~~

R/dEploidTools.R:60:35: style: Variable and function names should be all lowercase.

altFileName = altFileName,
                                  ^~~~~~~~~~~

R/dEploidTools.R:61:36: style: Variable and function names should be all lowercase.

plafFileName = plafFileName,
                                   ^~~~~~~~~~~~

R/dEploidTools.R:62:33: style: Variable and function names should be all lowercase.

outPrefix = outPrefix,
                                ^~~~~~~~~

R/dEploidTools.R:63:37: style: Variable and function names should be all lowercase.

dEploidPrefix = dEploidPrefix,
                                    ^~~~~~~~~~~~~

R/dEploidTools.R:64:39: style: Variable and function names should be all lowercase.

excludeFileName = excludeFileName,
                                      ^~~~~~~~~~~~~~~

R/dEploidTools.R:65:35: style: Variable and function names should be all lowercase.

excludeBool = excludeBool) )
                                  ^~~~~~~~~~~

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

excludeBool = excludeBool) )
                                              ^

R/dEploidTools.R:69:1: style: Variable and function names should be all lowercase.

fun.dEploidPrefix <- function ( prefix ){
^~~~~~~~~~~~~~~~~

R/dEploidTools.R:81:1: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.extract.coverage <- function ( inputs ){
^~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:82:17: style: Variable and function names should be all lowercase.

if ( inputs$vcfFileName != "" ){
                ^~~~~~~~~~~

R/dEploidTools.R:83:17: style: Variable and function names should be all lowercase.

return (extractCoverageFromVcf (inputs$vcfFileName))
                ^~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:83:17: warning: no visible global function definition for ‘extractCoverageFromVcf’

return (extractCoverageFromVcf (inputs$vcfFileName))
                ^~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:83:48: style: Variable and function names should be all lowercase.

return (extractCoverageFromVcf (inputs$vcfFileName))
                                               ^~~~~~~~~~~

R/dEploidTools.R:85:17: style: Variable and function names should be all lowercase.

return (extractCoverageFromTxt (inputs$refFileName, inputs$altFileName))
                ^~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:85:17: warning: no visible global function definition for ‘extractCoverageFromTxt’

return (extractCoverageFromTxt (inputs$refFileName, inputs$altFileName))
                ^~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:85:48: style: Variable and function names should be all lowercase.

return (extractCoverageFromTxt (inputs$refFileName, inputs$altFileName))
                                               ^~~~~~~~~~~

R/dEploidTools.R:85:68: style: Variable and function names should be all lowercase.

return (extractCoverageFromTxt (inputs$refFileName, inputs$altFileName))
                                                                   ^~~~~~~~~~~

R/dEploidTools.R:109:1: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:109:38: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:109:51: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:110:9: style: Use <-, not =, for assignment.

ref = read.table(refFileName, header = TRUE, comment.char = "")
        ^

R/dEploidTools.R:110:22: style: Variable and function names should be all lowercase.

ref = read.table(refFileName, header = TRUE, comment.char = "")
                     ^~~~~~~~~~~

R/dEploidTools.R:111:9: style: Use <-, not =, for assignment.

alt = read.table(altFileName, header = TRUE, comment.char = "")
        ^

R/dEploidTools.R:111:22: style: Variable and function names should be all lowercase.

alt = read.table(altFileName, header = TRUE, comment.char = "")
                     ^~~~~~~~~~~

R/dEploidTools.R:112:39: style: Commas should always have a space after.

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

R/dEploidTools.R:113:37: style: Commas should always have a space after.

POS = ref[,2],
                                    ^

R/dEploidTools.R:114:42: style: Commas should always have a space after.

refCount = ref[,3],
                                         ^

R/dEploidTools.R:115:42: style: Commas should always have a space after.

altCount = alt[,3] )
                                         ^

R/dEploidTools.R:120:1: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.extract.exclude <- function (excludeFileName, excludeBool){
^~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:120:34: style: Variable and function names should be all lowercase.

fun.extract.exclude <- function (excludeFileName, excludeBool){
                                 ^~~~~~~~~~~~~~~

R/dEploidTools.R:120:51: style: Variable and function names should be all lowercase.

fun.extract.exclude <- function (excludeFileName, excludeBool){
                                                  ^~~~~~~~~~~

R/dEploidTools.R:121:10: style: Variable and function names should be all lowercase.

if ( excludeBool ) {
         ^~~~~~~~~~~

R/dEploidTools.R:122:39: style: Variable and function names should be all lowercase.

return ( list ( excludeBool = excludeBool,
                                      ^~~~~~~~~~~

R/dEploidTools.R:123:1: style: lines should not be more than 80 characters.

excludeTable = read.table(excludeFileName, header = TRUE, comment.char = "")))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:123:51: style: Variable and function names should be all lowercase.

excludeTable = read.table(excludeFileName, header = TRUE, comment.char = "")))
                                                  ^~~~~~~~~~~~~~~

R/dEploidTools.R:125:39: style: Variable and function names should be all lowercase.

return ( list ( excludeBool = excludeBool ))
                                      ^~~~~~~~~~~

R/dEploidTools.R:147:1: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:147:38: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:147:47: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:150:12: style: Place a space before left parenthesis, except in a function call.

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

R/dEploidTools.R:154:9: style: Use <-, not =, for assignment.

gzf = gzfile(vcfFile, open = "rb")
        ^

R/dEploidTools.R:154:18: style: Variable and function names should be all lowercase.

gzf = gzfile(vcfFile, open = "rb")
                 ^~~~~~~

R/dEploidTools.R:154:18: warning: no visible binding for global variable ‘vcfFile’

gzf = gzfile(vcfFile, open = "rb")
                 ^~~~~~~

R/dEploidTools.R:155:5: style: Variable and function names should be all lowercase.

skipNum = 0
    ^~~~~~~

R/dEploidTools.R:155:13: style: Use <-, not =, for assignment.

skipNum = 0
            ^

R/dEploidTools.R:156:10: style: Use <-, not =, for assignment.

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

R/dEploidTools.R:156:49: style: Put spaces around all infix operators.

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

R/dEploidTools.R:156:61: style: Put spaces around all infix operators.

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

R/dEploidTools.R:158:21: style: Commented code should be removed.

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

R/dEploidTools.R:159:13: style: Variable and function names should be all lowercase.

skipNum = skipNum+1
            ^~~~~~~

R/dEploidTools.R:159:21: style: Use <-, not =, for assignment.

skipNum = skipNum+1
                    ^

R/dEploidTools.R:159:23: style: Variable and function names should be all lowercase.

skipNum = skipNum+1
                      ^~~~~~~

R/dEploidTools.R:159:30: style: Put spaces around all infix operators.

skipNum = skipNum+1
                            ~^~

R/dEploidTools.R:163:14: style: Use <-, not =, for assignment.

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

R/dEploidTools.R:163:53: style: Put spaces around all infix operators.

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

R/dEploidTools.R:163:65: style: Put spaces around all infix operators.

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

R/dEploidTools.R:167:1: style: lines should not be more than 80 characters.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:167:10: style: Use <-, not =, for assignment.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
         ^

R/dEploidTools.R:167:31: style: Variable and function names should be all lowercase.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                              ^~~~~~~

R/dEploidTools.R:167:45: style: Put spaces around all infix operators.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                           ~^~

R/dEploidTools.R:167:46: style: Variable and function names should be all lowercase.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                             ^~~~~~~

R/dEploidTools.R:167:61: style: Put spaces around all infix operators.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                                           ~^~

R/dEploidTools.R:167:77: style: Put spaces around all infix operators.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                                                           ~^~

R/dEploidTools.R:167:119: style: Put spaces around all infix operators.

vcf  = read.table( gzfile(vcfName), skip=skipNum, header=T, comment.char="", stringsAsFactors = FALSE, check.names=FALSE)
                                                                                                                     ~^~

R/dEploidTools.R:169:5: style: Variable and function names should be all lowercase.

sampleName = names(vcf)[10]
    ^~~~~~~~~~

R/dEploidTools.R:169:16: style: Use <-, not =, for assignment.

sampleName = names(vcf)[10]
               ^

R/dEploidTools.R:171:9: style: Use <-, not =, for assignment.

tmp = vcf[[sampleName]]
        ^

R/dEploidTools.R:171:16: style: Variable and function names should be all lowercase.

tmp = vcf[[sampleName]]
               ^~~~~~~~~~

R/dEploidTools.R:172:11: style: Use <-, not =, for assignment.

field = strsplit(as.character(tmp),":")
          ^

R/dEploidTools.R:172:40: style: Commas should always have a space after.

field = strsplit(as.character(tmp),":")
                                       ^

R/dEploidTools.R:174:5: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:174:15: style: Use <-, not =, for assignment.

tmpCovStr = unlist(lapply(field, `[[`, ADFieldIndex))
              ^

R/dEploidTools.R:174:44: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:175:5: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:175:12: style: Use <-, not =, for assignment.

tmpCov = strsplit(as.character(tmpCovStr),",")
           ^

R/dEploidTools.R:175:36: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:175:47: style: Commas should always have a space after.

tmpCov = strsplit(as.character(tmpCovStr),",")
                                              ^

R/dEploidTools.R:177:5: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:177:14: style: Use <-, not =, for assignment.

refCount = as.numeric(unlist(lapply(tmpCov, `[[`, 1)))
             ^

R/dEploidTools.R:177:41: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:178:5: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:178:14: style: Use <-, not =, for assignment.

altCount = as.numeric(unlist(lapply(tmpCov, `[[`, 2)))
             ^

R/dEploidTools.R:178:41: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:180:39: style: Commas should always have a space after.

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

R/dEploidTools.R:181:37: style: Commas should always have a space after.

POS = vcf[,2],
                                    ^

R/dEploidTools.R:182:37: style: Variable and function names should be all lowercase.

refCount = refCount,
                                    ^~~~~~~~

R/dEploidTools.R:183:37: style: Variable and function names should be all lowercase.

altCount = altCount )
                                    ^~~~~~~~

R/dEploidTools.R:204:1: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:204:12: style: Put spaces around all infix operators.

extractPLAF<- function ( plafName ){
          ~^

R/dEploidTools.R:204:26: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:205:25: style: Variable and function names should be all lowercase.

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

R/dEploidTools.R:205:41: style: Put spaces around all infix operators.

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

R/dEploidTools.R:210:11: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
         ~^~~

R/dEploidTools.R:210:19: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
                 ~^~

R/dEploidTools.R:210:23: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
                     ~^~

R/dEploidTools.R:210:24: style: Place a space before left parenthesis, except in a function call.

f.samp<-f.samp+err*(1-2*f.samp);
                       ^

R/dEploidTools.R:210:26: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
                        ~^~

R/dEploidTools.R:210:28: style: Put spaces around all infix operators.

f.samp<-f.samp+err*(1-2*f.samp);
                          ~^~

R/dEploidTools.R:211:1: style: lines should not be more than 80 characters.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:211:8: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
      ~^~~

R/dEploidTools.R:211:23: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                     ~^~

R/dEploidTools.R:211:30: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                            ~^~

R/dEploidTools.R:211:43: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                         ~^~

R/dEploidTools.R:211:44: style: Place a space before left parenthesis, except in a function call.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                           ^

R/dEploidTools.R:211:46: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                            ~^~

R/dEploidTools.R:211:54: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                    ~^~

R/dEploidTools.R:211:59: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                         ~^~

R/dEploidTools.R:211:72: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                      ~^~

R/dEploidTools.R:211:77: style: Commas should always have a space after.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                            ^

R/dEploidTools.R:211:77: style: Place a space before left parenthesis, except in a function call.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                            ^

R/dEploidTools.R:211:79: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                             ~^~

R/dEploidTools.R:211:87: style: Put spaces around all infix operators.

llk<-lbeta(cov.alt+f.samp*fac, cov.ref+(1-f.samp)*fac)-lbeta(f.samp*fac,(1-f.samp)*fac);
                                                                                     ~^~

R/dEploidTools.R:212:1: style: lines should not be more than 80 characters.

#  llk<-lgamma(fac*f.samp+cov.alt)+lgamma(fac*(1-f.samp)+cov.ref)-lgamma(fac*f.samp)-lgamma(fac*(1-f.samp));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:212:8: style: Commented code should be removed.

#  llk<-lgamma(fac*f.samp+cov.alt)+lgamma(fac*(1-f.samp)+cov.ref)-lgamma(fac*f.samp)-lgamma(fac*(1-f.samp));
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:213:25: style: Put spaces around all infix operators.

if (sum(is.nan(llk))>1){
                       ~^~

R/dEploidTools.R:220:1: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.dic.by.llk.var <- function ( tmpllk ){
^~~~~~~~~~~~~~~~~~

R/dEploidTools.R:221:1: style: lines should not be more than 80 characters.

return (  mean(-2*tmpllk) + var(-2*tmpllk)/2 )# D_bar + 1/2 var (D_theta), where D_theta = -2*tmpllk, and D_bar = mean(D_theta)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:221:23: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + var(-2*tmpllk)/2 )# D_bar + 1/2 var (D_theta), where D_theta = -2*tmpllk, and D_bar = mean(D_theta)
                     ~^~

R/dEploidTools.R:221:40: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + var(-2*tmpllk)/2 )# D_bar + 1/2 var (D_theta), where D_theta = -2*tmpllk, and D_bar = mean(D_theta)
                                      ~^~

R/dEploidTools.R:221:48: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + var(-2*tmpllk)/2 )# D_bar + 1/2 var (D_theta), where D_theta = -2*tmpllk, and D_bar = mean(D_theta)
                                              ~^~

R/dEploidTools.R:225:1: style: Words within variable and function names should be separated by '_' rather than '.'.

fun.dic.by.theta <- function ( tmpllk, thetallk ){
^~~~~~~~~~~~~~~~

R/dEploidTools.R:226:5: style: Words within variable and function names should be separated by '_' rather than '.'.

DIC.WSAF.bar = -2 * sum(thetallk)
    ^~~~~~~~~~~~

R/dEploidTools.R:226:18: style: Use <-, not =, for assignment.

DIC.WSAF.bar = -2 * sum(thetallk)
                 ^

R/dEploidTools.R:227:1: style: lines should not be more than 80 characters.

return (  mean(-2*tmpllk) + (mean(-2*tmpllk) - DIC.WSAF.bar) ) # D_bar + pD, where pD = D_bar - D_theta, and D_bar = mean(D_theta)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/dEploidTools.R:227:22: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + (mean(-2*tmpllk) - DIC.WSAF.bar) ) # D_bar + pD, where pD = D_bar - D_theta, and D_bar = mean(D_theta)
                    ~^~

R/dEploidTools.R:227:41: style: Put spaces around all infix operators.

return (  mean(-2*tmpllk) + (mean(-2*tmpllk) - DIC.WSAF.bar) ) # D_bar + pD, where pD = D_bar - D_theta, and D_bar = mean(D_theta)
                                       ~^~

Please sign in to comment.