Skip to content

Commit 37ab8d6

Browse files
committed
Always include placeholder for SAMPLE_NAME in FastqToSam
1 parent 7b0cbfc commit 37ab8d6

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

SequenceAnalysis/src/org/labkey/sequenceanalysis/run/alignment/CellRangerWrapper.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ public IndexOutput createIndex(ReferenceGenome referenceGenome, File outputDir)
255255
}
256256

257257
List<String> args = new ArrayList<>();
258-
args.add(getWrapper().getExe().getPath());
258+
args.add(getWrapper().getExe(true).getPath());
259259
args.add("mkref");
260260
args.add("--fasta=" + referenceGenome.getWorkingFastaFile().getPath());
261261
args.add("--genes=" + gtfFile.getPath());
@@ -296,7 +296,7 @@ public AlignmentOutput performAlignment(Readset rs, File inputFastq1, @Nullable
296296
AlignmentOutputImpl output = new AlignmentOutputImpl();
297297

298298
List<String> args = new ArrayList<>();
299-
args.add(getWrapper().getExe().getPath());
299+
args.add(getWrapper().getExe(false).getPath());
300300
args.add("count");
301301

302302
//TODO: consider always adding this?
@@ -671,7 +671,7 @@ public void complete(SequenceAnalysisJobSupport support, AnalysisModel model) th
671671
public File runAggr(String id, File csvFile, List<String> extraArgs) throws PipelineJobException
672672
{
673673
List<String> args = new ArrayList<>();
674-
args.add(getExe().getPath());
674+
args.add(getExe(false).getPath());
675675
args.add("aggr");
676676

677677
id = id.replaceAll("[^a-zA-z0-9_\\-]", "_");
@@ -698,7 +698,7 @@ public File runAggr(String id, File csvFile, List<String> extraArgs) throws Pipe
698698
public File runReanalyze(File matrix, File outDir, String id, List<String> extraParams) throws PipelineJobException
699699
{
700700
List<String> args = new ArrayList<>();
701-
args.add(getExe().getPath());
701+
args.add(getExe(false).getPath());
702702
args.add("reanalyze");
703703

704704
id = id.replaceAll("[^a-zA-z0-9_\\-]", "_");
@@ -723,9 +723,9 @@ public File runReanalyze(File matrix, File outDir, String id, List<String> extra
723723
return output;
724724
}
725725

726-
protected File getExe()
726+
protected File getExe(boolean use31)
727727
{
728-
return SequencePipelineService.get().getExeForPackage("CELLRANGERPATH", "cellranger");
728+
return SequencePipelineService.get().getExeForPackage("CELLRANGERPATH", "cellranger" + (use31 ? "-31" : ""));
729729
}
730730

731731
public static Set<File> getRawDataDirs(File outputDir, boolean filteredOnly)

SequenceAnalysis/src/org/labkey/sequenceanalysis/run/util/FastqToSamWrapper.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ private List<String> getParams(File file, File file2, SAMFileHeader.SortOrder so
7575
if (rg.getPlatformUnit() != null)
7676
params.add("PLATFORM_UNIT=" + rg.getPlatformUnit());
7777

78-
if (rg.getPlatformUnit() != null)
79-
params.add("SAMPLE_NAME=" + rg.getSample());
78+
params.add("SAMPLE_NAME=" + (rg.getSample() == null ? "SAMPLE" : rg.getSample()));
8079
}
8180
else
8281
{

0 commit comments

Comments
 (0)