private int addRandomSampleQCRoutineToDAX(Graph<CondorJob, CondorJobEdge> graph, int count, HTSFSample htsfSample, File fastqFile, CondorJob trimCountAdapterJob, File trimmedFastq, String outputPath) throws IOException { String sequenceDatabaseList = getPipelineBeanService().getAttributes().get("sequenceDatabaseList"); getWorkflowPlan(), htsfSample); randomSampleFastqJob.addArgument(RandomSampleFastqCLI.FASTQ, trimmedFastq.getAbsolutePath()); File randomSampleFastqOutFile = new File(outputPath, key + ".fastq"); CondorJob bwaAlignJob = PipelineJobFactory.createJob(++count, BWAAlignCLI.class, getWorkflowPlan(), htsfSample); bwaAlignJob.setNumberOfProcessors(8); getWorkflowPlan(), htsfSample); bwaSAMSingleEndJob.addArgument(BWASAMSingleEndCLI.FASTADB, sequenceFastaDB); bwaSAMSingleEndJob.addArgument(BWASAMSingleEndCLI.FASTQ, randomSampleFastqOutFile.getAbsolutePath()); getWorkflowPlan(), htsfSample); genomeSampleQCJob.addArgument(GenomeSampleQCCLI.KEY, key); genomeSampleQCJob.addArgument(GenomeSampleQCCLI.SAMFILE, bwaSAMSingleEndOutFile.getAbsolutePath()); getWorkflowPlan(), htsfSample); rnaSampleQCJob.addArgument(RNASampleQCCLI.KEY, key); rnaSampleQCJob.addArgument(RNASampleQCCLI.FASTQ, randomSampleFastqOutFile.getAbsolutePath());
if (getWorkflowPlan().getSequencerRun() == null && getWorkflowPlan().getHTSFSamples() == null) { logger.error("Don't have either sequencerRun and htsfSample"); throw new PipelineException("Don't have either sequencerRun and htsfSample"); if (getWorkflowPlan().getSequencerRun() != null) { logger.info("sequencerRun: {}", getWorkflowPlan().getSequencerRun().toString()); try { htsfSampleSet.addAll(getPipelineBeanService().getMaPSeqDAOBean().getHTSFSampleDAO() .findBySequencerRunId(getWorkflowPlan().getSequencerRun().getId())); } catch (MaPSeqDAOException e) { e.printStackTrace(); if (getWorkflowPlan().getHTSFSamples() != null) { htsfSampleSet.addAll(getWorkflowPlan().getHTSFSamples()); String fastaDatabase = getPipelineBeanService().getAttributes().get("fastaDatabase"); String quantificationDatabaseKey = getPipelineBeanService().getAttributes().get("quantificationDatabaseKey"); String primerSequence1 = getPipelineBeanService().getAttributes().get("primerSequence1"); String primerSequence2 = getPipelineBeanService().getAttributes().get("primerSequence2"); File outputDirectory = createOutputDirectory(sequencerRun.getName(), htsfSample, getName()); getWorkflowPlan(), htsfSample); fastxQualityStatsJob.addArgument(FastxQualityStatsCLI.INFILE, fastqFile.getAbsolutePath()); File fastxQualityStatsOutFile = new File(outputDirectory, fastqRootName + ".stat.txt"); getWorkflowPlan(), htsfSample); perBaseStatJob.addArgument(PerBaseStatCLI.INFILE, fastxQualityStatsOutFile.getAbsolutePath()); File perBaseStatOutFile = new File(outputDirectory, fastqRootName + ".stat.summary.txt");