{% extends "humanization/humanize_layout.html" %} {% set title = result.input.name + " - Humanization result" %} {% set MIN_SUBJ = result.oasis_params.min_fraction_subjects %} {% set RARE_FAMILY_FREQUENCY = 0.01 %} {% from 'humanization/humanize_alignment_component.html' import chain_humanness_header, oasis_sequence_pair, format_percent_subjects, format_aa_frequency_tooltip, format_aa_frequency, annot_num with context %} {% block main %}
{{ icon('chevron-left') }} Results

Humanization {{ result.input.name }}

{% include 'humanization/humanize_params_summary.html' %}

{{ '{:.0%}'.format(result.humanized_humanness.get_oasis_identity(MIN_SUBJ)) }} OASis identity ({{ '+{:.0%}'.format(result.humanized_humanness.get_oasis_identity(MIN_SUBJ) - result.parental_humanness.get_oasis_identity(MIN_SUBJ)) }})

{{ result.humanized_humanness.get_num_human_peptides(MIN_SUBJ) }}/{{ result.humanized_humanness.get_num_peptides() }} peptides are considered human
(are found in at least {{ '{:.0%}'.format(MIN_SUBJ) }} of human subjects)

This corresponds to the {{ '{:.0%}'.format(result.humanized_humanness.get_oasis_percentile(MIN_SUBJ)) }} percentile {{ info_icon('Percentile of OASis identity among therapeutic mAbs at the current prevalence threshold. Zero percentile corresponds to the least human and 100% percentile corresponds to the most human mAb in the clinic, including all clinical stage human, humanized and murine therapeutics.') }}

{{ '{:.0%}'.format(result.humanized_humanness.get_germline_content()) }} germline content ({{ '+{:.0%}'.format(result.humanized_humanness.get_germline_content() - result.parental_humanness.get_germline_content()) }})

Sequence identity with nearest heavy and light human germline sequences.

{{ result.humanized_humanness.vh.v_germline_family }}{{ result.humanized_humanness.vh.v_germline_suffix }} {% if result.humanized_humanness.vh and result.humanized_humanness.vl %}+{% endif %} {{ result.humanized_humanness.vl.v_germline_family }}{{ result.humanized_humanness.vl.v_germline_suffix }}

{% if result.humanized_humanness.vh %}

Heavy chain {{ chain_humanness_header(result.humanized_humanness.vh, MIN_SUBJ) }}

{{ oasis_sequence_pair(result.parental_humanness.vh, result.humanized_humanness.vh, MIN_SUBJ) }} {% endif %} {% if result.humanized_humanness.vl %}

Light chain {{ chain_humanness_header(result.humanized_humanness.vl, MIN_SUBJ) }}

{{ oasis_sequence_pair(result.parental_humanness.vl, result.humanized_humanness.vl, MIN_SUBJ) }} {% endif %}

Detailed view

Show mutations only
{% if result.humanization.vh %}

Heavy chain table

{{ humanization_table(result.humanization.vh, result.parental_humanness.vh, result.humanized_humanness.vh) }} {% endif %} {% if result.humanization.vl %}

Light chain table

