Skip to content

[BUG] MakeDb igblast-aa: alignment-based subsequences makes it impossible to retrieve full CDRs with additions from germline #218

Description

@LonnekeScheffer

The AIRR standard output created by MakeDb.py returns sub-sequences such as the CDR1, CDR2 and FR regions as "alignments". This means, they contain . and - characters. I believe alignment characters should only occur in the AIRR field sequence_alignment , although the AIRR standard is not entirely clear here. But returning alignments rather than input sub-sequences becomes an issue when these regions contain amino acids not present in the germline.

e.g., the following input sequence: DIQMTQSPSSVSASVGDRVTITCQSSPSVWSNFLSWYQQKPGKAPKLLIYEASKLTSGVPSRFSGSGSGTDFTLTISSLQPEDFATYYCGGGYSSISDTTFGGGTKVEIKRTVAAPSVFIFPPSDEQLKSGTASVVCLLNNFYPREAKVQWKVDNALQSGNSQESVTEQDSKDSTYSLSSTLTLSKADYEKHKVYACEVTHQGLSSPVTKSFNRGEC

has this sequence_aa_alignment in MakeDB output:
DIQMTQSPSSVSASVGDRVTITCQSSPSV......SNFLSWYQQKPGKAPKLLIYEA.......SKLTSGVP.SRFSGSG..SGTDFTLTISSLQPEDFATYYCGGGYSS

and this cdr1_aa: PSV......SNF

I need the CDR1 sequence, so I removed the . characters from cdr1_aa, leaving me with PSVSNF. But this is not a subsequence of my input sequence. The correct CDR1 in this case should be PSVWSNF, which cannot be computed in any straightforward way as it is not clear where and how many amino acids are missing from the alignment.

A more extreme example:

  • Sequence: XPQLQESGPGLVEASETLSLTCTVSGDSTGRCNYFWGWVRQPPGKGLEWIGSLSHCRSYYNTDWTYHNPSLKSRLTISLDTPKNQVFLRLTSVTAADTATYYCARFGGEVLVYRDWPKPAWVDLWGRGTLVTVSSASTKGPSVFPLAPSSKSTSGGTAALGCLVKDYFPEPVTVSWNSGALTSGVHTFPAVLQSSGLYSLSSVVTVPSSSLGTQTYICNVNHKPSNTKVDKRVEPKSCD
  • CDR2 (inferred from ANARCI IMGT numbering): LSHCRSYYNTDWT
  • MakeDb CDR2 LYNT...DWT

Would it be possible to update MakeDb.py such that it outputs the actual CDR/FR subsequences of the input, rather than subsequences of the alignment?

Minor side note: sequence_aa_alignment is not an official AIRR field but sequence_alignment_aa is

IgBLAST aa output for the example sequence: igblast_output_example.txt

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions