"downsample_immundata downsamples single-cell repertoires and is deterministic with seed"
"downsample_immundata downsampled bulk repertoires by count"
"downsample_immundata keeps paired chains intact"
"downsample_immundata works on IG test data with proportion n"
"downsample_immundata with n = 1 keeps one receptor per repertoire"
"downsample_immundata validates n and handles no-repertoire fallback"
"downsample_immundata warns and keeps repertoire unchanged when n exceeds available units"
"downsample_immundata supports count-mode proportion downsampling"
"downsample_immundata is deterministic in count mode with seed"
"downsample_immundata errors when proportion results in zero target"
"downsample_immundata produces consistent imd_count and imd_proportion invariants"

downsample_immundata downsamples single-cell repertoires and is deterministic with seed

Error in `downsample_immundata(idata, n = 5, seed = 42)`: No barcode units were selected. Increase `n`.

downsample_immundata downsampled bulk repertoires by count

Error in `select(sampled_receptors, all_of(receptor_join_cols))`: i In argument: `all_of(receptor_join_cols)`.
Caused by error in `all_of()`:
! Can't subset elements that don't exist.
x Elements `imd_repertoire_id` and `imd_receptor_id` don't exist.

downsample_immundata with n = 1 keeps one receptor per repertoire

Error in `downsample_immundata(idata, n = 10, seed = 42)`: No barcode units were selected. Increase `n`.

downsample_immundata warns and keeps repertoire unchanged when n exceeds available units

Error in `downsample_immundata(idata, n = 0.5, seed = 101)`: No barcode units were selected. Increase `n`.

downsample_immundata supports count-mode proportion downsampling

Error in `downsample_immundata(idata, n = 5, seed = 222)`: No barcode units were selected. Increase `n`.

downsample_immundata is deterministic in count mode with seed

Error in `downsample_immundata(idata, n = 2, seed = 33)`: No barcode units were selected. Increase `n`.

downsample_immundata produces consistent imd_count and imd_proportion invariants