{{ humanization_table(result.humanization.vl, result.parental_humanness.vl, result.humanized_humanness.vl) }} {% endif %} {% endblock %} {% macro format_peptide(peptide, other_peptide) %} {% for a, b in zip(peptide, other_peptide) %}{% if a != b %}{{ a }}{% else %}{{ a }}{% endif %}{% endfor %} {% endmacro %} {% macro annot_change(num_before, num_after, fmt='{:,}') %}{% if num_before > num_after %}({{ fmt.format(num_after - num_before) }}){% elif num_before < num_after %}(+{{ fmt.format(num_after - num_before) }}){% endif %}{% endmacro %} {% macro humanness_row(parental, humanized) %} {% if parental and humanized and parental.seq != humanized.seq %} {{ format_peptide(parental.seq, humanized.seq) }} {{ format_peptide(humanized.seq, parental.seq) }} {{ format_percent_subjects(parental.fraction_oas_subjects) }} → {{ format_percent_subjects(humanized.fraction_oas_subjects) }} subjs {% if parental.fraction_oas_subjects is not none and humanized.fraction_oas_subjects is not none %}{{ annot_change(parental.fraction_oas_subjects | round(2, 'floor'), humanized.fraction_oas_subjects | round(2, 'floor'), fmt='{:.0%}') }}{% endif %} {{ annot_num(parental.num_oas_occurrences) }} → {{ annot_num(humanized.num_oas_occurrences, 'seqs', 'seq') }} {% if parental.num_oas_occurrences is not none and humanized.num_oas_occurrences is not none %}{{ annot_change(parental.num_oas_occurrences, humanized.num_oas_occurrences) }}{% endif %} {% elif humanized %} {{ format_peptide(parental.seq, humanized.seq) if parental else "-" }} {{ format_peptide(humanized.peptide, parental.peptide) if parental else humanized.peptide }} {{ format_percent_subjects(humanized.fraction_oas_subjects) }} subjs {{ annot_num(humanized.num_oas_occurrences, 'seqs', 'seq') }} {% else %} {{ format_peptide(parental.seq, humanized.seq) if humanized else parental.seq }} {{ format_peptide(humanized.seq, parental.seq) if humanized else "-" }} {{ format_percent_subjects(parental.fraction_oas_subjects) }} subjs {{ annot_num(parental.num_oas_occurrences, 'seqs', 'seq') }} {% endif %} {% endmacro %} {% macro mark_section_boundary(parental, humanized, pos) %}{% if not parental.has_position(pos) and not humanized.has_position(pos) %}table-humanization-section{% endif %}{% endmacro %} {% macro humanization_table(chain_humanization, parental_humanness, humanized_humanness) %} {% if chain_humanization.scores %} {% endif %} {% for position, (a, b) in chain_humanization.alignment %} {% set scores = chain_humanization.scores.get(position) %} {% set freqs = humanized_humanness.germline_family_residue_frequency.get(position) %} {% if a == b %} {% if chain_humanization.scores %} {% endif %} {% else %} {% if chain_humanization.scores %} {% endif %} {% endif %} {% if parental_humanness.has_position(position) or humanized_humanness.has_position(position) %} {{ humanness_row( parental=parental_humanness.peptides.get(position), humanized=humanized_humanness.peptides.get(position) ) }} {% endif %} {% endfor %}
Sequence Confidence Peptides Observed Antibody Space
Region {{ chain_humanization.parental_chain.scheme.title() }} Orig MutSapiens
Score {{ info_icon('Confidence score predicted by Sapiens deep learning method. Corresponds to probability of seeing given residue in the context of the given sequence in human repertoires from the Observed Antibody Space database.') }}
Residue
Freq {{ info_icon('Residue frequency in {} germline family at given {} position in human repertoires from the Observed Antibody Space database.'.format(humanized_humanness.v_germline_family, humanized_humanness.chain.scheme.title())) }}
Parental Humanized OAS
Subjects {{ info_icon('Percentage of human subjects from the Observed Antibody Space database containing this peptide in their repertoire.') }}
OAS
Sequences {{ info_icon('Number of total antibody sequences containing this peptide across across all human subjects in the Observed Antibody Space database.') }}
{{ position.get_region() | upper }}{% if position.cdr_definition == 'kabat' and position.is_in_vernier() %} Vernier{% endif %} {{ position }} {{ a }} {{ '{:.0%}'.format(scores[b]) if scores and b in scores else '?' }} {{ format_aa_frequency(freqs.get(b, 0) if freqs else none) }} {{ a }} {{ b }} {{ '{:.0%}'.format(scores[a]) if scores and a in scores else '?' }} → {{ '{:.0%}'.format(scores[b]) if scores and b in scores else '?' }} {{ format_aa_frequency(freqs.get(a, 0) if freqs else none) }} → {{ format_aa_frequency(freqs.get(b, 0) if freqs else none) }}
{% endmacro %}