Bioconductor / ShortRead

8 stars 6 forks source link

Error in example: invalid 'nrow' value (too large or NA) #13

Open barracuda156 opened 1 year ago

barracuda156 commented 1 year ago

This is Bioconductor ShortRead 1.56.1:

R version 4.2.3 (2023-03-15) -- "Shortstop Beagle"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: powerpc-apple-darwin10.8.0 (32-bit)

. . .

> ### Name: Utilites
> ### Title: Utilities for common, simple operations
> ### Aliases: polyn
> ### Keywords: manip
> 
> ### ** Examples
> 
> polyn(c("A", "N"), 35)
                                    A                                     N 
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN" 
> 
> 
> 
> cleanEx()
> nameEx("qa")
> ### * qa
> 
> flush(stderr()); flush(stdout())
> 
> ### Name: qa
> ### Title: Perform quality assessment on short reads
> ### Aliases: qa qa,character-method qa,list-method
> ### Keywords: manip
> 
> ### ** Examples
> 
> dirPath <- system.file(package="ShortRead", "extdata", "E-MTAB-1147")
> ## sample 1M reads / file
> qa <- qa(dirPath, "fastq.gz", BPPARAM=SerialParam())
> if (interactive())
+     browseURL(report(qa))
> 
> showMethods("qa", where=getNamespace("ShortRead"))
Function: qa (package ShortRead)
dirPath="ShortReadQ"
dirPath="SolexaPath"
dirPath="character"
dirPath="list"

> 
> 
> 
> cleanEx()
> nameEx("qa2")
> ### * qa2
> 
> flush(stderr()); flush(stdout())
> 
> ### Name: qa2
> ### Title: (Updated) quality assessment reports on short reads
> ### Aliases: QAFastqSource QACollate QA QAFlagged QAFiltered
> ###   QAAdapterContamination QAData QAFrequentSequence QANucleotideByCycle
> ###   QANucleotideUse QAQualityByCycle QAQualityUse QAReadQuality
> ###   QASequenceUse QACollate,QAFastqSource-method QACollate,missing-method
> ###   qa2 qa2,FastqSampler-method qa2,QAAdapterContamination-method
> ###   qa2,QACollate-method qa2,QAFastqSource-method
> ###   qa2,QAFrequentSequence-method qa2,QANucleotideByCycle-method
> ###   qa2,QANucleotideUse-method qa2,QAQualityByCycle-method
> ###   qa2,QAQualityUse-method qa2,QAReadQuality-method
> ###   qa2,QASequenceUse-method flag flag,.QA2-method
> ###   flag,QAFrequentSequence-method flag,QAReadQuality-method
> ###   flag,QASource-method report,QA-method
> ###   report,QAAdapterContamination-method report,QAFiltered-method
> ###   report,QAFlagged-method report,QAFrequentSequence-method
> ###   report,QANucleotideByCycle-method report,QANucleotideUse-method
> ###   report,QAQualityByCycle-method report,QAQualityUse-method
> ###   report,QAReadQuality-method report,QASequenceUse-method
> ###   report,QASource-method rbind,QASummary-method
> ###   show,QAAdapterContamination-method show,QACollate-method
> ###   show,QAFastqSource-method show,QAFrequentSequence-method
> ###   show,QAReadQuality-method show,QASummary-method
> ### Keywords: manip
> 
> ### ** Examples
> 
> dirPath <- system.file(package="ShortRead", "extdata", "E-MTAB-1147")
> fls <- dir(dirPath, "fastq.gz", full=TRUE)
> 
> coll <- QACollate(QAFastqSource(fls), QAReadQuality(),
+     QAAdapterContamination(), QANucleotideUse(),
+     QAQualityUse(), QASequenceUse(),
+     QAFrequentSequence(n=10), QANucleotideByCycle(),
+     QAQualityByCycle())
> x <- qa2(coll, BPPARAM=SerialParam(), verbose=TRUE)
qa2,QACollate-method
qa2,QACollate1-method
qa2,QAFastqSource-method
qa2,FastqSampler-method
qa2,QAReadQuality-method
qa2,QAAdapterContamination-method
qa2,QANucleotideUse-method
qa2,QAQualityUse-method
qa2,QASequenceUse-method
qa2,QAFrequentSequence-method
qa2,QANucleotideByCycle-method
qa2,QAQualityByCycle-method
qa2,QACollate1-method
qa2,QAFastqSource-method
qa2,FastqSampler-method
qa2,QAReadQuality-method
qa2,QAAdapterContamination-method
qa2,QANucleotideUse-method
qa2,QAQualityUse-method
qa2,QASequenceUse-method
qa2,QAFrequentSequence-method
qa2,QANucleotideByCycle-method
qa2,QAQualityByCycle-method
flag,QASource-method
flag,QAReadQuality-method
flag,ANY-method
flag,ANY-method
flag,ANY-method
flag,ANY-method
flag,ANY-method
flag,ANY-method
> 
> res <- report(x)
Error in matrix(0, rows.per.page, cols.per.page) : 
  invalid 'nrow' value (too large or NA)
Calls: report ... .html_img -> print -> print.trellis -> printFunction -> matrix
Execution halted

Tests pass fine, only one example fails. ShortRead_Ex_out.txt

barracuda156 commented 1 year ago

There are some warnings also during the check:

* checking R code for possible problems ... NOTE
.plotCycleBaseCall: no visible binding for global variable ‘Base’
flag,QAReadQuality: no visible binding for global variable ‘Score’
flag,QAReadQuality: no visible binding for global variable ‘Id’
flag,QAReadQuality: no visible binding for global variable ‘Density’
report,QAFrequentSequence: no visible binding for global variable
  ‘TopCount’
report,QAFrequentSequence: no visible binding for global variable ‘Id’
report,QANucleotideByCycle: no visible binding for global variable
  ‘Base’
report,QANucleotideUse: no visible binding for global variable
  ‘Nucleotide’
report,QAQualityUse: no visible binding for global variable ‘Count’
report,QAQualityUse: no visible binding for global variable ‘Id’
report,QAQualityUse: no visible binding for global variable ‘Quality’
report,QAReadQuality: no visible binding for global variable ‘Id’
report,QASequenceUse: no visible binding for global variable
  ‘Occurrences’
report,QASequenceUse: no visible binding for global variable ‘Id’
report,QASequenceUse: no visible binding for global variable ‘Reads’
Undefined global functions or variables:
  Base Count Density Id Nucleotide Occurrences Quality Reads Score
  TopCount
mtmorgan commented 1 year ago

but it doesn't fail on the build system? http://bioconductor.org/checkResults/release/bioc-LATEST/ShortRead/nebbiolo2-checksrc.html ?

Those are not warnings but NOTEs.

barracuda156 commented 1 year ago

but it doesn't fail on the build system? http://bioconductor.org/checkResults/release/bioc-LATEST/ShortRead/nebbiolo2-checksrc.html ?

Maybe you could suggest a reason for the observed error?

mtmorgan commented 1 year ago

I guess it's the unusual platform. Can you try

library(ShortRead); example('qa2')

If that reproduces the error then restart R and

library(ShortRead)
options(error = recover)
example('qa2')
## error occurs, so ask 'where'
Browser[2]> where

Alternatively I think you could

R -e "library(ShortRead); options(error = function() print(sys.calls()))); example('qa2')"