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
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:
DIQMTQSPSSVSASVGDRVTITCQSSPSVWSNFLSWYQQKPGKAPKLLIYEASKLTSGVPSRFSGSGSGTDFTLTISSLQPEDFATYYCGGGYSSISDTTFGGGTKVEIKRTVAAPSVFIFPPSDEQLKSGTASVVCLLNNFYPREAKVQWKVDNALQSGNSQESVTEQDSKDSTYSLSSTLTLSKADYEKHKVYACEVTHQGLSSPVTKSFNRGEChas this
sequence_aa_alignmentin MakeDB output:DIQMTQSPSSVSASVGDRVTITCQSSPSV......SNFLSWYQQKPGKAPKLLIYEA.......SKLTSGVP.SRFSGSG..SGTDFTLTISSLQPEDFATYYCGGGYSSand this
cdr1_aa:PSV......SNFI need the CDR1 sequence, so I removed the
.characters fromcdr1_aa, leaving me withPSVSNF. But this is not a subsequence of my input sequence. The correct CDR1 in this case should bePSVWSNF, 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:
XPQLQESGPGLVEASETLSLTCTVSGDSTGRCNYFWGWVRQPPGKGLEWIGSLSHCRSYYNTDWTYHNPSLKSRLTISLDTPKNQVFLRLTSVTAADTATYYCARFGGEVLVYRDWPKPAWVDLWGRGTLVTVSSASTKGPSVFPLAPSSKSTSGGTAALGCLVKDYFPEPVTVSWNSGALTSGVHTFPAVLQSSGLYSLSSVVTVPSSSLGTQTYICNVNHKPSNTKVDKRVEPKSCDLSHCRSYYNTDWTLYNT...DWTWould 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_alignmentis not an official AIRR field butsequence_alignment_aaisIgBLAST aa output for the example sequence: igblast_output_example.txt