Skip to content

Commit b388b5f

Browse files
committed
Increase logging in CellRangerVDJUtils
1 parent e5445a4 commit b388b5f

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tcrdb/src/org/labkey/tcrdb/pipeline/CellRangerVDJUtils.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
import java.util.List;
5454
import java.util.Map;
5555
import java.util.Set;
56+
import java.util.TreeMap;
5657

5758
public class CellRangerVDJUtils
5859
{
@@ -296,6 +297,8 @@ else if ("Low Counts".equals(hto))
296297
int fullLengthNoClonotype = 0;
297298
int multiChainConverted = 0;
298299
int discordantLoci = 0;
300+
Map<String, Integer> chainMap = new TreeMap<>();
301+
299302
Set<String> knownBarcodes = new HashSet<>();
300303

301304
Map<HEADER_FIELD, Integer> headerToIdx = null;
@@ -398,6 +401,8 @@ else if (discordantBarcodes.contains(barcode))
398401
discordantLoci++;
399402
}
400403

404+
chainMap.put(locus, chainMap.getOrDefault(locus, 0) + 1);
405+
401406
// Aggregate by: cDNA_ID, cdr3, chain, raw_clonotype_id, coalescedContigName, vHit, dHit, jHit, cHit, cdr3_nt
402407
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)])}, "<>");
403408
AssayModel am;
@@ -447,6 +452,10 @@ else if (discordantBarcodes.contains(barcode))
447452
_log.info("total rows lacking clonotype, but marked full-length: " + fullLengthNoClonotype);
448453
_log.info("total rows converted from Multi to TRA: " + multiChainConverted);
449454
_log.info("total rows with discordant chain/c-gene calls: " + discordantLoci);
455+
for (String chain : chainMap.keySet())
456+
{
457+
_log.info("total rows for " + chain + ":" + chainMap.get(chain));
458+
}
450459

451460
}
452461
catch (IOException e)

0 commit comments

Comments
 (0)