2424import java .io .IOException ;
2525import java .util .ArrayList ;
2626import java .util .Arrays ;
27+ import java .util .Collection ;
2728import java .util .Collections ;
2829import java .util .HashSet ;
2930import java .util .List ;
@@ -71,7 +72,7 @@ static public void setInstance(CellHashingService instance)
7172
7273 abstract public boolean usesCiteSeq (SequenceAnalysisJobSupport support , List <SequenceOutputFile > inputFiles ) throws PipelineJobException ;
7374
74- abstract public List <ToolParameterDescriptor > getHashingCallingParams (boolean allowDemuxEm );
75+ abstract public List <ToolParameterDescriptor > getHashingCallingParams (boolean allowMethodsNeedingGex );
7576
7677 abstract public Set <String > getHtosForParentReadset (Integer parentReadsetId , File webserverJobDir , SequenceAnalysisJobSupport support , boolean throwIfNotFound ) throws PipelineJobException ;
7778
@@ -316,17 +317,25 @@ public enum CALLING_METHOD
316317 htodemux (false , false ),
317318 dropletutils (true , true ),
318319 gmm_demux (true , true ),
319- demuxem (true , true ),
320+ demuxem (true , true , true ),
321+ demuxmix (true , true , true ),
320322 bff_cluster (true , true ),
321323 bff_raw (true , false );
322324
323325 boolean isDefaultRun ;
324326 boolean isDefaultConsensus ;
327+ boolean requiresH5 ;
325328
326329 CALLING_METHOD (boolean isDefaultRun , boolean isDefaultConsensus )
330+ {
331+ this (isDefaultRun , isDefaultConsensus , false );
332+ }
333+
334+ CALLING_METHOD (boolean isDefaultRun , boolean isDefaultConsensus , boolean requiresH5 )
327335 {
328336 this .isDefaultRun = isDefaultRun ;
329337 this .isDefaultConsensus = isDefaultConsensus ;
338+ this .requiresH5 = requiresH5 ;
330339 }
331340
332341 public boolean isDefaultRun ()
@@ -339,6 +348,11 @@ public boolean isDefaultConsensus()
339348 return isDefaultConsensus ;
340349 }
341350
351+ public boolean isRequiresH5 ()
352+ {
353+ return requiresH5 ;
354+ }
355+
342356 private static List <CALLING_METHOD > getDefaultRunMethods ()
343357 {
344358 return Arrays .stream (values ()).filter (CALLING_METHOD ::isDefaultRun ).collect (Collectors .toList ());
@@ -358,6 +372,22 @@ public static List<String> getDefaultConsensusMethodNames()
358372 {
359373 return getDefaultConsensusMethods ().stream ().map (Enum ::name ).collect (Collectors .toList ());
360374 }
375+
376+ public static boolean requiresH5 (String methodNames )
377+ {
378+ methodNames = StringUtils .trimToNull (methodNames );
379+ if (methodNames == null )
380+ {
381+ return false ;
382+ }
383+
384+ return requiresH5 (Arrays .stream (methodNames .split (";" )).map (CALLING_METHOD ::valueOf ).collect (Collectors .toList ()));
385+ }
386+
387+ public static boolean requiresH5 (Collection <CALLING_METHOD > methods )
388+ {
389+ return methods .stream ().anyMatch (CALLING_METHOD ::isRequiresH5 );
390+ }
361391 }
362392
363393 public enum BARCODE_TYPE
0 commit comments