Added argument to disable RscriptExecutor #7900
Conversation
jamesemery
left a comment
There was a problem hiding this comment.
It looks like this is rebased off of one of your previous branches. We should fix that. I also think make the tests a little more agnostic to whatever settings were being tested in testVariantRecalibratorSampling.
| public void onTraversalStart() { | ||
| final Map<String, VCFHeader> vcfHeaders = Collections.singletonMap(getDrivingVariantsFeatureInput().getName(), getHeaderForVariants()); | ||
|
|
||
| final List<String> genotypeField = getHeaderForVariants().getGenotypeSamples(); |
There was a problem hiding this comment.
This is from the wrong PR. #7887. Can you rebase and remove the SelectVariants commit please?
| if(!rScriptExecutor.externalExecutableExists()) { | ||
| Utils.warnUser(logger, String.format( | ||
| if(!disableRScriptExecutor) { | ||
| throw new UserException("Rscript not found in environment path. Fix executor or run with disableRScriptExecutor argument to generate Rscript without running."); |
There was a problem hiding this comment.
If you are adding an argument "--" so its easy for the user to paste it into their command line.
There was a problem hiding this comment.
Also be sure that the argument is properly kebab-cased (--disable-rscriptexecutor) in the message.
|
|
||
| @Test(expectedExceptions = UserException.ValidationFailure.class) | ||
| public void testResortingFileWarning() throws IOException { | ||
| final String testFile = getToolTestDataDir() + "unsortedGenotypeFieldsTestFile.vcf"; |
| } | ||
|
|
||
| // Expected exception is a UserException but gets wrapped in a RuntimeException | ||
| @Test(expectedExceptions = RuntimeException.class) |
There was a problem hiding this comment.
this should fail now no? You changed that to a user exception?.
| // Expected exception is a UserException but gets wrapped in a RuntimeException | ||
| @Test(expectedExceptions = RuntimeException.class) | ||
| public void testVariantRecalibratorFailedRscriptOutput() throws IOException { | ||
| final String inputFile = getLargeVQSRTestDataDir() + "phase1.projectConsensus.chr20.1M-10M.raw.snps.vcf"; |
There was a problem hiding this comment.
The integration test spec and these arguments are a lot. I would recommend taking the String[] VQSRSNPParamsWithResources above and adding your rscript arguments to it and running that through the runCommandLineArguments() method. Furthermore i think this test is actually sketchy since it could be the case that R is properly installed... The second one is probably sufficient.
|
Github actions tests reported job failures from actions build 2497440564
|
a7829e8 to
5880730
Compare
Codecov Report
@@ Coverage Diff @@
## master #7900 +/- ##
===============================================
+ Coverage 86.933% 87.007% +0.074%
- Complexity 36950 36977 +27
===============================================
Files 2221 2221
Lines 173833 173849 +16
Branches 18778 18782 +4
===============================================
+ Hits 151118 151260 +142
+ Misses 16083 15956 -127
- Partials 6632 6633 +1
|
|
Github actions tests reported job failures from actions build 2503081068
|
jamesemery
left a comment
There was a problem hiding this comment.
Two very minor style comments and then you can merge.
| Utils.warnUser(logger, String.format( | ||
| if(!disableRScriptExecutor) { | ||
| throw new UserException("Rscript not found in environment path. Fix executor or run with --dont-run-rscript argument to generate Rscript without running."); | ||
| /* Utils.warnUser(logger, String.format( |
|
|
||
| @Advanced | ||
| @Argument(fullName="dont-run-rscript", | ||
| doc="Disable the RScriptExecutor to allow RScript to be generated but not run", |
|
Fixes #7697. Added argument option to generate and output rscript file without running it. |
Fixes #7697. Added argument to allow RScriptExecutor to disable but still output Rscript file.