campbio / scruff

Single Cell RNA-seq UMI Filtering Facilitator
http://bioconductor.org/packages/scruff/
Other
8 stars 9 forks source link

apply lintr #116

Closed zhewa closed 5 years ago

lintr-bot commented 5 years ago

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

​        return (file.path)
               ^

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

​        return (file.path)
               ^

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

​        return (data.frame(Samples = i,
               ^

R/alignRsubread.R:279:15: style: Variable or function name should be lowerCamelCase.

​        resdf$Samples <- file.path(outDir, basename(resdf$Samples))
              ^~~~~~~

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

​        return (resdf)
               ^

R/alignRsubread.R:283:1: style: Trailing blank lines are superfluous.

​
^

R/countUMI.R:97:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/countUMI.R:107:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/countUMI.R:158:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/countUMI.R:166:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/countUMI.R:264:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/countUMI.R:268:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/countUMI.R:272:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/countUMI.R:276:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/countUMI.R:285:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/countUMI.R:304:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/countUMI.R:322:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/countUMI.R:331:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/countUMI.R:340:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/countUMI.R:347:1: style: Trailing whitespace is superfluous.

​    
^~~~

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

​        return (data.frame(countUmiDt,
               ^

R/countUMI.R:399:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/countUMI.R:407:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/countUMI.R:439:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/countUMI.R:464:16: warning: no visible binding for global variable 'umi', Did you mean 'umis'?

​        oldt[, umi := data.table::last(data.table::tstrsplit(name, ":"))]
               ^~~

R/countUMI.R:465:16: style: Variable or function name should be lowerCamelCase.

​        oldt[, inferred_umi := umi]
               ^~~~~~~~~~~~

R/countUMI.R:465:16: warning: no visible binding for global variable 'inferred_umi'

​        oldt[, inferred_umi := umi]
               ^~~~~~~~~~~~

R/countUMI.R:465:25: warning: no visible binding for global variable 'umi', Did you mean 'umis'?

​        oldt[, inferred_umi := umi]
                        ^~~

R/countUMI.R:466:1: style: Trailing whitespace is superfluous.

​        
^~~~~~~~

R/countUMI.R:468:63: warning: no visible binding for global variable 'gene_id'

​        readsMappedToGenes <- nrow(oldt[!grepl("ERCC", oldt[, gene_id ]), ])
                                                              ^~~~~~~

R/countUMI.R:468:70: style: Do not place spaces around code in parentheses or square brackets.

​        readsMappedToGenes <- nrow(oldt[!grepl("ERCC", oldt[, gene_id ]), ])
                                                                     ^

R/countUMI.R:469:1: style: Trailing whitespace is superfluous.

​        
^~~~~~~~

R/countUMI.R:471:29: warning: no visible binding for global variable 'umi', Did you mean 'umis'?

​        rpu <- table(oldt[, umi])
                            ^~~

R/countUMI.R:474:1: style: Trailing whitespace is superfluous.

​        
^~~~~~~~

R/countUMI.R:477:1: style: Trailing whitespace is superfluous.

​        
^~~~~~~~

R/countUMI.R:483:15: style: Commented code should be removed.

​        #     unique(oldt[, .(gene_id, umi, pos)])
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/countUMI.R:490:1: style: Trailing whitespace is superfluous.

​        
^~~~~~~~

R/countUMI.R:492:1: style: Trailing whitespace is superfluous.

​        
^~~~~~~~

R/countUMI.R:495:1: style: Trailing whitespace is superfluous.

​                
^~~~~~~~~~~~~~~~

R/countUMI.R:499:1: style: Trailing whitespace is superfluous.

​                
^~~~~~~~~~~~~~~~

R/countUMI.R:506:1: style: Trailing whitespace is superfluous.

​                    
^~~~~~~~~~~~~~~~~~~~

R/countUMI.R:510:29: style: Variable or function name should be lowerCamelCase.

​                            inferred_umi := names(umis)[j]]
                            ^~~~~~~~~~~~

R/countUMI.R:512:1: style: Trailing whitespace is superfluous.

​                    
^~~~~~~~~~~~~~~~~~~~

R/countUMI.R:519:34: warning: no visible binding for global variable 'inferred_umi'

​            rpuc <- table(oldt[, inferred_umi])
                                 ^~~~~~~~~~~~

R/countUMI.R:523:1: style: Trailing whitespace is superfluous.

​        
^~~~~~~~

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

​    return (countUmiDt)
           ^

R/countUMI.R:561:1: style: Trailing blank lines are superfluous.

​
^

R/demultiplex.R:113:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/demultiplex.R:115:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/demultiplex.R:146:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/demultiplex.R:274:30: warning: no visible binding for global variable 'cell_index'

​    cellname <- resDt[!is.na(cell_index), filename]
                             ^~~~~~~~~~

R/demultiplex.R:274:43: warning: no visible binding for global variable 'filename'

​    cellname <- resDt[!is.na(cell_index), filename]
                                          ^~~~~~~~

R/demultiplex.R:325:24: warning: no visible binding for global variable 'experiment'

​    expMetaDt <- fastq[experiment == i, ]
                       ^~~~~~~~~~

R/demultiplex.R:326:5: warning: no visible binding for global variable 'lane', Did you mean 'lanes'?

​    lanes <- unique(expMetaDt[, lane])
    ^~~~

R/demultiplex.R:334:17: warning: no visible binding for global variable 'reads', Did you mean 'fread'?

​    summaryDt[, reads := 0]
                ^~~~~

R/demultiplex.R:335:17: style: Variable or function name should be lowerCamelCase.

​    summaryDt[, percent_assigned := 0]
                ^~~~~~~~~~~~~~~~

R/demultiplex.R:335:17: warning: no visible binding for global variable 'percent_assigned'

​    summaryDt[, percent_assigned := 0]
                ^~~~~~~~~~~~~~~~

R/demultiplex.R:353:17: warning: no visible binding for global variable 'experiment'

​    summaryDt[, experiment := i]
                ^~~~~~~~~~

R/demultiplex.R:397:25: warning: no visible binding for global variable 'lane', Did you mean 'lanes'?

​        f1 <- expMetaDt[lane == j, read1_path]
                        ^~~~

R/demultiplex.R:397:36: warning: no visible binding for global variable 'read1_path'

​        f1 <- expMetaDt[lane == j, read1_path]
                                   ^~~~~~~~~~

R/demultiplex.R:398:25: warning: no visible binding for global variable 'lane', Did you mean 'lanes'?

​        f2 <- expMetaDt[lane == j, read2_path]
                        ^~~~

R/demultiplex.R:398:36: warning: no visible binding for global variable 'read2_path'

​        f2 <- expMetaDt[lane == j, read2_path]
                                   ^~~~~~~~~~

R/demultiplex.R:412:13: style: Opening curly braces should never go on their own line and should always be followed by a new line.

​            {
            ^

R/demultiplex.R:429:23: warning: no visible binding for global variable 'filename'

​            summaryDt[filename == "total", reads := reads + length(fqy1)]
                      ^~~~~~~~

R/demultiplex.R:429:44: warning: no visible binding for global variable 'reads', Did you mean 'fread'?

​            summaryDt[filename == "total", reads := reads + length(fqy1)]
                                           ^~~~~

R/demultiplex.R:429:44: warning: no visible binding for global variable 'reads', Did you mean 'fread'?

​            summaryDt[filename == "total", reads := reads + length(fqy1)]
                                           ^~~~~

R/demultiplex.R:471:18: style: Commented code should be removed.

​                #barcode = substr(fqy1@sread, bc.pos[1], bc.pos[2])
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/demultiplex.R:486:25: style: Variable or function name should be lowerCamelCase.

​                fqyDt[, bc_correct := vapply(barcode,
                        ^~~~~~~~~~

R/demultiplex.R:492:25: style: Variable or function name should be lowerCamelCase.

​                fqyDt[, bc_correct := barcode]
                        ^~~~~~~~~~

R/demultiplex.R:492:25: warning: no visible binding for global variable 'bc_correct'

​                fqyDt[, bc_correct := barcode]
                        ^~~~~~~~~~

R/demultiplex.R:492:39: warning: no visible binding for global variable 'barcode', Did you mean 'barcodeDt'?

​                fqyDt[, bc_correct := barcode]
                                      ^~~~~~~

R/demultiplex.R:499:32: warning: no visible binding for global variable 'barcode', Did you mean 'barcodeDt'?

​                cellBarcode <- barcodeDt[cell_index == k, barcode]
                               ^~~~~~~

R/demultiplex.R:499:42: warning: no visible binding for global variable 'cell_index'

​                cellBarcode <- barcodeDt[cell_index == k, barcode]
                                         ^~~~~~~~~~

R/demultiplex.R:500:32: warning: no visible binding for global variable 'bc_correct'

​                cfqDt <- fqyDt[bc_correct == cellBarcode, ]
                               ^~~~~~~~~~

R/demultiplex.R:506:39: warning: no visible binding for global variable 'cell_index'

​                outFname <- summaryDt[cell_index == k, filename]
                                      ^~~~~~~~~~

R/demultiplex.R:506:56: warning: no visible binding for global variable 'filename'

​                outFname <- summaryDt[cell_index == k, filename]
                                                       ^~~~~~~~

R/demultiplex.R:524:27: warning: no visible binding for global variable 'barcode', Did you mean 'barcodeDt'?

​                summaryDt[barcode == cellBarcode, reads := reads + nrow(cfqDt)]
                          ^~~~~~~

R/demultiplex.R:524:51: warning: no visible binding for global variable 'reads', Did you mean 'fread'?

​                summaryDt[barcode == cellBarcode, reads := reads + nrow(cfqDt)]
                                                  ^~~~~

R/demultiplex.R:524:51: warning: no visible binding for global variable 'reads', Did you mean 'fread'?

​                summaryDt[barcode == cellBarcode, reads := reads + nrow(cfqDt)]
                                                  ^~~~~

R/demultiplex.R:528:17: style: Variable or function name should be lowerCamelCase.

​                fastq_path := file.path(outDir, experiment, filename)]
                ^~~~~~~~~~

R/demultiplex.R:530:39: warning: no visible binding for global variable 'bc_correct'

​            undeterminedDt <- fqyDt[!(bc_correct %in% barcodeDt[, barcode]), ]
                                      ^~~~~~~~~~

R/demultiplex.R:530:55: warning: no visible binding for global variable 'barcode', Did you mean 'barcodeDt'?

​            undeterminedDt <- fqyDt[!(bc_correct %in% barcodeDt[, barcode]), ]
                                                      ^~~~~~~

R/demultiplex.R:573:17: style: Variable or function name should be lowerCamelCase.

​    summaryDt[, percent_assigned := 100 * reads /
                ^~~~~~~~~~~~~~~~

R/demultiplex.R:609:1: style: Trailing blank lines are superfluous.

​
^

R/gview.R:36:5: style: Variable or function name should be lowerCamelCase.

​    rect_width = 0.3,
    ^~~~~~~~~~

R/gview.R:37:5: style: Variable or function name should be lowerCamelCase.

​    line_width = 0.5,
    ^~~~~~~~~~

R/gview.R:38:5: style: Variable or function name should be lowerCamelCase.

​    arrow_segments = 10,
    ^~~~~~~~~~~~~~

R/gview.R:39:5: style: Variable or function name should be lowerCamelCase.

​    arrow_width = 30,
    ^~~~~~~~~~~

R/gview.R:40:5: style: Variable or function name should be lowerCamelCase.

​    arrow_length = 0.08,
    ^~~~~~~~~~~~

R/gview.R:41:5: style: Variable or function name should be lowerCamelCase.

​    arrow_type = "open",
    ^~~~~~~~~~

R/gview.R:42:5: style: Variable or function name should be lowerCamelCase.

​    text_size = 4) {
    ^~~~~~~~~

R/gview.R:43:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/gview.R:46:1: style: Trailing whitespace is superfluous.

​        
^~~~~~~~

R/gview.R:52:29: warning: no visible binding for global variable 'level', Did you mean 'levels'?

​                    txdt[i, level := step]
                            ^~~~~

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

​        return (txdt)
               ^

R/gview.R:61:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/gview.R:62:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/gview.R:64:36: warning: no visible binding for global variable 'transcript_id'

​        transcripts <- dt[, unique(transcript_id)]
                                   ^~~~~~~~~~~~~

R/gview.R:67:24: warning: no visible binding for global variable 'transcript_id'

​            exdt <- dt[transcript_id == i, ]
                       ^~~~~~~~~~~~~

R/gview.R:77:1: style: Trailing whitespace is superfluous.

​            
^~~~~~~~~~~~

R/gview.R:80:1: style: Trailing whitespace is superfluous.

​        
^~~~~~~~

R/gview.R:83:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/gview.R:84:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/gview.R:87:36: warning: no visible binding for global variable 'transcript_id'

​        transcripts <- dt[, unique(transcript_id)]
                                   ^~~~~~~~~~~~~

R/gview.R:92:1: style: Trailing whitespace is superfluous.

​        
^~~~~~~~

R/gview.R:93:21: warning: no visible binding for global variable 'type', Did you mean 'pipe'?

​        exons <- dt[type == "exon", ]
                    ^~~~

R/gview.R:94:1: style: Trailing whitespace is superfluous.

​        
^~~~~~~~

R/gview.R:98:28: warning: no visible binding for global variable 'level', Did you mean 'levels'?

​            y1 <- exons[i, level] - rect_width
                           ^~~~~

R/gview.R:99:28: warning: no visible binding for global variable 'level', Did you mean 'levels'?

​            y2 <- exons[i, level] + rect_width
                           ^~~~~

R/gview.R:100:1: style: Trailing whitespace is superfluous.

​            
^~~~~~~~~~~~

R/gview.R:106:34: style: Trailing whitespace is superfluous.

​                    exon_number = 
                                 ^

R/gview.R:108:36: style: Trailing whitespace is superfluous.

​                    transcript_id = 
                                   ^

R/gview.R:111:32: style: Trailing whitespace is superfluous.

​                    gene_name = 
                               ^

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

​        return (rdt)
               ^

R/gview.R:117:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/gview.R:118:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/gview.R:124:1: style: Trailing whitespace is superfluous.

​            
^~~~~~~~~~~~

R/gview.R:126:39: style: Put spaces around all infix operators.

​                x1 <- mi + (((ma - mi)/arrow_segments) *
                                     ~^~

R/gview.R:128:39: style: Put spaces around all infix operators.

​                x2 <- ma - (((ma - mi)/arrow_segments) *
                                     ~^~

R/gview.R:131:39: style: Put spaces around all infix operators.

​                x1 <- ma + (((mi - ma)/arrow_segments) *
                                     ~^~

R/gview.R:133:39: style: Put spaces around all infix operators.

​                x2 <- mi - (((mi - ma)/arrow_segments) *
                                     ~^~

R/gview.R:136:1: style: Trailing whitespace is superfluous.

​            
^~~~~~~~~~~~

R/gview.R:137:29: warning: no visible binding for global variable 'level', Did you mean 'levels'?

​            y1 <- rep(dt[i, level], arrow_segments)
                            ^~~~~

R/gview.R:139:1: style: Trailing whitespace is superfluous.

​            
^~~~~~~~~~~~

R/gview.R:155:1: style: Trailing whitespace is superfluous.

​        
^~~~~~~~

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

​        return (adt)
               ^

R/gview.R:158:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/gview.R:159:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/gview.R:162:1: style: Trailing whitespace is superfluous.

​        
^~~~~~~~

R/gview.R:166:1: style: Trailing whitespace is superfluous.

​            
^~~~~~~~~~~~

R/gview.R:167:27: style: Put spaces around all infix operators.

​            x <- (ma + mi)/2
                         ~^~

R/gview.R:168:24: warning: no visible binding for global variable 'level', Did you mean 'levels'?

​            y <- dt[i, level] + 0.4
                       ^~~~~

R/gview.R:169:1: style: Trailing whitespace is superfluous.

​            
^~~~~~~~~~~~

R/gview.R:175:1: style: Trailing whitespace is superfluous.

​            
^~~~~~~~~~~~

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

​        return (tdt)
               ^

R/gview.R:179:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/gview.R:180:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/gview.R:194:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/gview.R:198:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/gview.R:201:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/gview.R:204:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/gview.R:209:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/gview.R:239:1: style: Trailing whitespace is superfluous.

​    
^~~~

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

​    return (g)
           ^

R/gview.R:242:1: style: Trailing blank lines are superfluous.

​
^

R/qcplots.R:2:3: style: Trailing whitespace is superfluous.

​#' 
  ^

R/qcplots.R:6:3: style: Trailing whitespace is superfluous.

​#' 
  ^

R/qcplots.R:16:1: style: Trailing whitespace is superfluous.

​    
^~~~

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

​    return (list(g1, g2, g3, g4, g5, g6, g7, g8, g9, g10, g11, g12, g13,
           ^

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

​        return (NULL)
               ^

R/qcplots.R:43:1: style: Trailing whitespace is superfluous.

​    
^~~~

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

​    return (g)
           ^

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

​        return (NULL)
               ^

R/qcplots.R:73:1: style: Trailing whitespace is superfluous.

​    
^~~~

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

​    return (g)
           ^

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

​        return (NULL)
               ^

R/qcplots.R:103:1: style: Trailing whitespace is superfluous.

​    
^~~~

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

​    return (g)
           ^

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

​        return (NULL)
               ^

R/qcplots.R:133:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/qcplots.R:137:39: style: Put spaces around all infix operators.

​            y = reads_mapped_to_genome/reads,
                                     ~^~

R/qcplots.R:148:30: style: Trailing whitespace is superfluous.

​        .themePublication() + 
                             ^

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

​    return (g)
           ^

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

​        return (NULL)
               ^

R/qcplots.R:161:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/qcplots.R:165:38: style: Put spaces around all infix operators.

​            y = reads_mapped_to_genes/reads_mapped_to_genome,
                                    ~^~

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

​    return (g)
           ^

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

​        return (NULL)
               ^

R/qcplots.R:189:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/qcplots.R:193:38: style: Put spaces around all infix operators.

​            y = reads_mapped_to_genes/reads,
                                    ~^~

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

​    return (g)
           ^

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

​        return (NULL)
               ^

R/qcplots.R:216:1: style: Trailing whitespace is superfluous.

​    
^~~~

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

​    return (g)
           ^

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

​        return (NULL)
               ^

R/qcplots.R:245:1: style: Trailing whitespace is superfluous.

​    
^~~~

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

​    return (g)
           ^

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

​        return (NULL)
               ^

R/qcplots.R:275:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/qcplots.R:279:26: style: Put spaces around all infix operators.

​            y = mt_counts/total_counts,
                        ~^~

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

​    return (g)
           ^

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

​        return (NULL)
               ^

R/qcplots.R:302:1: style: Trailing whitespace is superfluous.

​    
^~~~

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

​    return (g)
           ^

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

​        return (NULL)
               ^

R/qcplots.R:332:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/qcplots.R:336:37: style: Put spaces around all infix operators.

​            y = protein_coding_genes/genes,
                                   ~^~

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

​    return (g)
           ^

R/qcplots.R:355:1: style: Variable and function names should not be longer than 30 characters.

​.plotFracProteinCodingTranscripts <- function(qcDt) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

​        return (NULL)
               ^

R/qcplots.R:360:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/qcplots.R:364:38: style: Put spaces around all infix operators.

​            y = protein_coding_counts/total_counts,
                                    ~^~

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

​    return (g)
           ^

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

​        return (NULL)
               ^

R/qcplots.R:387:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/qcplots.R:391:38: style: Put spaces around all infix operators.

​            y = log10(genes * 1000000/reads),
                                    ~^~

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

​    return (g)
           ^

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

​        return (NULL)
               ^

R/qcplots.R:420:1: style: Trailing whitespace is superfluous.

​    
^~~~

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

​    return (g)
           ^

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

​        return (NULL)
               ^

R/qcplots.R:450:1: style: Trailing whitespace is superfluous.

​    
^~~~

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

​    return (g)
           ^

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

​        return (NULL)
               ^

R/qcplots.R:480:1: style: Trailing whitespace is superfluous.

​    
^~~~

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

​        return (NULL)
               ^

R/qcplots.R:484:1: style: Trailing whitespace is superfluous.

​    
^~~~

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

​    return (g)
           ^

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

​        return (NULL)
               ^

R/qcplots.R:514:1: style: Trailing whitespace is superfluous.

​    
^~~~

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

​        return (NULL)
               ^

R/qcplots.R:518:1: style: Trailing whitespace is superfluous.

​    
^~~~

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

​    return (g)
           ^

R/qcplots.R:542:1: style: Trailing blank lines are superfluous.

​
^

R/rview.R:25:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/rview.R:31:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/rview.R:35:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/rview.R:40:1: style: Trailing whitespace is superfluous.

​    
^~~~

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

​    return (g)
           ^

R/rview.R:46:1: style: Trailing blank lines are superfluous.

​
^

R/scruff.R:190:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/scruff.R:194:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/scruff.R:217:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/scruff.R:233:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/scruff.R:246:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/scruff.R:248:1: style: Trailing whitespace is superfluous.

​    
^~~~

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

​    return (co)
           ^

R/scruff.R:251:1: style: Trailing blank lines are superfluous.

​
^

R/scruffFunctions.R:17:1: style: Trailing whitespace is superfluous.

​        
^~~~~~~~

R/scruffFunctions.R:24:37: style: Remove spaces before the left parenthesis in a function call.

​.stripLeadingUnderscore <- function (x)  sub("^\\_+", "", x)
                                    ^

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

​    return (sub(pattern = "\\.[^\\.]*$",
           ^

R/scruffFunctions.R:35:36: style: Variable or function name should be lowerCamelCase.

​.getAlignmentFilePaths <- function(fastq.paths, format, out.dir) {
                                   ^~~~~~~~~~~

R/scruffFunctions.R:35:57: style: Variable or function name should be lowerCamelCase.

​.getAlignmentFilePaths <- function(fastq.paths, format, out.dir) {
                                                        ^~~~~~~

R/scruffFunctions.R:36:5: style: Variable or function name should be lowerCamelCase.

​    file.paths <- file.path(out.dir,
    ^~~~~~~~~~

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

​    return (file.paths)
           ^

R/scruffFunctions.R:58:5: style: Variable or function name should be lowerCamelCase.

​    gtf.db.file <- paste0(basename(gtf), ".sqlite")
    ^~~~~~~~~~~

R/scruffFunctions.R:62:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/scruffFunctions.R:68:9: style: Variable or function name should be lowerCamelCase.

​        gtf.db <- GenomicFeatures::makeTxDbFromGFF(file = gtf)
        ^~~~~~

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

​        return (GenomicFeatures::exonsBy(gtf.db, by = "gene"))
               ^

R/scruffFunctions.R:72:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/scruffFunctions.R:73:5: style: Variable or function name should be lowerCamelCase.

​    gtf.db <- tryCatch(
    ^~~~~~

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

​    return (GenomicFeatures::exonsBy(gtf.db, by = "gene"))
           ^

R/scruffFunctions.R:88:1: style: Trailing whitespace is superfluous.

​    
^~~~

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

​            return (res[[bc]])
                   ^

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

​            return (res[[bc]])
                   ^

R/scruffFunctions.R:96:1: style: Trailing whitespace is superfluous.

​        
^~~~~~~~

R/scruffFunctions.R:101:9: style: Variable or function name should be lowerCamelCase.

​        min.dist <- min(sdm)
        ^~~~~~~~

R/scruffFunctions.R:106:24: style: Remove spaces before the left parenthesis in a function call.

​                return (res[[bc]])
                       ^

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

​        return (res[[bc]])
               ^

R/scruffFunctions.R:129:29: style: Opening curly braces should never go on their own line and should always be followed by a new line.

​        error = function(e) {}
                            ^

R/scruffFunctions.R:129:30: style: Closing curly-braces should always be on their own line, unless it's followed by an else.

​        error = function(e) {}
                             ^

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

​    return (sub(
           ^

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

​    return (function() {
           ^

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

​            return (NULL)
                   ^

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

​    return (function() {
           ^

R/scruffFunctions.R:173:1: style: Trailing whitespace is superfluous.

​        
^~~~~~~~

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

​            return (NULL)
                   ^

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

​            return (list(yld1, yld2))
                   ^

R/scruffFunctions.R:199:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/scruffFunctions.R:204:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/scruffFunctions.R:208:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/scruffFunctions.R:225:7: style: Commented code should be removed.

​#     gtfEG = refGenome::ensemblGenome(dirname(reference))
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/scruffFunctions.R:226:7: style: Commented code should be removed.

​#     refGenome::read.gtf(gtfEG, filename = basename(reference))
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/scruffFunctions.R:232:7: style: Commented code should be removed.

​#     geneAnnotation <- geneAnnotation[order(gene_id), ]
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/scruffFunctions.R:233:2: style: Trailing whitespace is superfluous.

​#     
 ^~~~~

R/scruffFunctions.R:235:11: style: Commented code should be removed.

​#         ercc <- features[grep("ERCC", names(features))]
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/scruffFunctions.R:240:15: style: Commented code should be removed.

​#             seqid = "ERCC"
              ^~~~~~~~~~~~~~

R/scruffFunctions.R:242:11: style: Commented code should be removed.

​#         geneAnnotation <- rbind(geneAnnotation, erccDt)
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/scruffFunctions.R:253:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/scruffFunctions.R:255:1: style: Trailing whitespace is superfluous.

​    
^~~~

R/scruffFunctions.R:266:44: warning: no visible binding for global variable 'gene_id'

​    geneAnnotation <- geneAnnotation[order(gene_id), ]
                                           ^~~~~~~
codecov-io commented 5 years ago

Codecov Report

Merging #116 into devel will not change coverage. The diff coverage is 0%.

Impacted file tree graph

@@         Coverage Diff          @@
##           devel   #116   +/-   ##
====================================
  Coverage      0%     0%           
====================================
  Files          9      9           
  Lines       1810   1812    +2     
====================================
- Misses      1810   1812    +2
Impacted Files Coverage Δ
R/gview.R 0% <0%> (ø) :arrow_up:
R/demultiplex.R 0% <0%> (ø) :arrow_up:
R/countUMI.R 0% <0%> (ø) :arrow_up:
R/rview.R 0% <0%> (ø) :arrow_up:
R/scruffFunctions.R 0% <0%> (ø) :arrow_up:
R/alignRsubread.R 0% <0%> (ø) :arrow_up:
R/scruff.R 0% <0%> (ø) :arrow_up:
R/qcplots.R 0% <0%> (ø) :arrow_up:
R/tenxBamqc.R 0% <0%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2886bcd...b1bb8a6. Read the comment docs.

lintr-bot commented 5 years ago

R/alignRsubread.R:93:1: style: Variable or function name should be .

​alignRsubread <- function(sce,
^~~~~~~~~~~~~

R/alignRsubread.R:93:27: style: Variable or function name should be .

​alignRsubread <- function(sce,
                          ^~~

R/alignRsubread.R:94:5: style: Variable or function name should be .

​    index,
    ^~~~~

R/alignRsubread.R:96:5: style: Variable or function name should be .

​    nBestLocations = 1,
    ^~~~~~~~~~~~~~

R/alignRsubread.R:98:5: style: Variable or function name should be .

​    outDir = "./Alignment",
    ^~~~~~

R/alignRsubread.R:99:5: style: Variable or function name should be .

​    cores = max(1, parallel::detectCores() - 2),
    ^~~~~

R/alignRsubread.R:100:5: style: Variable or function name should be .

​    threads = 1,
    ^~~~~~~

R/alignRsubread.R:101:5: style: Variable or function name should be .

​    summaryPrefix = "alignment",
    ^~~~~~~~~~~~~

R/alignRsubread.R:102:5: style: Variable or function name should be .

​    overwrite = FALSE,
    ^~~~~~~~~

R/alignRsubread.R:103:5: style: Variable or function name should be .

​    verbose = FALSE,
    ^~~~~~~

R/alignRsubread.R:104:5: style: Variable or function name should be .

​    logfilePrefix = format(Sys.time(),
    ^~~~~~~~~~~~~

R/alignRsubread.R:117:5: style: Variable or function name should be .

​    fastqPaths <- SummarizedExperiment::colData(sce)$fastq_path
    ^~~~~~~~~~

R/alignRsubread.R:128:5: style: Variable or function name should be .

​    logfile <- paste0(logfilePrefix, "_alignment_log.txt")
    ^~~~~~~

R/alignRsubread.R:145:9: style: Variable or function name should be .

​        alignmentPaths <- .getAlignmentFilePaths(fastqPaths, format, outDir)
        ^~~~~~~~~~~~~~

R/alignRsubread.R:164:9: style: Variable or function name should be .

​        alignmentFilePaths <- BiocParallel::bplapply(
        ^~~~~~~~~~~~~~~~~~

R/alignRsubread.R:177:34: style: Variable or function name should be .

​        invisible(capture.output(alignmentFilePaths <-
                                 ^~~~~~~~~~~~~~~~~~

R/alignRsubread.R:192:5: style: Variable or function name should be .

​    alignmentFilePaths <- unlist(alignmentFilePaths)
    ^~~~~~~~~~~~~~~~~~

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

​    resL <- suppressPackageStartupMessages(
    ^~~~

R/alignRsubread.R:201:5: style: Variable or function name should be .

​    resDt <- data.table::as.data.table(plyr::rbind.fill(resL))
    ^~~~~

R/alignRsubread.R:234:1: style: Variable or function name should be .

​.alignRsubreadUnit <- function(i,
^~~~~~~~~~~~~~~~~~

R/alignRsubread.R:235:5: style: Variable or function name should be .

​    index,
    ^~~~~

R/alignRsubread.R:237:5: style: Variable or function name should be .

​    nBestLocations,
    ^~~~~~~~~~~~~~

R/alignRsubread.R:239:5: style: Variable or function name should be .

​    outDir,
    ^~~~~~

R/alignRsubread.R:240:5: style: Variable or function name should be .

​    threads,
    ^~~~~~~

R/alignRsubread.R:241:5: style: Variable or function name should be .

​    logfile,
    ^~~~~~~

R/alignRsubread.R:271:1: style: Variable or function name should be .

​.propmappedWrapper <- function(i, outDir) {
^~~~~~~~~~~~~~~~~~

R/alignRsubread.R:271:35: style: Variable or function name should be .

​.propmappedWrapper <- function(i, outDir) {
                                  ^~~~~~

R/alignRsubread.R:278:9: style: Variable or function name should be .

​        resdf <- Rsubread::propmapped(i)
        ^~~~~

R/alignRsubread.R:279:15: style: Variable or function name should be .

​        resdf$Samples <- file.path(outDir, basename(resdf$Samples))
              ^~~~~~~

R/alignRsubread.R:283:1: style: Trailing blank lines are superfluous.

​
^

R/countUMI.R:84:1: style: Variable or function name should be .

​countUMI <- function(sce,
^~~~~~~~

R/countUMI.R:84:22: style: Variable or function name should be .

​countUMI <- function(sce,
                     ^~~

R/countUMI.R:85:5: style: Variable or function name should be .

​    reference,
    ^~~~~~~~~

R/countUMI.R:86:5: style: Variable or function name should be .

​    umiEdit = 0,
    ^~~~~~~

R/countUMI.R:88:5: style: Variable or function name should be .

​    outDir = "./Count",
    ^~~~~~

R/countUMI.R:89:5: style: Variable or function name should be .

​    cellPerWell = 1,
    ^~~~~~~~~~~

R/countUMI.R:90:5: style: Variable or function name should be .

​    cores = max(1, parallel::detectCores() - 2),
    ^~~~~

R/countUMI.R:91:5: style: Variable or function name should be .

​    outputPrefix = "countUMI",
    ^~~~~~~~~~~~

R/countUMI.R:92:5: style: Variable or function name should be .

​    verbose = FALSE,
    ^~~~~~~

R/countUMI.R:93:5: style: Variable or function name should be .

​    logfilePrefix = format(Sys.time(), "%Y%m%d_%H%M%S")) {
    ^~~~~~~~~~~~~

R/countUMI.R:96:5: style: Variable or function name should be .

​    geneAnnotation <- .getGeneAnnotation(reference)
    ^~~~~~~~~~~~~~

R/countUMI.R:98:5: style: Variable or function name should be .

​    gtfcolnames <- c("gene_id",
    ^~~~~~~~~~~

R/countUMI.R:110:5: style: Variable or function name should be .

​    isWindows <- .Platform$OS.type == "windows"
    ^~~~~~~~~

R/countUMI.R:120:5: style: Variable or function name should be .

​    alignmentFilePaths <- SummarizedExperiment::colData(sce)$alignment_path
    ^~~~~~~~~~~~~~~~~~

R/countUMI.R:128:5: style: Variable or function name should be .

​    logfile <- paste0(logfilePrefix, "_countUMI_log.txt")
    ^~~~~~~

R/countUMI.R:157:5: style: Variable or function name should be .

​    features <- suppressPackageStartupMessages(.gtfReadDb(reference))
    ^~~~~~~~

R/countUMI.R:161:26: style: Variable or function name should be .

​        error = function(e) {
                         ^

R/countUMI.R:170:13: style: Variable or function name should be .

​            alignmentFilePaths <- BiocParallel::bplapply(
            ^~~~~~~~~~~~~~~~~~

R/countUMI.R:177:13: style: Variable or function name should be .

​            alignmentFilePaths <- BiocParallel::bplapply(
            ^~~~~~~~~~~~~~~~~~

R/countUMI.R:184:9: style: Variable or function name should be .

​        alignmentFilePaths <- unlist(alignmentFilePaths)
        ^~~~~~~~~~~~~~~~~~

R/countUMI.R:189:9: style: Variable or function name should be .

​        exprL <- suppressPackageStartupMessages(
        ^~~~~

R/countUMI.R:201:9: style: Variable or function name should be .

​        exprL <- suppressPackageStartupMessages(
        ^~~~~

R/countUMI.R:214:5: style: Variable or function name should be .

​    expr <- do.call(cbind, exprL)
    ^~~~

R/countUMI.R:215:5: style: Variable or function name should be .

​    expr <- data.table::as.data.table(expr, keep.rownames = TRUE)
    ^~~~

R/countUMI.R:236:5: style: Variable or function name should be .

​    scruffsce <- SingleCellExperiment::SingleCellExperiment(
    ^~~~~~~~~

R/countUMI.R:252:5: style: Variable or function name should be .

​    readmapping <- t(expr[geneid %in% c("reads_mapped_to_genome",
    ^~~~~~~~~~~

R/countUMI.R:295:5: style: Variable or function name should be .

​    totalCounts <- base::colSums(as.data.frame(
    ^~~~~~~~~~~

R/countUMI.R:300:5: style: Variable or function name should be .

​    mtCounts <- base::colSums(as.data.frame(
    ^~~~~~~~

R/countUMI.R:309:5: style: Variable or function name should be .

​    geneNumber <- vapply(colnames(cm), function(cells) {
    ^~~~~~~~~~

R/countUMI.R:309:49: style: Variable or function name should be .

​    geneNumber <- vapply(colnames(cm), function(cells) {
                                                ^~~~~

R/countUMI.R:315:9: style: Variable or function name should be .

​        proteinCodingGene <- geneAnnotation[gene_biotype == "protein_coding",
        ^~~~~~~~~~~~~~~~~

R/countUMI.R:317:9: style: Variable or function name should be .

​        proGene <- vapply(colnames(cm), function(cells) {
        ^~~~~~~

R/countUMI.R:317:50: style: Variable or function name should be .

​        proGene <- vapply(colnames(cm), function(cells) {
                                                 ^~~~~

R/countUMI.R:320:9: style: Variable or function name should be .

​        proCounts <- base::colSums(as.data.frame(cm[proteinCodingGene, ]))
        ^~~~~~~~~

R/countUMI.R:323:5: style: Variable or function name should be .

​    qcdf <- cbind(SummarizedExperiment::colData(sce),
    ^~~~

R/countUMI.R:369:1: style: Variable or function name should be .

​.countUmiUnit <- function(i, features, umiEdit, logfile, verbose) {
^~~~~~~~~~~~~

R/countUMI.R:369:30: style: Variable or function name should be .

​.countUmiUnit <- function(i, features, umiEdit, logfile, verbose) {
                             ^~~~~~~~

R/countUMI.R:369:40: style: Variable or function name should be .

​.countUmiUnit <- function(i, features, umiEdit, logfile, verbose) {
                                       ^~~~~~~

R/countUMI.R:369:49: style: Variable or function name should be .

​.countUmiUnit <- function(i, features, umiEdit, logfile, verbose) {
                                                ^~~~~~~

R/countUMI.R:369:58: style: Variable or function name should be .

​.countUmiUnit <- function(i, features, umiEdit, logfile, verbose) {
                                                         ^~~~~~~

R/countUMI.R:380:9: style: Variable or function name should be .

​        countUmiDt <- data.table::data.table(
        ^~~~~~~~~~

R/countUMI.R:388:9: style: Variable or function name should be .

​        cell <- .removeLastExtension(i)
        ^~~~

R/countUMI.R:397:5: style: Variable or function name should be .

​    bfl <- Rsamtools::BamFile(i)
    ^~~

R/countUMI.R:398:5: style: Variable or function name should be .

​    bamGA <- GenomicAlignments::readGAlignments(bfl, use.names = TRUE)
    ^~~~~

R/countUMI.R:402:26: style: Variable or function name should be .

​        error = function(e) {
                         ^

R/countUMI.R:408:5: style: Variable or function name should be .

​    genomeReads <- data.table::data.table(
    ^~~~~~~~~~~

R/countUMI.R:421:5: style: Variable or function name should be .

​    readsMappedToGenome <- nrow(
    ^~~~~~~~~~~~~~~~~~~

R/countUMI.R:425:5: style: Variable or function name should be .

​    ol <- GenomicAlignments::findOverlaps(features, bamGA)
    ^~

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

​    oldt <- data.table::data.table(
    ^~~~

R/countUMI.R:435:9: style: Variable or function name should be .

​        oldt <- oldt[!(
        ^~~~

R/countUMI.R:443:9: style: Variable or function name should be .

​        countUmiDt <- data.table::data.table(
        ^~~~~~~~~~

R/countUMI.R:451:9: style: Variable or function name should be .

​        cell <- .removeLastExtension(i)
        ^~~~

R/countUMI.R:457:9: style: Variable or function name should be .

​        countUmiDt <- data.frame(countUmiDt,
        ^~~~~~~~~~

R/countUMI.R:464:16: style: Variable or function name should be .

​        oldt[, umi := data.table::last(data.table::tstrsplit(name, ":"))]
               ^~~

R/countUMI.R:465:16: style: Variable or function name should be .

​        oldt[, inferred_umi := umi]
               ^~~~~~~~~~~~

R/countUMI.R:468:9: style: Variable or function name should be .

​        readsMappedToGenes <- nrow(oldt[!grepl("ERCC", oldt[, gene_id]), ])
        ^~~~~~~~~~~~~~~~~~

R/countUMI.R:471:9: style: Variable or function name should be .

​        rpu <- table(oldt[, umi])
        ^~~

R/countUMI.R:472:9: style: Variable or function name should be .

​        medReadsUmi <- median(rpu)
        ^~~~~~~~~~~

R/countUMI.R:473:9: style: Variable or function name should be .

​        avgReadsUmi <- mean(rpu)
        ^~~~~~~~~~~

R/countUMI.R:475:9: style: Variable or function name should be .

​        medReadsUmic <- 0
        ^~~~~~~~~~~~

R/countUMI.R:476:9: style: Variable or function name should be .

​        avgReadsUmic <- 0
        ^~~~~~~~~~~~

R/countUMI.R:496:17: style: Variable or function name should be .

​                umis <- sort(table(oldt[gene_id == g, inferred_umi]),
                ^~~~

R/countUMI.R:498:17: style: Variable or function name should be .

​                j <- 1
                ^

R/countUMI.R:501:21: style: Variable or function name should be .

​                    u <- names(umis)[j]
                    ^

R/countUMI.R:502:21: style: Variable or function name should be .

​                    sdm <- stringdist::stringdistmatrix(u, names(umis),
                    ^~~

R/countUMI.R:505:21: style: Variable or function name should be .

​                    mindist <- min(sdm, na.rm = TRUE)
                    ^~~~~~~

R/countUMI.R:508:25: style: Variable or function name should be .

​                        inds <- which(sdm == mindist)
                        ^~~~

R/countUMI.R:510:29: style: Variable or function name should be .

​                            inferred_umi := names(umis)[j]]
                            ^~~~~~~~~~~~

R/countUMI.R:513:21: style: Variable or function name should be .

​                    umis <- sort(table(oldt[gene_id == g, inferred_umi]),
                    ^~~~

R/countUMI.R:515:21: style: Variable or function name should be .

​                    j <- j + 1
                    ^

R/countUMI.R:519:13: style: Variable or function name should be .

​            rpuc <- table(oldt[, inferred_umi])
            ^~~~

R/countUMI.R:520:13: style: Variable or function name should be .

​            medReadsUmic <- median(rpuc)
            ^~~~~~~~~~~~

R/countUMI.R:521:13: style: Variable or function name should be .

​            avgReadsUmic <- mean(rpuc)
            ^~~~~~~~~~~~

R/countUMI.R:524:9: style: Variable or function name should be .

​        countUmi <- base::table(unique(oldt[,
        ^~~~~~~~

R/countUMI.R:528:9: style: Variable or function name should be .

​        countUmiDt <- data.table::data.table(
        ^~~~~~~~~~

R/countUMI.R:536:9: style: Variable or function name should be .

​        cell <- .removeLastExtension(i)
        ^~~~

R/countUMI.R:554:9: style: Variable or function name should be .

​        countUmiDt <- data.frame(countUmiDt,
        ^~~~~~~~~~

R/countUMI.R:561:1: style: Trailing blank lines are superfluous.

​
^

R/demultiplex.R:89:1: style: Variable or function name should be .

​demultiplex <- function(project = paste0("project_", Sys.Date()),
^~~~~~~~~~~

R/demultiplex.R:89:25: style: Variable or function name should be .

​demultiplex <- function(project = paste0("project_", Sys.Date()),
                        ^~~~~~~

R/demultiplex.R:90:5: style: Variable or function name should be .

​    experiment,
    ^~~~~~~~~~

R/demultiplex.R:91:5: style: Variable or function name should be .

​    lane,
    ^~~~

R/demultiplex.R:92:5: style: Variable or function name should be .

​    read1Path,
    ^~~~~~~~~

R/demultiplex.R:93:5: style: Variable or function name should be .

​    read2Path,
    ^~~~~~~~~

R/demultiplex.R:94:5: style: Variable or function name should be .

​    bc,
    ^~

R/demultiplex.R:95:5: style: Variable or function name should be .

​    bcStart,
    ^~~~~~~

R/demultiplex.R:96:5: style: Variable or function name should be .

​    bcStop,
    ^~~~~~

R/demultiplex.R:97:5: style: Variable or function name should be .

​    bcEdit = 0,
    ^~~~~~

R/demultiplex.R:98:5: style: Variable or function name should be .

​    umiStart,
    ^~~~~~~~

R/demultiplex.R:99:5: style: Variable or function name should be .

​    umiStop,
    ^~~~~~~

R/demultiplex.R:100:5: style: Variable or function name should be .

​    keep,
    ^~~~

R/demultiplex.R:101:5: style: Variable or function name should be .

​    minQual = 10,
    ^~~~~~~

R/demultiplex.R:102:5: style: Variable or function name should be .

​    yieldReads = 1e06,
    ^~~~~~~~~~

R/demultiplex.R:103:5: style: Variable or function name should be .

​    outDir = "./Demultiplex",
    ^~~~~~

R/demultiplex.R:104:5: style: Variable or function name should be .

​    summaryPrefix = "demultiplex",
    ^~~~~~~~~~~~~

R/demultiplex.R:105:5: style: Variable or function name should be .

​    overwrite = FALSE,
    ^~~~~~~~~

R/demultiplex.R:106:5: style: Variable or function name should be .

​    cores = max(1, parallel::detectCores() - 2),
    ^~~~~

R/demultiplex.R:107:5: style: Variable or function name should be .

​    verbose = FALSE,
    ^~~~~~~

R/demultiplex.R:108:5: style: Variable or function name should be .

​    logfilePrefix = format(Sys.time(), "%Y%m%d_%H%M%S")) {
    ^~~~~~~~~~~~~

R/demultiplex.R:126:5: style: Variable or function name should be .

​    isWindows <- .Platform$OS.type == "windows"
    ^~~~~~~~~

R/demultiplex.R:135:5: style: Variable or function name should be .

​    fastqAnnot <- data.table::data.table(
    ^~~~~~~~~~

R/demultiplex.R:149:5: style: Variable or function name should be .

​    fastqAnnotDt <- data.table::data.table(fastqAnnot)
    ^~~~~~~~~~~~

R/demultiplex.R:150:5: style: Variable or function name should be .

​    barcodeDt <- data.table::data.table("cell_index" = seq_len(length(bc)),
    ^~~~~~~~~

R/demultiplex.R:152:5: style: Variable or function name should be .

​    expId <- fastqAnnotDt[, unique(experiment)]
    ^~~~~

R/demultiplex.R:155:5: style: Variable or function name should be .

​    nthreads <- .Call(ShortRead:::.set_omp_threads, 1L)
    ^~~~~~~~

R/demultiplex.R:163:13: style: Variable or function name should be .

​            resL <- BiocParallel::bplapply(X = expId,
            ^~~~

R/demultiplex.R:183:13: style: Variable or function name should be .

​            resL <- BiocParallel::bplapply(X = expId,
            ^~~~

R/demultiplex.R:206:13: style: Variable or function name should be .

​            resL <- BiocParallel::bplapply(X = expId,
            ^~~~

R/demultiplex.R:227:13: style: Variable or function name should be .

​            resL <- BiocParallel::bplapply(X = expId,
            ^~~~

R/demultiplex.R:250:5: style: Variable or function name should be .

​    resDt <- as.data.table(plyr::rbind.fill(resL))
    ^~~~~

R/demultiplex.R:274:5: style: Variable or function name should be .

​    cellname <- resDt[!is.na(cell_index), filename]
    ^~~~~~~~

R/demultiplex.R:275:5: style: Variable or function name should be .

​    cellname <- gsub(
    ^~~~~~~~

R/demultiplex.R:285:5: style: Variable or function name should be .

​    summaryDF <- S4Vectors::DataFrame(resDt[!is.na(cell_index), -"filename"],
    ^~~~~~~~~

R/demultiplex.R:287:5: style: Variable or function name should be .

​    placeholder <- matrix(ncol = length(cellname))
    ^~~~~~~~~~~

R/demultiplex.R:288:5: style: Variable or function name should be .

​    sce <- SingleCellExperiment::SingleCellExperiment(placeholder)
    ^~~

R/demultiplex.R:297:1: style: Variable or function name should be .

​.demultiplexUnit <- function(i,
^~~~~~~~~~~~~~~~

R/demultiplex.R:298:5: style: Variable or function name should be .

​    fastq,
    ^~~~~

R/demultiplex.R:299:5: style: Variable or function name should be .

​    barcodeDt,
    ^~~~~~~~~

R/demultiplex.R:300:5: style: Variable or function name should be .

​    bcStart,
    ^~~~~~~

R/demultiplex.R:301:5: style: Variable or function name should be .

​    bcStop,
    ^~~~~~

R/demultiplex.R:302:5: style: Variable or function name should be .

​    bcEdit,
    ^~~~~~

R/demultiplex.R:303:5: style: Variable or function name should be .

​    umiStart,
    ^~~~~~~~

R/demultiplex.R:304:5: style: Variable or function name should be .

​    umiStop,
    ^~~~~~~

R/demultiplex.R:305:5: style: Variable or function name should be .

​    keep,
    ^~~~

R/demultiplex.R:306:5: style: Variable or function name should be .

​    minQual,
    ^~~~~~~

R/demultiplex.R:307:5: style: Variable or function name should be .

​    yieldReads,
    ^~~~~~~~~~

R/demultiplex.R:308:5: style: Variable or function name should be .

​    outDir,
    ^~~~~~

R/demultiplex.R:309:5: style: Variable or function name should be .

​    summaryPrefix,
    ^~~~~~~~~~~~~

R/demultiplex.R:310:5: style: Variable or function name should be .

​    overwrite,
    ^~~~~~~~~

R/demultiplex.R:311:5: style: Variable or function name should be .

​    logfilePrefix) {
    ^~~~~~~~~~~~~

R/demultiplex.R:314:9: style: Variable or function name should be .

​        logfile <- paste0(logfilePrefix, "_demultiplex_", i, "_log.txt")
        ^~~~~~~

R/demultiplex.R:316:9: style: Variable or function name should be .

​        logfile <- NULL
        ^~~~~~~

R/demultiplex.R:325:5: style: Variable or function name should be .

​    expMetaDt <- fastq[experiment == i, ]
    ^~~~~~~~~

R/demultiplex.R:326:5: style: Variable or function name should be .

​    lanes <- unique(expMetaDt[, lane])
    ^~~~~

R/demultiplex.R:327:5: style: Variable or function name should be .

​    summaryDt <- data.table::copy(barcodeDt)
    ^~~~~~~~~

R/demultiplex.R:328:17: style: Variable or function name should be .

​    summaryDt[, filename := paste0(expMetaDt[,
                ^~~~~~~~

R/demultiplex.R:334:17: style: Variable or function name should be .

​    summaryDt[, reads := 0]
                ^~~~~

R/demultiplex.R:335:17: style: Variable or function name should be .

​    summaryDt[, percent_assigned := 0]
                ^~~~~~~~~~~~~~~~

R/demultiplex.R:338:5: style: Variable or function name should be .

​    summaryDt <- data.table::rbindlist(
    ^~~~~~~~~

R/demultiplex.R:353:17: style: Variable or function name should be .

​    summaryDt[, experiment := i]
                ^~~~~~~~~~

R/demultiplex.R:397:9: style: Variable or function name should be .

​        f1 <- expMetaDt[lane == j, read1_path]
        ^~

R/demultiplex.R:398:9: style: Variable or function name should be .

​        f2 <- expMetaDt[lane == j, read2_path]
        ^~

R/demultiplex.R:406:9: style: Variable or function name should be .

​        fq1 <- ShortRead::FastqStreamer(f1, n = yieldReads)
        ^~~

R/demultiplex.R:407:9: style: Variable or function name should be .

​        fq2 <- ShortRead::FastqStreamer(f2, n = yieldReads)
        ^~~

R/demultiplex.R:409:13: style: Variable or function name should be .

​            fqy1 <- ShortRead::yield(fq1)
            ^~~~

R/demultiplex.R:410:13: style: Variable or function name should be .

​            fqy2 <- ShortRead::yield(fq2)
            ^~~~

R/demultiplex.R:429:44: style: Variable or function name should be .

​            summaryDt[filename == "total", reads := reads + length(fqy1)]
                                           ^~~~~

R/demultiplex.R:431:13: style: Variable or function name should be .

​            umiBcQual <- ""
            ^~~~~~~~~

R/demultiplex.R:432:13: style: Variable or function name should be .

​            umiSeq <- ""
            ^~~~~~

R/demultiplex.R:433:13: style: Variable or function name should be .

​            bcSeq <- ""
            ^~~~~

R/demultiplex.R:435:17: style: Variable or function name should be .

​                umiBcQual <- paste0(umiBcQual,
                ^~~~~~~~~

R/demultiplex.R:439:17: style: Variable or function name should be .

​                umiSeq <- paste(umiSeq, substr(fqy1@sread,
                ^~~~~~

R/demultiplex.R:442:17: style: Variable or function name should be .

​                umiSeq <- .stripLeadingUnderscore(umiSeq)
                ^~~~~~

R/demultiplex.R:446:17: style: Variable or function name should be .

​                umiBcQual <- paste0(umiBcQual,
                ^~~~~~~~~

R/demultiplex.R:450:17: style: Variable or function name should be .

​                bcSeq <- paste(bcSeq, substr(fqy1@sread,
                ^~~~~

R/demultiplex.R:453:17: style: Variable or function name should be .

​                bcSeq <- .stripLeadingUnderscore(bcSeq)
                ^~~~~

R/demultiplex.R:456:13: style: Variable or function name should be .

​            minBasePhred1 <- min(methods::as(
            ^~~~~~~~~~~~~

R/demultiplex.R:460:13: style: Variable or function name should be .

​            fqyDt <- data.table::data.table(
            ^~~~~

R/demultiplex.R:478:13: style: Variable or function name should be .

​            fqyDt <- fqyDt[min.phred1 >= minQual &
            ^~~~~

R/demultiplex.R:486:25: style: Variable or function name should be .

​                fqyDt[, bc_correct := vapply(barcode,
                        ^~~~~~~~~~

R/demultiplex.R:492:25: style: Variable or function name should be .

​                fqyDt[, bc_correct := barcode]
                        ^~~~~~~~~~

R/demultiplex.R:496:17: style: Variable or function name should be .

​                reads := reads + length(fqy1) - nrow(fqyDt)]
                ^~~~~

R/demultiplex.R:499:17: style: Variable or function name should be .

​                cellBarcode <- barcodeDt[cell_index == k, barcode]
                ^~~~~~~~~~~

R/demultiplex.R:500:17: style: Variable or function name should be .

​                cfqDt <- fqyDt[bc_correct == cellBarcode, ]
                ^~~~~

R/demultiplex.R:506:17: style: Variable or function name should be .

​                outFname <- summaryDt[cell_index == k, filename]
                ^~~~~~~~

R/demultiplex.R:507:17: style: Variable or function name should be .

​                outFull <- file.path(outDir, i, outFname)
                ^~~~~~~

R/demultiplex.R:514:21: style: Variable or function name should be .

​                    fqOut <- ShortRead::ShortReadQ(
                    ^~~~~

R/demultiplex.R:524:51: style: Variable or function name should be .

​                summaryDt[barcode == cellBarcode, reads := reads + nrow(cfqDt)]
                                                  ^~~~~

R/demultiplex.R:528:17: style: Variable or function name should be .

​                fastq_path := file.path(outDir, experiment, filename)]
                ^~~~~~~~~~

R/demultiplex.R:530:13: style: Variable or function name should be .

​            undeterminedDt <- fqyDt[!(bc_correct %in% barcodeDt[, barcode]), ]
            ^~~~~~~~~~~~~~

R/demultiplex.R:531:13: style: Variable or function name should be .

​            undeterminedFqOutR1 <- ShortRead::ShortReadQ(
            ^~~~~~~~~~~~~~~~~~~

R/demultiplex.R:536:13: style: Variable or function name should be .

​            undeterminedFqOutR2 <- ShortRead::ShortReadQ(
            ^~~~~~~~~~~~~~~~~~~

R/demultiplex.R:541:13: style: Variable or function name should be .

​            outFullUndeterminedR1 <- file.path(outDir,
            ^~~~~~~~~~~~~~~~~~~~~

R/demultiplex.R:544:13: style: Variable or function name should be .

​            outFullUndeterminedR2 <- file.path(outDir,
            ^~~~~~~~~~~~~~~~~~~~~

R/demultiplex.R:560:17: style: Variable or function name should be .

​                reads := reads + nrow(undeterminedDt)]
                ^~~~~

R/demultiplex.R:573:17: style: Variable or function name should be .

​    summaryDt[, percent_assigned := 100 * reads /
                ^~~~~~~~~~~~~~~~

R/demultiplex.R:609:1: style: Trailing blank lines are superfluous.

​
^

R/gview.R:31:1: style: Variable or function name should be .

​gview <- function(gtfFile,
^~~~~

R/gview.R:31:19: style: Variable or function name should be .

​gview <- function(gtfFile,
                  ^~~~~~~

R/gview.R:32:5: style: Variable or function name should be .

​    chr = 1,
    ^~~

R/gview.R:36:5: style: Variable or function name should be .

​    rect_width = 0.3,
    ^~~~~~~~~~

R/gview.R:37:5: style: Variable or function name should be .

​    line_width = 0.5,
    ^~~~~~~~~~

R/gview.R:38:5: style: Variable or function name should be .

​    arrow_segments = 10,
    ^~~~~~~~~~~~~~

R/gview.R:39:5: style: Variable or function name should be .

​    arrow_width = 30,
    ^~~~~~~~~~~

R/gview.R:40:5: style: Variable or function name should be .

​    arrow_length = 0.08,
    ^~~~~~~~~~~~

R/gview.R:41:5: style: Variable or function name should be .

​    arrow_type = "open",
    ^~~~~~~~~~

R/gview.R:42:5: style: Variable or function name should be .

​    text_size = 4) {
    ^~~~~~~~~

R/gview.R:44:5: style: Variable or function name should be .

​    .getLevel <- function(txdt) {
    ^~~~~~~~~

R/gview.R:44:27: style: Variable or function name should be .

​    .getLevel <- function(txdt) {
                          ^~~~

R/gview.R:45:9: style: Variable or function name should be .

​        txdt <- txdt[order(start, end), ]
        ^~~~

R/gview.R:49:13: style: Variable or function name should be .

​            x1 <- -1
            ^~

R/gview.R:52:29: style: Variable or function name should be .

​                    txdt[i, level := step]
                            ^~~~~

R/gview.R:53:29: style: Variable or function name should be .

​                    txdt[i, set := 1]
                            ^~~

R/gview.R:54:21: style: Variable or function name should be .

​                    x1 <- txdt[i, end]
                    ^~

R/gview.R:63:5: style: Variable or function name should be .

​    .getTxdt <- function(dt) {
    ^~~~~~~~

R/gview.R:64:9: style: Variable or function name should be .

​        transcripts <- dt[, unique(transcript_id)]
        ^~~~~~~~~~~

R/gview.R:65:9: style: Variable or function name should be .

​        txdt <- data.table::data.table()
        ^~~~

R/gview.R:67:13: style: Variable or function name should be .

​            exdt <- dt[transcript_id == i, ]
            ^~~~

R/gview.R:68:13: style: Variable or function name should be .

​            txdt <- rbind(txdt,
            ^~~~

R/gview.R:79:16: style: Variable or function name should be .

​        txdt[, set := 0]
               ^~~

R/gview.R:81:9: style: Variable or function name should be .

​        txdt <- .getLevel(txdt)
        ^~~~

R/gview.R:85:5: style: Variable or function name should be .

​    .transRect <- function(dt, txdt) {
    ^~~~~~~~~~

R/gview.R:85:32: style: Variable or function name should be .

​    .transRect <- function(dt, txdt) {
                               ^~~~

R/gview.R:86:9: style: Variable or function name should be .

​        rdt <- data.table::data.table()
        ^~~

R/gview.R:87:9: style: Variable or function name should be .

​        transcripts <- dt[, unique(transcript_id)]
        ^~~~~~~~~~~

R/gview.R:90:17: style: Variable or function name should be .

​                level := txdt[transcript_id == tx, level]]
                ^~~~~

R/gview.R:93:9: style: Variable or function name should be .

​        exons <- dt[type == "exon", ]
        ^~~~~

R/gview.R:96:13: style: Variable or function name should be .

​            x1 <- exons[i, start]
            ^~

R/gview.R:97:13: style: Variable or function name should be .

​            x2 <- exons[i, end]
            ^~

R/gview.R:98:13: style: Variable or function name should be .

​            y1 <- exons[i, level] - rect_width
            ^~

R/gview.R:99:13: style: Variable or function name should be .

​            y2 <- exons[i, level] + rect_width
            ^~

R/gview.R:101:13: style: Variable or function name should be .

​            rdt <- rbind(rdt,
            ^~~

R/gview.R:119:5: style: Variable or function name should be .

​    .transArrow <- function(dt) {
    ^~~~~~~~~~~

R/gview.R:120:9: style: Variable or function name should be .

​        adt <- data.table::data.table()
        ^~~

R/gview.R:122:13: style: Variable or function name should be .

​            mi <- dt[i, start]
            ^~

R/gview.R:123:13: style: Variable or function name should be .

​            ma <- dt[i, end]
            ^~

R/gview.R:126:17: style: Variable or function name should be .

​                x1 <- mi + (((ma - mi)/arrow_segments) *
                ^~

R/gview.R:126:39: style: Put spaces around all infix operators.

​                x1 <- mi + (((ma - mi)/arrow_segments) *
                                     ~^~

R/gview.R:128:17: style: Variable or function name should be .

​                x2 <- ma - (((ma - mi)/arrow_segments) *
                ^~

R/gview.R:128:39: style: Put spaces around all infix operators.

​                x2 <- ma - (((ma - mi)/arrow_segments) *
                                     ~^~

R/gview.R:131:17: style: Variable or function name should be .

​                x1 <- ma + (((mi - ma)/arrow_segments) *
                ^~

R/gview.R:131:39: style: Put spaces around all infix operators.

​                x1 <- ma + (((mi - ma)/arrow_segments) *
                                     ~^~

R/gview.R:133:17: style: Variable or function name should be .

​                x2 <- mi - (((mi - ma)/arrow_segments) *
                ^~

R/gview.R:133:39: style: Put spaces around all infix operators.

​                x2 <- mi - (((mi - ma)/arrow_segments) *
                                     ~^~

R/gview.R:137:13: style: Variable or function name should be .

​            y1 <- rep(dt[i, level], arrow_segments)
            ^~

R/gview.R:138:13: style: Variable or function name should be .

​            y2 <- y1
            ^~

R/gview.R:140:13: style: Variable or function name should be .

​            adt <- rbind(adt,
            ^~~

R/gview.R:160:5: style: Variable or function name should be .

​    .transText <- function(dt) {
    ^~~~~~~~~~

R/gview.R:161:9: style: Variable or function name should be .

​        tdt <- data.table::data.table()
        ^~~

R/gview.R:164:13: style: Variable or function name should be .

​            mi <- dt[i, start]
            ^~

R/gview.R:165:13: style: Variable or function name should be .

​            ma <- dt[i, end]
            ^~

R/gview.R:167:13: style: Variable or function name should be .

​            x <- (ma + mi)/2
            ^

R/gview.R:167:27: style: Put spaces around all infix operators.

​            x <- (ma + mi)/2
                         ~^~

R/gview.R:168:13: style: Variable or function name should be .

​            y <- dt[i, level] + 0.4
            ^

R/gview.R:170:13: style: Variable or function name should be .

​            tdt <- rbind(tdt,
            ^~~

R/gview.R:182:5: style: Variable or function name should be .

​    gtfDt <- data.table::as.data.table(
    ^~~~~

R/gview.R:196:5: style: Variable or function name should be .

​    begin <- start
    ^~~~~

R/gview.R:197:5: style: Variable or function name should be .

​    ed <- end
    ^~

R/gview.R:200:5: style: Variable or function name should be .


​    gtfDt <- gtfDt[end >= begin & start <= ed & seqnames == chr, ]
lintr-bot commented 5 years ago

R/countUMI.R:561:1: style: Trailing blank lines are superfluous.

​
^

R/demultiplex.R:609:1: style: Trailing blank lines are superfluous.

​
^

R/gview.R:242:1: style: Trailing blank lines are superfluous.

​
^

R/qcplots.R:137:39: style: Put spaces around all infix operators.

​            y = reads_mapped_to_genome/reads,
                                     ~^~

R/qcplots.R:165:38: style: Put spaces around all infix operators.

​            y = reads_mapped_to_genes/reads_mapped_to_genome,
                                    ~^~

R/qcplots.R:193:38: style: Put spaces around all infix operators.

​            y = reads_mapped_to_genes/reads,
                                    ~^~

R/qcplots.R:279:26: style: Put spaces around all infix operators.

​            y = mt_counts/total_counts,
                        ~^~

R/qcplots.R:336:37: style: Put spaces around all infix operators.

​            y = protein_coding_genes/genes,
                                   ~^~

R/qcplots.R:355:1: style: Variable and function names should not be longer than 30 characters.

​.plotFracProteinCodingTranscripts <- function(qcDt) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/qcplots.R:364:38: style: Put spaces around all infix operators.

​            y = protein_coding_counts/total_counts,
                                    ~^~

R/qcplots.R:391:38: style: Put spaces around all infix operators.

​            y = log10(genes * 1000000/reads),
                                    ~^~

R/qcplots.R:542:1: style: Trailing blank lines are superfluous.

​
^

R/rview.R:46:1: style: Trailing blank lines are superfluous.

​
^

R/scruff.R:251:1: style: Trailing blank lines are superfluous.

​
^

R/scruffFunctions.R:24:37: style: Remove spaces before the left parenthesis in a function call.

​.stripLeadingUnderscore <- function (x)  sub("^\\_+", "", x)
                                    ^

R/scruffFunctions.R:129:29: style: Opening curly braces should never go on their own line and should always be followed by a new line.

​        error = function(e) {}
                            ^

R/scruffFunctions.R:129:30: style: Closing curly-braces should always be on their own line, unless it's followed by an else.

​        error = function(e) {}
                             ^

R/scruffFunctions.R:309:56: style: Put spaces around all infix operators.

​                axis.line = ggplot2::element_line(color="black"),
                                                      ~^~

R/scruffFunctions.R:316:32: style: Put spaces around all infix operators.

​                legend.key.size= ggplot2::unit(0.2, "cm"),
                              ~^

R/scruffFunctions.R:325:1: style: Trailing blank lines are superfluous.

​
^

tests/testthat/testscruff.R:7:3: style: Opening curly braces should never go on their own line and should always be followed by a new line.

​  {
  ^