@@ -174,7 +174,7 @@ private void importReadsets() throws PipelineJobException
174174 getJob ().getLogger ().info ("Starting readset " + r .getName ());
175175
176176 boolean readsetExists = r .getReadsetId () != null && r .getReadsetId () > 0 ;
177- SequenceReadsetImpl existingReadset = ((SequenceReadsetImpl )SequenceAnalysisService .get ().getReadset (r .getReadsetId (), getJob ().getUser ()));
177+ SequenceReadsetImpl existingReadset = readsetExists ? ((SequenceReadsetImpl )SequenceAnalysisService .get ().getReadset (r .getReadsetId (), getJob ().getUser ())) : null ;
178178 List <ReadDataImpl > preexistingReadData = readsetExists ? existingReadset .getReadDataImpl () : Collections .emptyList ();
179179 boolean readsetExistsWithData = !preexistingReadData .isEmpty ();
180180 if (readsetExistsWithData )
@@ -436,10 +436,13 @@ private void importReadsets() throws PipelineJobException
436436 List <Map <String , Object >> toUpdate = new ArrayList <>();
437437 List <Map <String , Object >> toUpdateKeys = new ArrayList <>();
438438 readsetsToDeactivate .forEach ((rowId , container ) -> {
439+ Readset r = SequenceAnalysisService .get ().getReadset (rowId , getJob ().getUser ());
440+
439441 Map <String , Object > row = new CaseInsensitiveHashMap <>();
440442 row .put ("rowid" , rowId );
441443 row .put ("container" , container );
442444 row .put ("status" , "Replaced" );
445+ row .put ("name" , r .getName () + "-Replaced" );
443446 toUpdate .add (row );
444447
445448 row = new CaseInsensitiveHashMap <>();
0 commit comments