Closed somakchowdhury closed 2 years ago
I've had exactly the same error, on MacOS Big Sur.
Sorry for the slow replies guys, and for the issue. @Kuanhao-Chao and I will take a look ASAP.
Hi @somakchowdhury and @JanEngelstaedter,
Sorry for the slow replies. I just tested with the example dataset with outputDir = "./report/"
, and it worked.
The error message you got shows that the './Chromatogram.pdf' is either not created or placed in the wrong path.
I could not reproduce your error so I am not sure what happened. I am running on MacOS Big Sur as well.
Could you help me test if you can generate the report in SangerRead & SangerContig levels? For example,
generateReport(ACHLO_contigs@contigList[[1]], includeSangerContig=TRUE, includeSangerRead=TRUE, outputDir = "./report/")
generateReport(ACHLO_contigs@contigList[[1]]@forwardReadList[[1]], includeSangerContig=TRUE, includeSangerRead=TRUE, outputDir = "./report/")
Let me know whether you still encounter the same error. And if it's okay, Could you send me your data so that I can test sangeranalyseR? Thanks!
Best, Kuan-Hao
Thanks Kuan-Hao! I've tried your example and got the same error. Everything else (processing files, shiny app, writing fasta files) works fine, so I don't think the data is the problem. Judging from the output, it looks like the Rmd file is knitted without any issues, and the chromatogram.pdf is produced and saved where it's supposed to be saved. However, I suspect that the md file is written in another folder outside of the project (perhaps within some package folder?), and that's why pandoc fails to produce the html file? I tried to find the SangerRead_Report_ab1.knit.md file on my hard drive but couldn't find it anywhere. Hope this helps finding the bug. It's a great package, thanks a lot for writing it!
When running
generateReport(ACHLO_contigs@contigList[[1]], includeSangerContig=TRUE, includeSangerRead=TRUE, outputDir = "./report/")
I again get the following error:
/usr/lib/rstudio/bin/pandoc/pandoc +RTS -K512m -RTS SangerRead_Report_ab1.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /home/bioithimedia/Documents/Sanger/report/Achl_ACHLO006-09/Achl_ACHLO006-09_1_F/SangerRead_Report_ab1.html --lua-filter /home/bioithimedia/R/x86_64-pc-linux-gnu-library/4.1/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /home/bioithimedia/R/x86_64-pc-linux-gnu-library/4.1/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --standalone --section-divs --table-of-contents --toc-depth 3 --variable toc_float=1 --variable toc_selectors=h1,h2,h3 --variable toc_collapsed=1 --variable toc_smooth_scroll=1 --variable toc_print=1 --template /home/bioithimedia/R/x86_64-pc-linux-gnu-library/4.1/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --include-in-header /tmp/RtmpHxMjw5/rmarkdown-str13a0252299b6.html --mathjax --variable 'mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'
File ./Chromatogram.pdf not found in resource path
Error: pandoc document conversion failed with error 99
When I run this one :
generateReport(ACHLO_contigs@contigList[[1]]@forwardReadList[[1]], includeSangerContig=TRUE, includeSangerRead=TRUE, outputDir = "./report/")
I still get the same error:
/usr/lib/rstudio/bin/pandoc/pandoc +RTS -K512m -RTS SangerRead_Report_ab1.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /home/bioithimedia/Documents/Sanger/report/Achl_ACHLO006-09_1_F/SangerRead_Report_ab1.html --lua-filter /home/bioithimedia/R/x86_64-pc-linux-gnu-library/4.1/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /home/bioithimedia/R/x86_64-pc-linux-gnu-library/4.1/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --variable bs3=TRUE --standalone --section-divs --table-of-contents --toc-depth 3 --variable toc_float=1 --variable toc_selectors=h1,h2,h3 --variable toc_collapsed=1 --variable toc_smooth_scroll=1 --variable toc_print=1 --template /home/bioithimedia/R/x86_64-pc-linux-gnu-library/4.1/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --variable theme=bootstrap --include-in-header /tmp/RtmpHxMjw5/rmarkdown-str13a058ae12ca.html --mathjax --variable 'mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'
File ./Chromatogram.pdf not found in resource path
Error: pandoc document conversion failed with error 99
Seems like there seems to be dependency problem with some of the components of the report in a way that they dont appear in the same directory or outside the report folder. Here is the folder structure created by both the commands
report/
|-- Achl_ACHLO006-09
| -- Achl_ACHLO006-09_1_F
| -- Chromatogram.pdf
-- Achl_ACHLO006-09_1_F
-- Chromatogram.pdf
I hope this is helpful to debug this. Agree with Jan that this is an invaluable tool and very useful.
Hi @JanEngelstaedter @somakchowdhury,
I think I've fixed the bug. Could you please help us test whether it works for you now? You can download the lastest sangeranalyseR version by running:
library(devtools)
## Install the release version
install_github("roblanf/sangeranalyseR", ref = "master")
library(sangeranalyseR)
Every 6 months Bioconductor requests developers to upgrade to the new R version, and every time there will be some packages that sangeranalyseR depends on change the exception handling and it causes some functions to crash. Thank you for your bug report!! If you have any problems, please let us know 👍🏼
Best, Kuan-Hao
@Kuanhao-Chao Thanks for the prompt response. After installing the latest version the report is generated as expected seems there is a need to keep an eye out for R updates I guess.
One more question I had was about the signal signalRatioCutoff
value. Is it possible to ask the program when constructing contig to ignore secondary peaks and only call the bases called in the primary peak?
Thanks again for solving this.
Cheers, Somak
Yes, problem solved for me as well - thanks for fixing this so swiftly! Cheers, Jan
Hi @somakchowdhury ,
signalRatioCutoff
controls the ratio of the height of a secondary peak to a primary peak. Secondary peaks higher than this ratio are annotated. Those below the ratio are excluded. The default value is 0.33.
So changing this value does not affect the result of primary sequence. It only changes the secondary sequence.
Best wishes, Kuan-Hao
Just adding here what I think might be an answer to this question (@Kuanhao-Chao can you tell me if I'm right?):
Is it possible to ask the program when constructing contig to ignore secondary peaks and only call the bases called in the primary peak?
If you set the signalRatioCutoff
to 1.1
, then presumably it's impossible to get a secondary peak that high, so secondary peaks will be ignored completely. What I'm unsure of is whether we force signalRatioCutoff
to be <=1.0. If that's the case, then it's possible that we could have two equal peaks.
Either way, perhaps we should add an option to ignoreSecondaryPeaks
, which would do this in a more intuitive way?
@Kuanhao-Chao, what do you think? If we go that route, I'll start a separate issue.
Hi @roblanf
Sorry for the late reply. I didn't get the notification and just saw the message!
In the current released sangeranalyseR parameter sanity check, signalRatioCutoff
must be between 0
and 1
, not equal ( signalRatioCutoff < 0 || signalRatioCutoff > 1
) because I assume the secondary peaks must be lower than the primary peaks. Should we allow the equal case (0
and 1
)?
Adding ignoreSecondaryPeaks
sounds like a good idea! If we are going to add this option, I also need to fix UI to handle the NULL case, and it may take some time to add this feature
Best, Kuan-Hao
I think it's probably good enough to just allow signalRatioCutoff
to equal 1. In this case, that is effectively the same as having a completely separate parameter for ignoreSecondaryPeaks
.
But it looks like your sanity check already allows this:
signalRatioCutoff < 0 || signalRatioCutoff > 1)
would only return an error if the parameter was larger than one. Can you confirm?
Oh yes! I interpreted it wrong yesterday! The current released version allows 0
and 1
cases for signalRatioCutoff
. Sorry to cause the confusion. 👍
I am running into the following error when I run the reproducible example.
What am I doing wrong? Could you help?
sangeranalyseR command used :
generateReport(ACHLO_contigs, includeSangerContig=TRUE, includeSangerRead=TRUE, outputDir = "./report/")
Error thrown:
File ./Chromatogram.pdf not found in resource path Error: pandoc document conversion failed with error 99
Session Info: