From 79b20bec330e57af73c3ea2b6f2138604bf582af Mon Sep 17 00:00:00 2001 From: Charles Shale Date: Tue, 17 Dec 2024 06:51:14 +1100 Subject: [PATCH] Esvee: cap frag distribution output by max observer read length, load disc stats file from prep dir --- .../hartwig/hmftools/esvee/assembly/AssemblyApplication.java | 2 +- .../hartwig/hmftools/esvee/prep/FragmentSizeDistribution.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/esvee/src/main/java/com/hartwig/hmftools/esvee/assembly/AssemblyApplication.java b/esvee/src/main/java/com/hartwig/hmftools/esvee/assembly/AssemblyApplication.java index 9b8b592914..272a5a7b42 100644 --- a/esvee/src/main/java/com/hartwig/hmftools/esvee/assembly/AssemblyApplication.java +++ b/esvee/src/main/java/com/hartwig/hmftools/esvee/assembly/AssemblyApplication.java @@ -184,7 +184,7 @@ private boolean loadJunctionFiles() return true; } - String discStatsFilename = formDiscordantStatsFilename(mConfig.OutputDir, mConfig.sampleId()); + String discStatsFilename = formDiscordantStatsFilename(mConfig.PrepDir, mConfig.sampleId()); DiscordantStats discordantStats = loadDiscordantStats(discStatsFilename); int minJunctionFrags = MIN_JUNCTION_SUPPORT; diff --git a/esvee/src/main/java/com/hartwig/hmftools/esvee/prep/FragmentSizeDistribution.java b/esvee/src/main/java/com/hartwig/hmftools/esvee/prep/FragmentSizeDistribution.java index d3283bb37d..5cd7483ee1 100644 --- a/esvee/src/main/java/com/hartwig/hmftools/esvee/prep/FragmentSizeDistribution.java +++ b/esvee/src/main/java/com/hartwig/hmftools/esvee/prep/FragmentSizeDistribution.java @@ -363,6 +363,10 @@ private void writeDistribution() for(LengthFrequency lengthFrequency : mLengthFrequencies) { + // cap any fragmemt distribution entry at the observed read length to avoid the use of trimmed fragments impacting it + if(mMaxReadLength > 0 && lengthFrequency.Length < mMaxReadLength) + continue; + writer.write(format("%d\t%d", lengthFrequency.Length, lengthFrequency.Frequency)); writer.newLine(); }