James O'Brien
08/19/2025, 1:03 PMDEFINE_CLONES element of the airrflow pipeline. For context I have bulk BCR data with UMIs with 2 timepoints per individual. In the sample sheet, these are represented with a different sample_id eg: R101T0 or R101T5, the subject_id for these samples would be the same R101
My question is, if the default --clone_by is set to subject_id, does the pipeline separate out clones seen in the 2 timepoints, but same subject - will they have different clone_id values, are they collapsed into a single clone and we loose that data or are they represented with the same clone_id and just on a separate row as the timepoints/sample_id is different?
For example would it look like this:
sampleID subject_ID junction_aa clone_id duplicate_count
101T0 101 ABC 1 1
101T5 101 ABC 1 1
or this
101T0 101 ABC 1 1
101T5 101 ABC 2 1
or
101T0 101 ABC 1 2
I am mainly worried about "exact" matches, as I can see that there are a few samples that have some differences in either sequence or V/J gene allele but assigned the same clone but different timepoints/sample_id
For reference running airrflow=4.3.1, --clonal-thresold=0.15Huimin Lyu
08/19/2025, 1:57 PMHuimin Lyu
08/19/2025, 2:10 PMhierarchicalClones was used to infer clones. The function provides a hierarchical agglomerative clustering approach to infer clonal relationships in high-throughput Adaptive Immune Receptor Repertoire sequencing (AIRR-seq) data. This approach clusters B or T cell receptor sequences based on junction region sequence similarity within partitions that share the same V gene, J gene, and junction length, allowing for ambiguous V or J gene annotations. In your case, as you set the clonal_threshold to 0.15, which means you allow sequences of the same V/J gene, junction length and maximum of 15% difference be assigned to the same clone.James O'Brien
08/19/2025, 6:25 PMHuimin Lyu
08/19/2025, 7:51 PM