stianlagstad / chimeraviz

chimeraviz is an R package that automates the creation of chimeric RNA visualizations.
37 stars 14 forks source link

Adds lintr test #40

Closed stianlagstad closed 6 years ago

lintr-bot commented 6 years ago

tests/testthat/test_createFusionReport.R:7:10: style: Put spaces around all infix operators.

​  package="chimeraviz")
        ~^~

tests/testthat/test_createFusionReport.R:10:1: style: Variable and function names should be all lowercase.

​outputFilename <- tempfile(
^~~~~~~~~~~~~~

tests/testthat/test_createFusionReport.R:16:31: style: Variable and function names should be all lowercase.

​  createFusionReport(fusions, outputFilename)
                              ^~~~~~~~~~~~~~

tests/testthat/test_createFusionReport.R:18:26: style: Variable and function names should be all lowercase.

​  expect_equal(file.info(outputFilename)$size > 0, TRUE)
                         ^~~~~~~~~~~~~~

tests/testthat/test_fusionsToGeneLabelData.R:1:1: style: lines should not be more than 80 characters.

​context("Test creating gene label data that RCircos will accept from a list of Fusion object")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_fusionsToGeneLabelData.R:6:10: style: Put spaces around all infix operators.

​  package="chimeraviz")
        ~^~

tests/testthat/test_fusionsToGeneLabelData.R:8:1: style: Variable and function names should be all lowercase.

​labelData <- .fusionsToGeneLabelData(fusions)
^~~~~~~~~

tests/testthat/test_fusionsToGeneLabelData.R:8:14: style: Variable and function names should be all lowercase.

​labelData <- .fusionsToGeneLabelData(fusions)
             ^~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_fusionsToGeneLabelData.R:11:23: style: Variable and function names should be all lowercase.

​  expect_equal(length(labelData$Chromosome), length(fusions) * 2)
                      ^~~~~~~~~

tests/testthat/test_fusionsToGeneLabelData.R:12:1: style: lines should not be more than 80 characters.

​  expect_equal(as.character(labelData$Chromosome[1]), fusions[[1]]@geneA@chromosome)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_fusionsToGeneLabelData.R:12:29: style: Variable and function names should be all lowercase.

​  expect_equal(as.character(labelData$Chromosome[1]), fusions[[1]]@geneA@chromosome)
                            ^~~~~~~~~

tests/testthat/test_fusionsToLinkData.R:1:1: style: lines should not be more than 80 characters.

​context("Test creating link data that RCircos will accept from a list of Fusion object")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_fusionsToLinkData.R:6:10: style: Put spaces around all infix operators.

​  package="chimeraviz")
        ~^~

tests/testthat/test_fusionsToLinkData.R:8:1: style: Variable and function names should be all lowercase.

​linkData <- .fusionsToLinkData(fusions)
^~~~~~~~

tests/testthat/test_fusionsToLinkData.R:8:13: style: Variable and function names should be all lowercase.

​linkData <- .fusionsToLinkData(fusions)
            ^~~~~~~~~~~~~~~~~~

tests/testthat/test_fusionsToLinkData.R:11:23: style: Variable and function names should be all lowercase.

​  expect_equal(length(linkData$Chromosome), length(fusions))
                      ^~~~~~~~

tests/testthat/test_fusionsToLinkData.R:12:1: style: lines should not be more than 80 characters.

​  expect_equal(as.character(linkData$Chromosome[1]), fusions[[1]]@geneA@chromosome)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_fusionsToLinkData.R:12:29: style: Variable and function names should be all lowercase.

​  expect_equal(as.character(linkData$Chromosome[1]), fusions[[1]]@geneA@chromosome)
                            ^~~~~~~~

tests/testthat/test_getFusionBy.R:6:10: style: Put spaces around all infix operators.

​  package="chimeraviz")
        ~^~

tests/testthat/test_importDefuse.R:5:35: style: Put spaces around all infix operators.

​                           package="chimeraviz")
                                 ~^~

tests/testthat/test_importEricscript.R:3:1: style: Variable and function names should be all lowercase.

