11package org .labkey .singlecell .pipeline .singlecell ;
22
3- import org .apache .commons .io .IOUtils ;
4- import org .apache .commons .lang3 .StringUtils ;
53import org .json .JSONObject ;
64import org .labkey .api .pipeline .PipelineJobException ;
7- import org .labkey .api .reader .Readers ;
85import org .labkey .api .sequenceanalysis .SequenceOutputFile ;
96import org .labkey .api .sequenceanalysis .model .Readset ;
107import org .labkey .api .sequenceanalysis .pipeline .AbstractPipelineStepProvider ;
1512import org .labkey .api .singlecell .pipeline .SingleCellStep ;
1613import org .labkey .singlecell .CellHashingServiceImpl ;
1714
18- import java .io .File ;
19- import java .io .IOException ;
20- import java .nio .file .Files ;
21- import java .nio .file .Path ;
2215import java .util .Arrays ;
2316import java .util .Collections ;
2417import java .util .List ;
@@ -83,6 +76,11 @@ public void init(SequenceOutputHandler.JobContext ctx, List<SequenceOutputFile>
8376 {
8477 throw new PipelineJobException ("Seurat prototype step expects all inputs to have a readset ID." );
8578 }
79+
80+ if (ctx .getSequenceSupport ().getCachedGenomes ().size () > 1 )
81+ {
82+ throw new PipelineJobException ("Expected seurat prototype step to use a single genome" );
83+ }
8684 }
8785
8886 @ Override
@@ -122,6 +120,11 @@ public Output execute(SequenceOutputHandler.JobContext ctx, List<SeuratObjectWra
122120 {
123121 Output output = super .execute (ctx , inputObjects , outputPrefix );
124122
123+ if (ctx .getSequenceSupport ().getCachedGenomes ().size () > 1 )
124+ {
125+ throw new PipelineJobException ("Expected seurat prototype step to use a single genome" );
126+ }
127+
125128 for (SeuratObjectWrapper wrapper : output .getSeuratObjects ())
126129 {
127130 if (wrapper .getReadsetId () == null )
@@ -132,6 +135,7 @@ public Output execute(SequenceOutputHandler.JobContext ctx, List<SeuratObjectWra
132135 SequenceOutputFile so = new SequenceOutputFile ();
133136 so .setFile (wrapper .getFile ());
134137 so .setCategory ("Seurat Object Prototype" );
138+ so .setLibrary_id (ctx .getSequenceSupport ().getCachedGenomes ().iterator ().next ().getGenomeId ());
135139
136140 String readsetName = ctx .getSequenceSupport ().getCachedReadset (wrapper .getReadsetId ()).getName ();
137141 so .setReadset (wrapper .getReadsetId ());
0 commit comments