The application belongs to the field of
bioinformatics and
computational biology, and particularly relates to a
mutation detection method and
system based on an attention mechanism and dynamic routing. The method comprises: obtaining a sequencing
sequence alignment result, and extracting candidate
mutation sites with high confidence through threshold setting preliminary screening; a
local sequence window is intercepted with the candidate site as the center, a multi-dimensional feature
tensor is constructed by fusing
physical space position, positive and negative chain alignment classification and sequencing quality attributes; the multi-dimensional feature
tensor is input into a
backbone network,
background noise is suppressed by using a
Gaussian guided space attention mechanism, and long-distance multi-scale
mutation features are extracted by using a shift window mechanism of a Swin
Transformer and a dynamic routing strategy of a mixed expert module; finally, the existence of mutations,
zygote states and
allele sequences are determined in sequence by using a multi-task dynamic decoding network, and
network parameter optimization and result output are completed by using a cost-sensitive focal loss. The application avoids the statistical feature loss problem caused by traditional image mapping, alleviates the limitation of limited local
receptive field, realizes adaptive adjustment of the calculation path according to the sequence complexity by introducing a dynamic routing mechanism, overcomes the configuration imbalance of static models in the allocation of computing power and the capacity of local parameters, and enhances the detection accuracy and stability of the model under complex variation and low sequencing depth conditions.