From b388b5fd0b9901f5785bf79029372f261fffd246 Mon Sep 17 00:00:00 2001 From: bbimber Date: Fri, 15 Mar 2024 05:30:14 -0700 Subject: [PATCH] Increase logging in CellRangerVDJUtils --- .../org/labkey/tcrdb/pipeline/CellRangerVDJUtils.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tcrdb/src/org/labkey/tcrdb/pipeline/CellRangerVDJUtils.java b/tcrdb/src/org/labkey/tcrdb/pipeline/CellRangerVDJUtils.java index a9c200f6f..acf5d44e8 100644 --- a/tcrdb/src/org/labkey/tcrdb/pipeline/CellRangerVDJUtils.java +++ b/tcrdb/src/org/labkey/tcrdb/pipeline/CellRangerVDJUtils.java @@ -53,6 +53,7 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.TreeMap; public class CellRangerVDJUtils { @@ -296,6 +297,8 @@ else if ("Low Counts".equals(hto)) int fullLengthNoClonotype = 0; int multiChainConverted = 0; int discordantLoci = 0; + Map chainMap = new TreeMap<>(); + Set knownBarcodes = new HashSet<>(); Map headerToIdx = null; @@ -398,6 +401,8 @@ else if (discordantBarcodes.contains(barcode)) discordantLoci++; } + chainMap.put(locus, chainMap.getOrDefault(locus, 0) + 1); + // Aggregate by: cDNA_ID, cdr3, chain, raw_clonotype_id, coalescedContigName, vHit, dHit, jHit, cHit, cdr3_nt String key = StringUtils.join(new String[]{cDNA.toString(), line[headerToIdx.get(HEADER_FIELD.CDR3)], locus, rawClonotypeId, coalescedContigName, removeNone(line[headerToIdx.get(HEADER_FIELD.V_GENE)]), removeNone(line[headerToIdx.get(HEADER_FIELD.D_GENE)]), removeNone(line[headerToIdx.get(HEADER_FIELD.J_GENE)]), cGene, removeNone(line[headerToIdx.get(HEADER_FIELD.CDR3_NT)])}, "<>"); AssayModel am; @@ -447,6 +452,10 @@ else if (discordantBarcodes.contains(barcode)) _log.info("total rows lacking clonotype, but marked full-length: " + fullLengthNoClonotype); _log.info("total rows converted from Multi to TRA: " + multiChainConverted); _log.info("total rows with discordant chain/c-gene calls: " + discordantLoci); + for (String chain : chainMap.keySet()) + { + _log.info("total rows for " + chain + ":" + chainMap.get(chain)); + } } catch (IOException e)