Skip to content

Commit 4dfd18e

Browse files
committed
Misc debugging updates
1 parent b996c08 commit 4dfd18e

File tree

5 files changed

+17
-4
lines changed

5 files changed

+17
-4
lines changed

SequenceAnalysis/src/org/labkey/sequenceanalysis/analysis/LiftoverHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ public void liftOverVcf(JobContext ctx, ReferenceGenome targetGenome, ReferenceG
307307
else
308308
{
309309
SelectVariantsWrapper wrapper = new SelectVariantsWrapper(job.getLogger());
310-
wrapper.execute(sourceGenome.getWorkingFastaFile(), currentVCF, outputFile, List.of("--sites_only"));
310+
wrapper.execute(sourceGenome.getWorkingFastaFile(), currentVCF, outputFile, List.of("--sites-only-vcf-output"));
311311
}
312312
currentVCF = outputFile;
313313

SequenceAnalysis/src/org/labkey/sequenceanalysis/util/ChainFileValidator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,11 @@ public void exec(ResultSet rs) throws SQLException
301301
// Always store the numeric version, if present:
302302
if (name.startsWith("chr0"))
303303
{
304-
cachedReferences.put(name.replaceAll("chr0", ""), name);
304+
cachedReferences.put(name.replaceFirst("chr0", ""), name);
305305
}
306306
else if (name.startsWith("chr"))
307307
{
308-
cachedReferences.put(name.replaceAll("chr", ""), name);
308+
cachedReferences.put(name.replaceFirst("chr", ""), name);
309309
}
310310

311311
if (StringUtils.trimToNull(rs.getString("genbank")) != null)

jbrowse/src/org/labkey/jbrowse/model/JsonFile.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ private JSONObject getVcfTrack(Logger log, ExpData targetFile, ReferenceGenome r
544544
JSONObject json = getExtraTrackConfig();
545545
if (json != null && json.has("additionalFeatureMsg"))
546546
{
547-
getJSONObject("renderer").put("message", json.getString("message"));
547+
getJSONObject("renderer").put("message", json.getString("additionalFeatureMsg"));
548548
}
549549
}});
550550
}});

singlecell/api-src/org/labkey/api/singlecell/pipeline/AbstractSingleCellPipelineStep.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
import java.util.ArrayList;
3030
import java.util.Arrays;
3131
import java.util.Collection;
32+
import java.util.HashSet;
3233
import java.util.List;
34+
import java.util.Set;
3335
import java.util.stream.Collectors;
3436

3537
abstract public class AbstractSingleCellPipelineStep extends AbstractPipelineStep implements SingleCellStep
@@ -89,6 +91,7 @@ public Output execute(SequenceOutputHandler.JobContext ctx, List<SeuratObjectWra
8991
try (CSVReader reader = new CSVReader(Readers.getReader(tracker), '\t'))
9092
{
9193
String[] line;
94+
Set<String> encounteredFiles = new HashSet<>();
9295
while ((line = reader.readNext()) != null)
9396
{
9497
File f = new File(ctx.getOutputDir(), line[2]);
@@ -97,6 +100,14 @@ public Output execute(SequenceOutputHandler.JobContext ctx, List<SeuratObjectWra
97100
throw new PipelineJobException("File not found: " + f.getPath());
98101
}
99102

103+
String key = line[0] + " / " + line[1] + " / "+ f.getName() + " / " + line[3] + " / " + line[4];
104+
if (encounteredFiles.contains(key))
105+
{
106+
ctx.getLogger().error("Duplicate output found: " + key);
107+
continue;
108+
}
109+
encounteredFiles.add(key);
110+
100111
getPipelineCtx().getLogger().debug("Output seurat: " + line[0] + " / " + line[1] + " / "+ f.getName() + " / " + line[3] + " / " + line[4]);
101112

102113
String outputIdVal = "NA".equals(line[3]) ? null : StringUtils.trimToNull(line[3]);

singlecell/resources/chunks/Functions.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,13 @@ file.create('/work/savedSeuratObjects.txt')
7070
print(paste0('Total lines in savedSeuratObjects.txt on job start:', length(readLines('savedSeuratObjects.txt'))))
7171

7272
saveData <- function(seuratObj, datasetId) {
73+
message(paste0('Saving dataset: ', datasetId, ' with ', ncol(seuratObj), ' cells'))
7374
print(paste0('Saving dataset: ', datasetId))
7475
print(seuratObj)
7576

7677
datasetIdForFile <- makeLegalFileName(datasetId)
7778
fn <- paste0(outputPrefix, '.', datasetIdForFile, '.seurat.rds')
79+
message(paste0('Filename: ', fn))
7880

7981
message(paste0('Saving RDS file: ', fn, ' with ', ncol(seuratObj), ' cells'))
8082
barcodeFile <- paste0(outputPrefix, '.', datasetIdForFile, '.cellBarcodes.csv')

0 commit comments

Comments
 (0)