​ericscriptData <- system.file(
^~~~~~~~~~~~~~

tests/testthat/test_importEricscript.R:7:29: style: Variable and function names should be all lowercase.

​fusions <- importEricscript(ericscriptData, "hg19", 3)
                            ^~~~~~~~~~~~~~

tests/testthat/test_importEricscript.R:19:33: style: Variable and function names should be all lowercase.

​  expect_error(importEricscript(ericscriptData, "Invalid-genome"))
                                ^~~~~~~~~~~~~~

tests/testthat/test_importEricscript.R:20:33: style: Variable and function names should be all lowercase.

​  expect_error(importEricscript(ericscriptData, "hg19", "invalid limit"))
                                ^~~~~~~~~~~~~~

tests/testthat/test_importEricscript.R:24:40: style: Variable and function names should be all lowercase.

​  expect_equal(length(importEricscript(ericscriptData, "hg19", 2)), 2)
                                       ^~~~~~~~~~~~~~

tests/testthat/test_importFusionmap.R:3:1: style: Variable and function names should be all lowercase.

​fusionmapData <- system.file(
^~~~~~~~~~~~~

tests/testthat/test_importFusionmap.R:7:28: style: Variable and function names should be all lowercase.

​fusions <- importFusionmap(fusionmapData, "hg19", 3)
                           ^~~~~~~~~~~~~

tests/testthat/test_importFusionmap.R:19:32: style: Variable and function names should be all lowercase.

​  expect_error(importFusionmap(fusionmapData, "Invalid-genome"))
                               ^~~~~~~~~~~~~

tests/testthat/test_importFusionmap.R:20:32: style: Variable and function names should be all lowercase.

​  expect_error(importFusionmap(fusionmapData, "hg19", "invalid limit"))
                               ^~~~~~~~~~~~~

tests/testthat/test_importFusionmap.R:24:39: style: Variable and function names should be all lowercase.

​  expect_equal(length(importFusionmap(fusionmapData, "hg19", 2)), 2)
                                      ^~~~~~~~~~~~~

tests/testthat/test_importInfusion.R:3:1: style: Variable and function names should be all lowercase.

​infusionData <- system.file(
^~~~~~~~~~~~

tests/testthat/test_importInfusion.R:7:27: style: Variable and function names should be all lowercase.

​fusions <- importInfusion(infusionData, "hg19", 3)
                          ^~~~~~~~~~~~

tests/testthat/test_importInfusion.R:19:31: style: Variable and function names should be all lowercase.

​  expect_error(importInfusion(infusionData, "Invalid-genome"))
                              ^~~~~~~~~~~~

tests/testthat/test_importInfusion.R:20:31: style: Variable and function names should be all lowercase.

​  expect_error(importInfusion(infusionData, "hg19", "invalid limit"))
                              ^~~~~~~~~~~~

tests/testthat/test_importInfusion.R:24:38: style: Variable and function names should be all lowercase.

​  expect_equal(length(importInfusion(infusionData, "hg19", 2)), 2)
                                     ^~~~~~~~~~~~

tests/testthat/test_importJaffa.R:3:1: style: Variable and function names should be all lowercase.

​jaffaData <- system.file(
^~~~~~~~~

tests/testthat/test_importJaffa.R:7:24: style: Variable and function names should be all lowercase.

​fusions <- importJaffa(jaffaData, "hg19", 3)
                       ^~~~~~~~~

tests/testthat/test_importJaffa.R:20:28: style: Variable and function names should be all lowercase.

​  expect_error(importJaffa(jaffaData, "Invalid-genome"))
                           ^~~~~~~~~

tests/testthat/test_importJaffa.R:21:28: style: Variable and function names should be all lowercase.

​  expect_error(importJaffa(jaffaData, "hg19", "invalid limit"))
                           ^~~~~~~~~

tests/testthat/test_importJaffa.R:25:35: style: Variable and function names should be all lowercase.

​  expect_equal(length(importJaffa(jaffaData, "hg19", 2)), 2)
                                  ^~~~~~~~~

tests/testthat/test_importPrada.R:3:1: style: Variable and function names should be all lowercase.

​pradaData <- system.file(
^~~~~~~~~

tests/testthat/test_importPrada.R:7:24: style: Variable and function names should be all lowercase.

​fusions <- importPrada(pradaData, "hg19", 3)
                       ^~~~~~~~~

tests/testthat/test_importPrada.R:20:28: style: Variable and function names should be all lowercase.

​  expect_error(importPrada(pradaData, "Invalid-genome"))
                           ^~~~~~~~~

tests/testthat/test_importPrada.R:21:28: style: Variable and function names should be all lowercase.

​  expect_error(importPrada(pradaData, "hg19", "invalid limit"))
                           ^~~~~~~~~

tests/testthat/test_importPrada.R:25:35: style: Variable and function names should be all lowercase.

​  expect_equal(length(importPrada(pradaData, "hg19", 2)), 2)
                                  ^~~~~~~~~

tests/testthat/test_importStarfusion.R:3:1: style: Variable and function names should be all lowercase.

​starfusionData <- system.file(
^~~~~~~~~~~~~~

tests/testthat/test_importStarfusion.R:7:29: style: Variable and function names should be all lowercase.

​fusions <- importStarfusion(starfusionData, "hg19", 3)
                            ^~~~~~~~~~~~~~

tests/testthat/test_importStarfusion.R:20:33: style: Variable and function names should be all lowercase.

​  expect_error(importStarfusion(starfusionData, "Invalid-genome"))
                                ^~~~~~~~~~~~~~

tests/testthat/test_importStarfusion.R:21:33: style: Variable and function names should be all lowercase.

​  expect_error(importStarfusion(starfusionData, "hg19", "invalid limit"))
                                ^~~~~~~~~~~~~~

tests/testthat/test_importStarfusion.R:25:40: style: Variable and function names should be all lowercase.

​  expect_equal(length(importStarfusion(starfusionData, "hg19", 2)), 2)
                                       ^~~~~~~~~~~~~~

tests/testthat/test_lintr.R:7:1: style: Trailing blank lines are superfluous.

​
^

tests/testthat/test_plotCircle.R:7:10: style: Put spaces around all infix operators.

​  package="chimeraviz")
        ~^~

tests/testthat/test_plotCircle.R:10:1: style: Variable and function names should be all lowercase.

​pngFilename <- tempfile(
^~~~~~~~~~~

tests/testthat/test_plotCircle.R:17:7: style: Variable and function names should be all lowercase.

​  png(pngFilename, width = 1000, height = 750)
      ^~~~~~~~~~~

tests/testthat/test_plotCircle.R:23:26: style: Variable and function names should be all lowercase.

​  expect_equal(file.info(pngFilename)$size > 0, TRUE)
                         ^~~~~~~~~~~

tests/testthat/test_plotFusion.R:7:10: style: Put spaces around all infix operators.

​  package="chimeraviz")
        ~^~

tests/testthat/test_plotFusion.R:11:1: style: Variable and function names should be all lowercase.

​edbSqliteFile <- system.file(
^~~~~~~~~~~~~

tests/testthat/test_plotFusion.R:14:10: style: Put spaces around all infix operators.

​  package="chimeraviz")
        ~^~

tests/testthat/test_plotFusion.R:15:25: style: Variable and function names should be all lowercase.

​edb <- ensembldb::EnsDb(edbSqliteFile)
                        ^~~~~~~~~~~~~

tests/testthat/test_plotFusion.R:20:12: style: Put spaces around all infix operators.

​    package="chimeraviz")
          ~^~

tests/testthat/test_plotFusion.R:24:3: style: Variable and function names should be all lowercase.

​  pngFilename <- tempfile(
  ^~~~~~~~~~~

tests/testthat/test_plotFusion.R:29:7: style: Variable and function names should be all lowercase.

​  png(pngFilename, width = 1000, height = 750)
      ^~~~~~~~~~~

tests/testthat/test_plotFusion.R:40:26: style: Variable and function names should be all lowercase.

​  expect_equal(file.info(pngFilename)$size > 0, TRUE)
                         ^~~~~~~~~~~

tests/testthat/test_plotFusion.R:47:3: style: Variable and function names should be all lowercase.

​  pngFilename <- tempfile(
  ^~~~~~~~~~~

tests/testthat/test_plotFusion.R:52:7: style: Variable and function names should be all lowercase.

​  png(pngFilename, width = 1000, height = 750)
      ^~~~~~~~~~~

tests/testthat/test_plotFusion.R:62:26: style: Variable and function names should be all lowercase.

​  expect_equal(file.info(pngFilename)$size > 0, TRUE)
                         ^~~~~~~~~~~

tests/testthat/test_plotFusion.R:71:3: style: Variable and function names should be all lowercase.

​  transcriptsA <- selectTranscript(fusion@geneA)
  ^~~~~~~~~~~~

tests/testthat/test_plotFusion.R:73:23: style: Variable and function names should be all lowercase.

​  expect_equal(length(transcriptsA), 4)
                      ^~~~~~~~~~~~

tests/testthat/test_plotFusion.R:75:3: style: Variable and function names should be all lowercase.

​  transcriptsB <- selectTranscript(fusion@geneB)
  ^~~~~~~~~~~~

tests/testthat/test_plotFusion.R:77:23: style: Variable and function names should be all lowercase.

​  expect_equal(length(transcriptsB), 4)
                      ^~~~~~~~~~~~

tests/testthat/test_plotFusionReads.R:7:10: style: Put spaces around all infix operators.

​  package="chimeraviz")
        ~^~

tests/testthat/test_plotFusionReads.R:14:10: style: Put spaces around all infix operators.

​  package="chimeraviz")
        ~^~

tests/testthat/test_plotFusionReads.R:16:1: style: Variable and function names should be all lowercase.

​pngFilename <- tempfile(
^~~~~~~~~~~

tests/testthat/test_plotFusionReads.R:24:40: style: Variable and function names should be all lowercase.

​  expect_error(plotFusionReads(fusion, pngFilename))
                                       ^~~~~~~~~~~

tests/testthat/test_plotFusionReads.R:30:1: style: lines should not be more than 80 characters.

​  imageWidth <- (nchar(fusion@geneA@junctionSequence) + nchar(fusion@geneB@junctionSequence)) * 10
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_plotFusionReads.R:30:3: style: Variable and function names should be all lowercase.

​  imageWidth <- (nchar(fusion@geneA@junctionSequence) + nchar(fusion@geneB@junctionSequence)) * 10
  ^~~~~~~~~~

tests/testthat/test_plotFusionReads.R:31:3: style: Variable and function names should be all lowercase.

​  imageHeight <- (fusion@splitReadsCount+fusion@spanningReadsCount) * 20
  ^~~~~~~~~~~

tests/testthat/test_plotFusionReads.R:31:41: style: Put spaces around all infix operators.

​  imageHeight <- (fusion@splitReadsCount+fusion@spanningReadsCount) * 20
                                       ~^~

tests/testthat/test_plotFusionReads.R:33:7: style: Variable and function names should be all lowercase.

​  png(pngFilename, width = imageWidth, height = imageHeight)
      ^~~~~~~~~~~

tests/testthat/test_plotFusionReads.R:33:28: style: Variable and function names should be all lowercase.

​  png(pngFilename, width = imageWidth, height = imageHeight)
                           ^~~~~~~~~~

tests/testthat/test_plotFusionReads.R:33:49: style: Variable and function names should be all lowercase.

​  png(pngFilename, width = imageWidth, height = imageHeight)
                                                ^~~~~~~~~~~

tests/testthat/test_plotFusionReads.R:39:26: style: Variable and function names should be all lowercase.

​  expect_equal(file.info(pngFilename)$size > 0, TRUE)
                         ^~~~~~~~~~~

tests/testthat/test_plotFusionTranscript.R:7:10: style: Put spaces around all infix operators.

​  package="chimeraviz")
        ~^~

tests/testthat/test_plotFusionTranscript.R:11:1: style: Variable and function names should be all lowercase.

​edbSqliteFile <- system.file(
^~~~~~~~~~~~~

tests/testthat/test_plotFusionTranscript.R:14:10: style: Put spaces around all infix operators.

​  package="chimeraviz")
        ~^~

tests/testthat/test_plotFusionTranscript.R:15:25: style: Variable and function names should be all lowercase.

​edb <- ensembldb::EnsDb(edbSqliteFile)
                        ^~~~~~~~~~~~~

tests/testthat/test_plotFusionTranscript.R:17:1: style: Variable and function names should be all lowercase.

​pngFilename <- tempfile(
^~~~~~~~~~~

tests/testthat/test_plotFusionTranscript.R:24:7: style: Variable and function names should be all lowercase.

​  png(pngFilename, width = 500, height = 500)
      ^~~~~~~~~~~

tests/testthat/test_plotFusionTranscript.R:34:26: style: Variable and function names should be all lowercase.

​  expect_equal(file.info(pngFilename)$size > 0, TRUE)
                         ^~~~~~~~~~~

tests/testthat/test_plotFusionTranscriptsGraph.R:7:10: style: Put spaces around all infix operators.

​  package="chimeraviz")
        ~^~

tests/testthat/test_plotFusionTranscriptsGraph.R:11:1: style: Variable and function names should be all lowercase.

​edbSqliteFile <- system.file(
^~~~~~~~~~~~~

tests/testthat/test_plotFusionTranscriptsGraph.R:14:10: style: Put spaces around all infix operators.

​  package="chimeraviz")
        ~^~

tests/testthat/test_plotFusionTranscriptsGraph.R:15:25: style: Variable and function names should be all lowercase.

​edb <- ensembldb::EnsDb(edbSqliteFile)
                        ^~~~~~~~~~~~~

tests/testthat/test_plotFusionTranscriptsGraph.R:17:1: style: Variable and function names should be all lowercase.

​pngFilename <- tempfile(
^~~~~~~~~~~

tests/testthat/test_plotFusionTranscriptsGraph.R:24:7: style: Variable and function names should be all lowercase.

​  png(pngFilename, width = 500, height = 500)
      ^~~~~~~~~~~

tests/testthat/test_plotFusionTranscriptsGraph.R:34:26: style: Variable and function names should be all lowercase.

​  expect_equal(file.info(pngFilename)$size > 0, TRUE)
                         ^~~~~~~~~~~

tests/testthat/test_plotFusionTranscriptWithProteinDomain.R:7:10: style: Put spaces around all infix operators.

​  package="chimeraviz")
        ~^~

tests/testthat/test_plotFusionTranscriptWithProteinDomain.R:11:1: style: Variable and function names should be all lowercase.

​geneAtranscript <- "ENST00000434290"
^~~~~~~~~~~~~~~

tests/testthat/test_plotFusionTranscriptWithProteinDomain.R:12:1: style: Variable and function names should be all lowercase.

​geneBtranscript <- "ENST00000370031"
^~~~~~~~~~~~~~~

tests/testthat/test_plotFusionTranscriptWithProteinDomain.R:14:1: style: Variable and function names should be all lowercase.

​edbSqliteFile <- system.file(
^~~~~~~~~~~~~

tests/testthat/test_plotFusionTranscriptWithProteinDomain.R:17:10: style: Put spaces around all infix operators.

​  package="chimeraviz")
        ~^~

tests/testthat/test_plotFusionTranscriptWithProteinDomain.R:18:25: style: Variable and function names should be all lowercase.

​edb <- ensembldb::EnsDb(edbSqliteFile)
                        ^~~~~~~~~~~~~

tests/testthat/test_plotFusionTranscriptWithProteinDomain.R:23:10: style: Put spaces around all infix operators.

​  package="chimeraviz")
        ~^~

tests/testthat/test_plotFusionTranscriptWithProteinDomain.R:28:10: style: Put spaces around all infix operators.

​  package="chimeraviz")
        ~^~

tests/testthat/test_plotFusionTranscriptWithProteinDomain.R:30:1: style: Variable and function names should be all lowercase.

​pngFilename <- tempfile(
^~~~~~~~~~~

tests/testthat/test_plotFusionTranscriptWithProteinDomain.R:37:7: style: Variable and function names should be all lowercase.

​  png(pngFilename, width = 500, height = 500)
      ^~~~~~~~~~~

tests/testthat/test_plotFusionTranscriptWithProteinDomain.R:45:25: style: Variable and function names should be all lowercase.

​      geneAtranscript = geneAtranscript,
                        ^~~~~~~~~~~~~~~

tests/testthat/test_plotFusionTranscriptWithProteinDomain.R:46:25: style: Variable and function names should be all lowercase.

​      geneBtranscript = geneBtranscript,
                        ^~~~~~~~~~~~~~~

tests/testthat/test_plotFusionTranscriptWithProteinDomain.R:48:1: style: lines should not be more than 80 characters.

​    "No protein domains are retained in the downstream gene, because the fusion is not in frame. But since plotDownstreamProteinDomainsIfFusionIsOutOfFrame = TRUE, we'll plot the protein domains in the downstream gene anyway..")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_plotFusionTranscriptWithProteinDomain.R:52:26: style: Variable and function names should be all lowercase.

​  expect_equal(file.info(pngFilename)$size > 0, TRUE)
                         ^~~~~~~~~~~

tests/testthat/test_plotTranscripts.R:7:10: style: Put spaces around all infix operators.

​  package="chimeraviz")
        ~^~

tests/testthat/test_plotTranscripts.R:11:1: style: Variable and function names should be all lowercase.

​edbSqliteFile <- system.file(
^~~~~~~~~~~~~

tests/testthat/test_plotTranscripts.R:14:10: style: Put spaces around all infix operators.

​  package="chimeraviz")
        ~^~

tests/testthat/test_plotTranscripts.R:15:25: style: Variable and function names should be all lowercase.

​edb <- ensembldb::EnsDb(edbSqliteFile)
                        ^~~~~~~~~~~~~

tests/testthat/test_plotTranscripts.R:17:1: style: Variable and function names should be all lowercase.

​pngFilename <- tempfile(
^~~~~~~~~~~

tests/testthat/test_plotTranscripts.R:24:7: style: Variable and function names should be all lowercase.

​  png(pngFilename, width = 500, height = 500)
      ^~~~~~~~~~~

tests/testthat/test_plotTranscripts.R:34:26: style: Variable and function names should be all lowercase.

​  expect_equal(file.info(pngFilename)$size > 0, TRUE)
                         ^~~~~~~~~~~

tests/testthat/test_scaleListToInterval.R:4:1: style: Variable and function names should be all lowercase.

​list123ScaledTo3 <- .scaleListToInterval(list123, min(list123), max(list123))
^~~~~~~~~~~~~~~~

tests/testthat/test_scaleListToInterval.R:4:21: style: Variable and function names should be all lowercase.

​list123ScaledTo3 <- .scaleListToInterval(list123, min(list123), max(list123))
                    ^~~~~~~~~~~~~~~~~~~~

tests/testthat/test_scaleListToInterval.R:5:1: style: Variable and function names should be all lowercase.

​list123ScaledTo10 <- .scaleListToInterval(list123, 1, 10)
^~~~~~~~~~~~~~~~~

tests/testthat/test_scaleListToInterval.R:5:22: style: Variable and function names should be all lowercase.

​list123ScaledTo10 <- .scaleListToInterval(list123, 1, 10)
                     ^~~~~~~~~~~~~~~~~~~~

tests/testthat/test_scaleListToInterval.R:8:16: style: Variable and function names should be all lowercase.

​  expect_equal(list123ScaledTo3, list123)
               ^~~~~~~~~~~~~~~~

tests/testthat/test_scaleListToInterval.R:9:20: style: Variable and function names should be all lowercase.

​  expect_equal(min(list123ScaledTo10), 1)
                   ^~~~~~~~~~~~~~~~~

tests/testthat/test_scaleListToInterval.R:10:20: style: Variable and function names should be all lowercase.

​  expect_equal(max(list123ScaledTo10), 10)
                   ^~~~~~~~~~~~~~~~~

tests/testthat/test_scaleListToInterval.R:12:16: style: Variable and function names should be all lowercase.

​  expect_error(.scaleListToInterval(c(1), 1, 10))
               ^~~~~~~~~~~~~~~~~~~~

tests/testthat/test_selectTranscript.R:7:10: style: Put spaces around all infix operators.

​  package="chimeraviz")
        ~^~

tests/testthat/test_selectTranscript.R:11:1: style: Variable and function names should be all lowercase.

​edbSqliteFile <- system.file(
^~~~~~~~~~~~~

tests/testthat/test_selectTranscript.R:14:10: style: Put spaces around all infix operators.

​  package="chimeraviz")
        ~^~

tests/testthat/test_selectTranscript.R:15:25: style: Variable and function names should be all lowercase.

​edb <- ensembldb::EnsDb(edbSqliteFile)
                        ^~~~~~~~~~~~~

tests/testthat/test_selectTranscript.R:20:10: style: Put spaces around all infix operators.

​  package="chimeraviz")
        ~^~

