@@ -443,7 +443,7 @@ else if (line.startsWith("Percentage unmapped"))
443443 if (type .doGenerateCalls ())
444444 {
445445 ctx .getJob ().setStatus (PipelineJob .TaskStatus .running , "Generating HTO calls for edit distance: " + editDistance );
446- File htoCalls = generateFinalCalls (outputMatrix .getParentFile (), ctx .getOutputDir (), outputBasename , ctx .getLogger (), null , true , minCountPerCell , ctx .getSourceDirectory ());
446+ File htoCalls = generateFinalCalls (outputMatrix .getParentFile (), ctx .getOutputDir (), outputBasename , ctx .getLogger (), null , true , minCountPerCell , ctx .getSourceDirectory (), true , true );
447447 File html = new File (htoCalls .getParentFile (), outputBasename + ".html" );
448448
449449 if (!html .exists ())
@@ -664,7 +664,7 @@ private File ensureLocalCopy(File input, File outputDir, Logger log, Set<File> t
664664 return input ;
665665 }
666666
667- public File generateFinalCalls (File citeSeqCountOutDir , File outputDir , String basename , Logger log , @ Nullable File cellBarcodeWhitelist , boolean doHtoFiltering , Integer minCountPerCell , File localPipelineDir ) throws PipelineJobException
667+ private File generateFinalCalls (File citeSeqCountOutDir , File outputDir , String basename , Logger log , @ Nullable File cellBarcodeWhitelist , boolean doHtoFiltering , Integer minCountPerCell , File localPipelineDir , boolean useSeurat , boolean useMultiSeq ) throws PipelineJobException
668668 {
669669 log .debug ("generating final calls from folder: " + citeSeqCountOutDir .getPath ());
670670
@@ -694,6 +694,9 @@ public File generateFinalCalls(File citeSeqCountOutDir, File outputDir, String b
694694 File rawCallsFile = new File (outputDir , basename + ".raw.txt" );
695695 File metricsFile = getMetricsFile (callsFile );
696696 List <String > args = new ArrayList <>(Arrays .asList ("/bin/bash" , scriptWrapper , citeSeqCountOutDir .getName (), htmlFile .getName (), callsFile .getName (), rawCallsFile .getName (), (doHtoFiltering ? "T" : "F" ), (minCountPerCell == null ? "0" : minCountPerCell .toString ()), metricsFile .getName ()));
697+ args .add (useSeurat ? "TRUE" : "FALSE" );
698+ args .add (useMultiSeq ? "TRUE" : "FALSE" );
699+
697700 if (cellBarcodeWhitelist != null )
698701 {
699702 args .add (cellBarcodeWhitelist .getName ());
@@ -876,7 +879,7 @@ else if (htoReadset.getReadData().size() != 1)
876879 return ret ;
877880 }
878881
879- public File runCiteSeqCount (PipelineStepOutput output , String category , Readset htoReadset , File htoList , File cellBarcodeList , File outputDir , String basename , Logger log , List <String > extraArgs , boolean doHtoFiltering , @ Nullable Integer minCountPerCell , File localPipelineDir , @ Nullable Integer editDistance , boolean scanEditDistances , Readset parentReadset , @ Nullable Integer genomeId , BARCODE_TYPE type , boolean createOutputFiles ) throws PipelineJobException
882+ public File runCiteSeqCount (PipelineStepOutput output , String category , Readset htoReadset , File htoList , File cellBarcodeList , File outputDir , String basename , Logger log , List <String > extraArgs , boolean doHtoFiltering , @ Nullable Integer minCountPerCell , File localPipelineDir , @ Nullable Integer editDistance , boolean scanEditDistances , Readset parentReadset , @ Nullable Integer genomeId , BARCODE_TYPE type , boolean createOutputFiles , boolean useSeurat , boolean useMultiSeq ) throws PipelineJobException
880883 {
881884 HtoMergeResult htoFastqs = possiblyMergeHtoFastqs (htoReadset , outputDir , log );
882885 if (!htoFastqs .intermediateFiles .isEmpty ())
@@ -963,7 +966,7 @@ public File runCiteSeqCount(PipelineStepOutput output, String category, Readset
963966
964967 File citeSeqCountOutDir = new File (outputDir , basename + ".citeSeqCounts." + ed + "." + type .name ());
965968 String outputBasename = basename + "." + ed + "." + type .name ();
966- Map <String , Object > callMap = executeCiteSeqCountWithJobCtx (outputDir , outputBasename , citeSeqCountOutDir , htoFastqs .files .getLeft (), htoFastqs .files .getRight (), toolArgs , ed , log , cellBarcodeList , doHtoFiltering , minCountPerCell , localPipelineDir , unknownBarcodeFile , type );
969+ Map <String , Object > callMap = executeCiteSeqCountWithJobCtx (outputDir , outputBasename , citeSeqCountOutDir , htoFastqs .files .getLeft (), htoFastqs .files .getRight (), toolArgs , ed , log , cellBarcodeList , doHtoFiltering , minCountPerCell , localPipelineDir , unknownBarcodeFile , type , useSeurat , useMultiSeq );
967970 results .put (ed , callMap );
968971
969972 if (type .doGenerateCalls ())
@@ -1064,7 +1067,7 @@ public File runCiteSeqCount(PipelineStepOutput output, String category, Readset
10641067 }
10651068 }
10661069
1067- private Map <String , Object > executeCiteSeqCountWithJobCtx (File outputDir , String basename , File citeSeqCountOutDir , File fastq1 , File fastq2 , List <String > baseArgs , Integer ed , Logger log , File cellBarcodeList , boolean doHtoFiltering , Integer minCountPerCell , File localPipelineDir , File unknownBarcodeFile , BARCODE_TYPE type ) throws PipelineJobException
1070+ private Map <String , Object > executeCiteSeqCountWithJobCtx (File outputDir , String basename , File citeSeqCountOutDir , File fastq1 , File fastq2 , List <String > baseArgs , Integer ed , Logger log , File cellBarcodeList , boolean doHtoFiltering , Integer minCountPerCell , File localPipelineDir , File unknownBarcodeFile , BARCODE_TYPE type , boolean useSeurat , boolean useMultiSeq ) throws PipelineJobException
10681071 {
10691072 CellHashingHandler .CiteSeqCountWrapper wrapper = new CellHashingHandler .CiteSeqCountWrapper (log );
10701073 File doneFile = new File (citeSeqCountOutDir , "citeSeqCount." + type .name () + "." + ed + ".done" );
@@ -1131,7 +1134,7 @@ else if (line.startsWith("Percentage unmapped"))
11311134
11321135 if (type .doGenerateCalls ())
11331136 {
1134- File htoCalls = generateFinalCalls (outputMatrix .getParentFile (), outputDir , basename , log , cellBarcodeList , doHtoFiltering , minCountPerCell , localPipelineDir );
1137+ File htoCalls = generateFinalCalls (outputMatrix .getParentFile (), outputDir , basename , log , cellBarcodeList , doHtoFiltering , minCountPerCell , localPipelineDir , useSeurat , useMultiSeq );
11351138 if (!htoCalls .exists ())
11361139 {
11371140 throw new PipelineJobException ("missing expected file: " + htoCalls .getPath ());
0 commit comments