Skip to content

Commit

Permalink
Make CellRangerVDJ merge both filtered and all contig files
Browse files Browse the repository at this point in the history
  • Loading branch information
bbimber committed Aug 1, 2024
1 parent 350e9a2 commit ee6ea2c
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,10 @@ public AlignmentStep.AlignmentOutput performAlignment(Readset rs, List<File> inp
File csvAB = processOutputsForType(id, rs, referenceGenome, outdir, output, "vdj_t");
File csvGD = processOutputsForType(id, rs, referenceGenome, outdir, output, "vdj_t_gd");

File combinedCSV = processAndMergeCSVs(csvAB, csvGD, getPipelineCtx().getLogger());
processAndMergeCSVs(csvAB, csvGD, getPipelineCtx().getLogger());

// Repeat for filtered contig annotations:
processAndMergeCSVs(new File(csvAB.getParentFile(), "filtered_contig_annotations.csv"), new File(csvGD.getParentFile(), "filtered_contig_annotations.csv"), getPipelineCtx().getLogger());

//NOTE: this folder has many unnecessary files and symlinks that get corrupted when we rename the main outputs
File directory = new File(outdir.getParentFile(), "SC_MULTI_CS");
Expand Down Expand Up @@ -788,9 +791,9 @@ protected File getExe()
return SequencePipelineService.get().getExeForPackage("CELLRANGERPATH", "cellranger");
}

private static File processAndMergeCSVs(File abCSV, File gdCSV, Logger log) throws PipelineJobException
private static void processAndMergeCSVs(File abCSV, File gdCSV, Logger log) throws PipelineJobException
{
File output = new File(abCSV.getParentFile(), "all_contig_annotations_combined.csv");
File output = new File(abCSV.getParentFile(), FileUtil.getBaseName(abCSV) + "_combined.csv");

try (PrintWriter writer = PrintWriters.getPrintWriter(output))
{
Expand All @@ -801,8 +804,6 @@ private static File processAndMergeCSVs(File abCSV, File gdCSV, Logger log) thro
{
throw new PipelineJobException(e);
}

return output;
}

private static void processCSV(PrintWriter writer, boolean printHeader, File inputCsv, Logger log, List<String> acceptableChains, String chainType) throws IOException
Expand Down

0 comments on commit ee6ea2c

Please sign in to comment.