tests/testthat/test_selectTranscript.R:24:1: style: lines should not be more than 80 characters.

​testthat::test_that("selectTranscript returns expected results with whichTranscripts=\"exonBoundary\"", {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_selectTranscript.R:25:15: style: Use <-, not =, for assignment.

​  transcripts = selectTranscript(fusion@geneA, "exonBoundary")
              ^

tests/testthat/test_selectTranscript.R:29:1: style: lines should not be more than 80 characters.

​testthat::test_that("selectTranscript gives exonBoundary transcripts when we ask for withinExon transcripts, because there are no witinExon transcripts", {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_selectTranscript.R:30:1: style: lines should not be more than 80 characters.

​  testthat::expect_message(selectTranscript(fusion@geneA, "withinExon"), "..found transcripts of type exonBoundary")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_selectTranscript.R:33:1: style: lines should not be more than 80 characters.

​testthat::test_that("selectTranscript gives error with whichTranscripts=\"4242\" when there are no such transcripts", {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_selectTranscript.R:37:1: style: lines should not be more than 80 characters.

​testthat::test_that("selectTranscript returns the expected specific transcripts", {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_selectTranscript.R:38:1: style: lines should not be more than 80 characters.

​  transcripts <- selectTranscript(fusion@geneA, c("ENST00000373831", "ENST00000373832"))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_utilities.R:7:10: style: Put spaces around all infix operators.

​  package="chimeraviz")
        ~^~

tests/testthat/test_utilities.R:18:55: style: Put spaces around all infix operators.

​fastq1 <- system.file("extdata", "reads.1.fq", package="chimeraviz")
                                                     ~^~

tests/testthat/test_utilities.R:19:55: style: Put spaces around all infix operators.

​fastq2 <- system.file("extdata", "reads.2.fq", package="chimeraviz")
                                                     ~^~

tests/testthat/test_utilities.R:21:1: style: Variable and function names should be all lowercase.

​fastqFileOut1 <- tempfile(pattern = "fq1", tmpdir = tempdir())
^~~~~~~~~~~~~

tests/testthat/test_utilities.R:22:1: style: Variable and function names should be all lowercase.

​fastqFileOut2 <- tempfile(pattern = "fq2", tmpdir = tempdir())
^~~~~~~~~~~~~

tests/testthat/test_utilities.R:26:1: style: Variable and function names should be all lowercase.

​edbSqliteFile <- system.file(
^~~~~~~~~~~~~

tests/testthat/test_utilities.R:29:10: style: Put spaces around all infix operators.

​  package="chimeraviz")
        ~^~

tests/testthat/test_utilities.R:30:25: style: Variable and function names should be all lowercase.

​edb <- ensembldb::EnsDb(edbSqliteFile)
                        ^~~~~~~~~~~~~

tests/testthat/test_utilities.R:33:1: style: Variable and function names should be all lowercase.

​allTranscripts <- ensembldb::exonsBy(
^~~~~~~~~~~~~~

tests/testthat/test_utilities.R:55:23: style: Variable and function names should be all lowercase.

​                      fastqFileOut1,
                      ^~~~~~~~~~~~~

tests/testthat/test_utilities.R:56:23: style: Variable and function names should be all lowercase.

​                      fastqFileOut2)
                      ^~~~~~~~~~~~~

tests/testthat/test_utilities.R:61:3: style: Variable and function names should be all lowercase.

​  newFastqContent1 <- readr::read_lines(fastqFileOut1)
  ^~~~~~~~~~~~~~~~

tests/testthat/test_utilities.R:61:41: style: Variable and function names should be all lowercase.

​  newFastqContent1 <- readr::read_lines(fastqFileOut1)
                                        ^~~~~~~~~~~~~

tests/testthat/test_utilities.R:62:3: style: Variable and function names should be all lowercase.

​  newFastqContent2 <- readr::read_lines(fastqFileOut2)
  ^~~~~~~~~~~~~~~~

tests/testthat/test_utilities.R:62:41: style: Variable and function names should be all lowercase.

​  newFastqContent2 <- readr::read_lines(fastqFileOut2)
                                        ^~~~~~~~~~~~~

tests/testthat/test_utilities.R:66:23: style: Variable and function names should be all lowercase.

​  expect_equal(length(newFastqContent1), 6 * 4)
                      ^~~~~~~~~~~~~~~~

tests/testthat/test_utilities.R:67:23: style: Variable and function names should be all lowercase.

​  expect_equal(length(newFastqContent2), 6 * 4)
                      ^~~~~~~~~~~~~~~~

tests/testthat/test_utilities.R:74:40: style: Commas should always have a space after.

​  expect_error(fetchReadsFromFastq(c(1,2,3), "fq1", "fq2", "fq1", "fq2"))
                                       ^

tests/testthat/test_utilities.R:74:42: style: Commas should always have a space after.

​  expect_error(fetchReadsFromFastq(c(1,2,3), "fq1", "fq2", "fq1", "fq2"))
                                         ^

tests/testthat/test_utilities.R:78:36: style: Variable and function names should be all lowercase.

​                                   fastqFileOut1,
                                   ^~~~~~~~~~~~~

tests/testthat/test_utilities.R:79:36: style: Variable and function names should be all lowercase.

​                                   fastqFileOut2))
                                   ^~~~~~~~~~~~~

tests/testthat/test_utilities.R:86:38: style: Variable and function names should be all lowercase.

​                                     fastqFileOut1,
                                     ^~~~~~~~~~~~~

tests/testthat/test_utilities.R:87:38: style: Variable and function names should be all lowercase.

​                                     fastqFileOut2))
                                     ^~~~~~~~~~~~~

tests/testthat/test_utilities.R:92:3: style: Variable and function names should be all lowercase.

​  fastaFileOut <- tempfile(pattern = "fq1", tmpdir = tempdir())
  ^~~~~~~~~~~~

tests/testthat/test_utilities.R:94:32: style: Variable and function names should be all lowercase.

​  writeFusionReference(fusion, fastaFileOut)
                               ^~~~~~~~~~~~

tests/testthat/test_utilities.R:96:3: style: Variable and function names should be all lowercase.

​  fastaFileContent <- Biostrings::readDNAStringSet(fastaFileOut)
  ^~~~~~~~~~~~~~~~

tests/testthat/test_utilities.R:96:52: style: Variable and function names should be all lowercase.

​  fastaFileContent <- Biostrings::readDNAStringSet(fastaFileOut)
                                                   ^~~~~~~~~~~~

tests/testthat/test_utilities.R:100:3: style: Variable and function names should be all lowercase.

​  fusionSequence <- Biostrings::DNAStringSet(
  ^~~~~~~~~~~~~~

tests/testthat/test_utilities.R:103:9: style: Variable and function names should be all lowercase.

​  names(fusionSequence) <- "chrNA"
        ^~~~~~~~~~~~~~

tests/testthat/test_utilities.R:106:16: style: Variable and function names should be all lowercase.

​  expect_equal(fusionSequence, fastaFileContent)
               ^~~~~~~~~~~~~~

tests/testthat/test_utilities.R:106:32: style: Variable and function names should be all lowercase.

​  expect_equal(fusionSequence, fastaFileContent)
                               ^~~~~~~~~~~~~~~~

tests/testthat/test_utilities.R:110:60: style: Variable and function names should be all lowercase.

​  expect_error(writeFusionReference("not-a-fusion-object", fastaFileOut))
                                                           ^~~~~~~~~~~~

tests/testthat/test_utilities.R:124:12: style: Put spaces around all infix operators.

​    package="chimeraviz")
          ~^~

tests/testthat/test_utilities.R:144:23: style: Use <-, not =, for assignment.

​  fusion@geneA@strand = "*"
                      ^

tests/testthat/test_utilities.R:145:23: style: Use <-, not =, for assignment.

​  fusion@geneB@strand = "*"
                      ^

tests/testthat/test_utilities.R:152:1: style: lines should not be more than 80 characters.

​  expect_equal(decideTranscriptCategory(allTranscripts[[1]], fusion), "exonBoundary")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_utilities.R:152:41: style: Variable and function names should be all lowercase.

​  expect_equal(decideTranscriptCategory(allTranscripts[[1]], fusion), "exonBoundary")
                                        ^~~~~~~~~~~~~~

tests/testthat/test_utilities.R:153:1: style: lines should not be more than 80 characters.

​  expect_equal(decideTranscriptCategory(allTranscripts[[3]], fusion), "intergenic")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_utilities.R:153:41: style: Variable and function names should be all lowercase.

​  expect_equal(decideTranscriptCategory(allTranscripts[[3]], fusion), "intergenic")
                                        ^~~~~~~~~~~~~~

tests/testthat/test_utilities.R:158:23: style: Variable and function names should be all lowercase.

​  expect_equal(length(allTranscripts[[1]]), 9)
                      ^~~~~~~~~~~~~~

tests/testthat/test_utilities.R:160:47: style: Variable and function names should be all lowercase.

​  expect_equal(length(splitOnUtrAndAddFeature(allTranscripts[[1]])), 11)
                                              ^~~~~~~~~~~~~~

tests/testthat/test_utilities.R:163:23: style: Variable and function names should be all lowercase.

​  expect_equal(length(allTranscripts[[2]]), 8)
                      ^~~~~~~~~~~~~~

tests/testthat/test_utilities.R:165:47: style: Variable and function names should be all lowercase.

​  expect_equal(length(splitOnUtrAndAddFeature(allTranscripts[[2]])), 10)
                                              ^~~~~~~~~~~~~~

tests/testthat/test_utilities.R:168:1: style: lines should not be more than 80 characters.

​test_that("getEnsemblIds gets the correct Ensembl gene ids for a fusion object", {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_utilities.R:170:3: style: Variable and function names should be all lowercase.

​  correctEnsemblIdA <- fusion@geneA@ensemblId
  ^~~~~~~~~~~~~~~~~

tests/testthat/test_utilities.R:171:3: style: Variable and function names should be all lowercase.

​  correctEnsemblIdB <- fusion@geneB@ensemblId
  ^~~~~~~~~~~~~~~~~

tests/testthat/test_utilities.R:181:40: style: Variable and function names should be all lowercase.

​  expect_equal(fusion@geneA@ensemblId, correctEnsemblIdA)
                                       ^~~~~~~~~~~~~~~~~

tests/testthat/test_utilities.R:182:40: style: Variable and function names should be all lowercase.

​  expect_equal(fusion@geneB@ensemblId, correctEnsemblIdB)
                                       ^~~~~~~~~~~~~~~~~

tests/testthat/test_utilities.R:188:3: style: Variable and function names should be all lowercase.

​  nameA <- fusion@geneA@name
  ^~~~~

tests/testthat/test_utilities.R:189:3: style: Variable and function names should be all lowercase.

​  nameB <- fusion@geneB@name
  ^~~~~

tests/testthat/test_utilities.R:199:24: style: Variable and function names should be all lowercase.

​  fusion@geneA@name <- nameA
                       ^~~~~

tests/testthat/test_utilities.R:200:24: style: Variable and function names should be all lowercase.

​  fusion@geneB@name <- nameB
                       ^~~~~

tests/testthat/test_utilities.R:204:3: style: Variable and function names should be all lowercase.

​  dfFusion <- fusionToDataFrame(fusion)
  ^~~~~~~~

tests/testthat/test_utilities.R:205:13: style: Variable and function names should be all lowercase.

​  expect_is(dfFusion, "data.frame")
            ^~~~~~~~

tests/testthat/test_utilities.R:206:48: style: Variable and function names should be all lowercase.

​  expect_equal(fusion@geneA@name, as.character(dfFusion$geneA))
                                               ^~~~~~~~

tests/testthat/test_utilities.R:206:57: style: Variable and function names should be all lowercase.

​  expect_equal(fusion@geneA@name, as.character(dfFusion$geneA))
                                                        ^~~~~
stianlagstad commented 6 years ago

Not going to follow this styleguide for the release version as I can't modify existing method names. Will only do it for the development branch (https://github.com/stianlagstad/chimeraviz/pull/39).