@@ -77,20 +77,18 @@ public static class CellHashingParameters
7777 {
7878 public BARCODE_TYPE type ;
7979
80- private File htoOrCiteseqBarcodesFile ;
81- public Set <String > allowableHtoOrCiteseqBarcodes ;
80+ private File htoBarcodesFile ;
81+ public Set <String > allowableHtoBarcodes ;
8282
8383 public File cellBarcodeWhitelistFile ;
8484
8585 public boolean createOutputFiles = true ;
8686 public @ Nullable String outputCategory ;
8787
88- public Readset htoOrCiteseqReadset ;
88+ public Readset htoReadset ;
8989 public Readset parentReadset ;
9090
9191 public @ Nullable Integer genomeId ;
92- public Integer editDistance = 2 ;
93- public boolean scanEditDistances = false ;
9492 public boolean skipNormalizationQc = false ;
9593 public Integer minCountPerCell = 5 ;
9694 public List <CALLING_METHOD > methods = CALLING_METHOD .getDefaultMethods ();
@@ -102,17 +100,15 @@ private CellHashingParameters()
102100
103101 }
104102
105- public static CellHashingService .CellHashingParameters createFromStep (SequenceOutputHandler .JobContext ctx , SingleCellStep step , CellHashingService .BARCODE_TYPE type , Readset htoOrCiteseqReadset , @ Nullable Readset parentReadset , @ Nullable File htoOrCiteseqBarcodesFile ) throws PipelineJobException
103+ public static CellHashingService .CellHashingParameters createFromStep (SequenceOutputHandler .JobContext ctx , SingleCellStep step , CellHashingService .BARCODE_TYPE type , Readset htoReadset , @ Nullable Readset parentReadset ) throws PipelineJobException
106104 {
107105 CellHashingService .CellHashingParameters ret = new CellHashingService .CellHashingParameters ();
108106 ret .type = type ;
109- ret .scanEditDistances = step .getProvider ().getParameterByName ("scanEditDistances" ).extractValue (ctx .getJob (), step .getProvider (), step .getStepIdx (), Boolean .class , false );
110107 ret .skipNormalizationQc = step .getProvider ().getParameterByName ("skipNormalizationQc" ).extractValue (ctx .getJob (), step .getProvider (), step .getStepIdx (), Boolean .class , false );
111- ret .editDistance = step .getProvider ().getParameterByName ("editDistance" ).extractValue (ctx .getJob (), step .getProvider (), step .getStepIdx (), Integer .class , 2 );
112108 ret .minCountPerCell = step .getProvider ().getParameterByName ("minCountPerCell" ).extractValue (ctx .getJob (), step .getProvider (), step .getStepIdx (), Integer .class , 3 );
113- ret .htoOrCiteseqReadset = htoOrCiteseqReadset ;
109+ ret .htoReadset = htoReadset ;
114110 ret .parentReadset = parentReadset ;
115- ret .htoOrCiteseqBarcodesFile = htoOrCiteseqBarcodesFile == null ? new File (ctx .getSourceDirectory (), type .getAllBarcodeFileName ()) : htoOrCiteseqBarcodesFile ;
111+ ret .htoBarcodesFile = new File (ctx .getSourceDirectory (), type .getAllBarcodeFileName ());
116112
117113 if (type == BARCODE_TYPE .hashing )
118114 {
@@ -131,17 +127,15 @@ public static CellHashingService.CellHashingParameters createFromStep(SequenceOu
131127 return ret ;
132128 }
133129
134- public static CellHashingParameters createFromJson (BARCODE_TYPE type , File webserverDir , JSONObject params , Readset htoOrCiteseqReadset , @ Nullable Readset parentReadset , @ Nullable File htoOrCiteseqBarcodesFile ) throws PipelineJobException
130+ public static CellHashingParameters createFromJson (BARCODE_TYPE type , File webserverDir , JSONObject params , Readset htoReadset , @ Nullable Readset parentReadset ) throws PipelineJobException
135131 {
136132 CellHashingParameters ret = new CellHashingParameters ();
137133 ret .type = type ;
138- ret .scanEditDistances = params .optBoolean ("scanEditDistances" , false );
139134 ret .skipNormalizationQc = params .optBoolean ("skipNormalizationQc" , false );
140- ret .editDistance = params .optInt ("editDistance" , 2 );
141135 ret .minCountPerCell = params .optInt ("minCountPerCell" , 3 );
142- ret .htoOrCiteseqReadset = htoOrCiteseqReadset ;
136+ ret .htoReadset = htoReadset ;
143137 ret .parentReadset = parentReadset ;
144- ret .htoOrCiteseqBarcodesFile = htoOrCiteseqBarcodesFile == null ? new File (webserverDir , type .getAllBarcodeFileName ()) : htoOrCiteseqBarcodesFile ;
138+ ret .htoBarcodesFile = new File (webserverDir , type .getAllBarcodeFileName ());
145139 ret .methods = extractMethods (params .optString ("methods" ));
146140
147141 if (type == BARCODE_TYPE .hashing && ret .methods .isEmpty ())
@@ -185,12 +179,12 @@ public static CellHashingParameters createFromJson(BARCODE_TYPE type, File webse
185179
186180 public int getEffectiveReadsetId ()
187181 {
188- return parentReadset != null ? parentReadset .getReadsetId () : htoOrCiteseqReadset .getReadsetId ();
182+ return parentReadset != null ? parentReadset .getReadsetId () : htoReadset .getReadsetId ();
189183 }
190184
191- public File getHtoOrCiteSeqBarcodeFile ()
185+ public File getHtoBarcodeFile ()
192186 {
193- return htoOrCiteseqBarcodesFile ;
187+ return htoBarcodesFile ;
194188 }
195189
196190 public String getReportTitle ()
@@ -208,9 +202,9 @@ else if (parentReadset != null)
208202 {
209203 return FileUtil .makeLegalName (parentReadset .getName ());
210204 }
211- else if (htoOrCiteseqReadset != null )
205+ else if (htoReadset != null )
212206 {
213- return FileUtil .makeLegalName (htoOrCiteseqReadset .getName ());
207+ return FileUtil .makeLegalName (htoReadset .getName ());
214208 }
215209
216210 throw new IllegalStateException ("Neither basename, parent readset, nor hashing/citeseq readset provided" );
@@ -223,35 +217,35 @@ public void validate()
223217
224218 public void validate (boolean allowMissingHtoReadset )
225219 {
226- if (!allowMissingHtoReadset && htoOrCiteseqReadset == null )
220+ if (!allowMissingHtoReadset && htoReadset == null )
227221 {
228- throw new IllegalStateException ("Missing Hashing/Cite-seq readset" );
222+ throw new IllegalStateException ("Missing Hashing readset" );
229223 }
230224
231225 if (createOutputFiles && outputCategory == null )
232226 {
233227 throw new IllegalStateException ("Missing output category" );
234228 }
235229
236- if (htoOrCiteseqBarcodesFile == null )
230+ if (htoBarcodesFile == null )
237231 {
238- throw new IllegalStateException ("Missing all HTO/CITE-seq barcodes file" );
232+ throw new IllegalStateException ("Missing all HTO barcodes file" );
239233 }
240234 }
241235
242236 public Set <String > getAllowableBarcodeNames () throws PipelineJobException
243237 {
244- if (allowableHtoOrCiteseqBarcodes != null )
238+ if (allowableHtoBarcodes != null )
245239 {
246- return Collections .unmodifiableSet (allowableHtoOrCiteseqBarcodes );
240+ return Collections .unmodifiableSet (allowableHtoBarcodes );
247241 }
248- if (htoOrCiteseqBarcodesFile == null )
242+ if (htoBarcodesFile == null )
249243 {
250244 throw new IllegalArgumentException ("Barcode file was null" );
251245 }
252246
253247 Set <String > allowableBarcodes = new HashSet <>();
254- try (CSVReader reader = new CSVReader (Readers .getReader (htoOrCiteseqBarcodesFile ), '\t' ))
248+ try (CSVReader reader = new CSVReader (Readers .getReader (htoBarcodesFile ), '\t' ))
255249 {
256250 String [] line ;
257251 while ((line = reader .readNext ()) != null )
0 commit comments