private void buildPicardCommand ( ) throws IOException , GeneralSecurityException , URISyntaxException { File picardJarPath = new File ( picardPath , "picard.jar" ) ; if ( ! picardJarPath . exists ( ) ) { throw new IOException ( "Picard tool not found at " + picardJarPath . getAbsolutePath ( ) ) ; } command . add ( "java" ) ; command . add ( picardJVMArgs ) ; command . add ( "-jar" ) ; command . add ( picardJarPath . getAbsolutePath ( ) ) ; command . add ( picardTool ) ; for ( String picardArg : picardArgs ) { if ( picardArg . startsWith ( INPUT_PREFIX ) ) { String inputPath = picardArg . substring ( INPUT_PREFIX . length ( ) ) ; inputs . add ( processInput ( inputPath ) ) ; } else { command . add ( picardArg ) ; } } for ( Input input : inputs ) { command . add ( "INPUT=" + input . pipeName ) ; } }
Adds relevant parts to the cmd line for Picard tool finds and extracts INPUT = arguments and processes them by creating appropriate data pumps .