@@ -120,38 +120,38 @@ public void processFilesOnWebserver(PipelineJob job, SequenceAnalysisJobSupport
120120 }
121121
122122 @ Override
123- public void complete (PipelineJob job , List <SequenceOutputFile > inputFiles , List <SequenceOutputFile > outputsCreated , SequenceAnalysisJobSupport support ) throws PipelineJobException
123+ public void complete (JobContext ctx , List <SequenceOutputFile > inputFiles , List <SequenceOutputFile > outputsCreated ) throws PipelineJobException
124124 {
125125 for (SequenceOutputFile so : outputsCreated )
126126 {
127127 if (CATEGORY .equals (so .getCategory ()))
128128 {
129- CellHashingService .get ().processMetrics (so , job , true );
129+ CellHashingService .get ().processMetrics (so , ctx . getJob () , true );
130130 }
131131 }
132132
133- if (StringUtils .trimToNull (job .getParameters ().get (TARGET_ASSAY )) == null )
133+ if (StringUtils .trimToNull (ctx . getJob () .getParameters ().get (TARGET_ASSAY )) == null )
134134 {
135- job .getLogger ().info ("No assay selected, will not import" );
135+ ctx . getJob () .getLogger ().info ("No assay selected, will not import" );
136136 }
137137 else
138138 {
139- Integer assayId = ConvertHelper .convert (job .getParameters ().get (TARGET_ASSAY ), Integer .class );
139+ Integer assayId = ConvertHelper .convert (ctx . getJob () .getParameters ().get (TARGET_ASSAY ), Integer .class );
140140 if (assayId == null )
141141 {
142- throw new PipelineJobException ("Invalid assay Id, cannot import: " + job .getParameters ().get (TARGET_ASSAY ));
142+ throw new PipelineJobException ("Invalid assay Id, cannot import: " + ctx . getJob () .getParameters ().get (TARGET_ASSAY ));
143143 }
144144
145145 boolean deleteExistingData = false ;
146- if (job .getParameters ().get (DELETE_EXISTING_ASSAY_DATA ) != null )
146+ if (ctx . getJob () .getParameters ().get (DELETE_EXISTING_ASSAY_DATA ) != null )
147147 {
148- deleteExistingData = ConvertHelper .convert (job .getParameters ().get (DELETE_EXISTING_ASSAY_DATA ), Boolean .class );
148+ deleteExistingData = ConvertHelper .convert (ctx . getJob () .getParameters ().get (DELETE_EXISTING_ASSAY_DATA ), Boolean .class );
149149 }
150150
151151 for (SequenceOutputFile so : inputFiles )
152152 {
153- AnalysisModel model = support .getCachedAnalysis (so .getAnalysis_id ());
154- new CellRangerVDJUtils (job . getLogger ()).importAssayData (job , model , so .getFile (), job .getLogFile ().getParentFile (), assayId , null , deleteExistingData );
153+ AnalysisModel model = ctx . getSequenceSupport () .getCachedAnalysis (so .getAnalysis_id ());
154+ new CellRangerVDJUtils (ctx . getJob (). getLogger ()).importAssayData (ctx . getJob () , model , so .getFile (), ctx . getJob () .getLogFile ().getParentFile (), assayId , null , deleteExistingData );
155155 }
156156 }
157157 }
0 commit comments