Skip to content

Commit

Permalink
Increase logging in CellRangerVDJUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
bbimber committed Mar 15, 2024
1 parent e5445a4 commit b388b5f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tcrdb/src/org/labkey/tcrdb/pipeline/CellRangerVDJUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;

public class CellRangerVDJUtils
{
Expand Down Expand Up @@ -296,6 +297,8 @@ else if ("Low Counts".equals(hto))
int fullLengthNoClonotype = 0;
int multiChainConverted = 0;
int discordantLoci = 0;
Map<String, Integer> chainMap = new TreeMap<>();

Set<String> knownBarcodes = new HashSet<>();

Map<HEADER_FIELD, Integer> headerToIdx = null;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit b388b5f

Please sign in to comment.