@@ -400,33 +400,14 @@ public AlignmentStep.AlignmentOutput performAlignment(Readset rs, List<File> inp
400400 output .addSequenceOutput (outputHtmlRename , rs .getName () + " 10x VDJ Summary" , "10x Run Summary" , rs .getRowId (), null , referenceGenome .getGenomeId (), null );
401401
402402 File outputVloupe = new File (outdir , "vloupe.vloupe" );
403+ File csv = new File (outdir , "all_contig_annotations.csv" );
403404 if (!outputVloupe .exists ())
404405 {
405406 //NOTE: if there were no A/B hits, the vLoupe isnt created, but all other outputs exist
406- File csv = new File (outdir , "all_contig_annotations.csv" );
407407 if (!csv .exists ())
408408 {
409409 throw new PipelineJobException ("Unable to find file: " + outputVloupe .getPath ());
410410 }
411-
412- if (doGDParsing ())
413- {
414- getPipelineCtx ().getLogger ().info ("Removing g/d prefixes from all_contig_annotations.csv file" );
415- File csv2 = new File (outdir , "all_contig_annotations2.csv" );
416- try (PrintWriter writer = PrintWriters .getPrintWriter (csv2 ); BufferedReader reader = Readers .getReader (csv ))
417- {
418- String line ;
419- while ((line = reader .readLine ()) != null )
420- {
421- line = line .replaceAll ("TRATRG" , "TRG" );
422- line = line .replaceAll ("TRBTRD" , "TRD" );
423- writer .println (line );
424- }
425- }
426-
427- csv .delete ();
428- FileUtils .moveFile (csv2 , csv );
429- }
430411 }
431412 else
432413 {
@@ -438,6 +419,25 @@ public AlignmentStep.AlignmentOutput performAlignment(Readset rs, List<File> inp
438419 FileUtils .moveFile (outputVloupe , outputVloupeRename );
439420 output .addSequenceOutput (outputVloupeRename , rs .getName () + " 10x VLoupe" , "10x VLoupe" , rs .getRowId (), null , referenceGenome .getGenomeId (), null );
440421 }
422+
423+ if (doGDParsing ())
424+ {
425+ getPipelineCtx ().getLogger ().info ("Removing g/d prefixes from all_contig_annotations.csv file" );
426+ File csv2 = new File (outdir , "all_contig_annotations2.csv" );
427+ try (PrintWriter writer = PrintWriters .getPrintWriter (csv2 ); BufferedReader reader = Readers .getReader (csv ))
428+ {
429+ String line ;
430+ while ((line = reader .readLine ()) != null )
431+ {
432+ line = line .replaceAll ("TRATRG" , "TRG" );
433+ line = line .replaceAll ("TRBTRD" , "TRD" );
434+ writer .println (line );
435+ }
436+ }
437+
438+ csv .delete ();
439+ FileUtils .moveFile (csv2 , csv );
440+ }
441441 }
442442 catch (IOException e )
443443 {
0 commit comments