"agg_repertoires counts single-chain receptors correctly"
"Sample1 should have 2 unique receptors"
"Sample2 should have 2 unique receptors"
"Shared receptor should have count of 2"
"agg_repertoires identifies double-counting in paired-chain data"
"agg_repertoires handles paired-chain data with shared receptors"
"agg_repertoires proportions are affected by double-counting"
"agg_repertoires n_repertoires calculation is correct for paired data"
"Shared receptor should appear in 2 repertoires"
"Unique receptor should appear in 1 repertoire"
"agg_repertoires preserves second chain data (no NAs)"
"Annotation table should retain rows for both chains (IGH and IGL)"
"Should find exactly one row for the IGL chain"
"IGL row should have valid v_call data (not NA)"
"Both chains of the same receptor should share the same count stats"
"Both chains should belong to the same repertoire ID"

agg_repertoires counts single-chain receptors correctly

Expected `all(reps_na_counts == 0)` to be TRUE.
Differences:
`actual`:   FALSE
`expected`: TRUE 

context: single-chain duplicated receptors
annotation shape: 5x16
repertoire shape: 2x4
missing annotation columns: <none>
missing repertoire columns: <none>
annotation NA counts: imd_receptor_id=0, imd_repertoire_id=5, imd_count=5, imd_proportion=5, n_repertoires=0
repertoire NA counts: imd_repertoire_id=0, n_barcodes=0, n_receptors=2

Expected `nrow(unmatched_repertoire_ids)` to equal 0.
Differences:
  `actual`: 1.0
`expected`: 0.0

context: single-chain duplicated receptors
annotation shape: 5x16
repertoire shape: 2x4
missing annotation columns: <none>
missing repertoire columns: <none>
annotation NA counts: imd_receptor_id=0, imd_repertoire_id=5, imd_count=5, imd_proportion=5, n_repertoires=0
repertoire NA counts: imd_repertoire_id=0, n_barcodes=0, n_receptors=2
unmatched repertoire ids: NA

Expected `sample1_stats$n_receptors` to equal 2.
Differences:
  `actual`:  NA
`expected`: 2.0

Sample1 should have 2 unique receptors

Expected `sample2_stats$n_receptors` to equal 2.
Differences:
  `actual`:  NA
`expected`: 2.0

Sample2 should have 2 unique receptors