Analytical method, device and electronic equipment for atmospheric aerosol microbial community composition
By using implicit characterization extraction and cluster analysis techniques in atmospheric aerosol microbial community analysis, the analysis algorithm is optimized to improve accuracy, solving the problems of high analysis complexity and cost in the existing technology, and achieving fast and accurate microbial Community composition analysis.
Patent Information
- Application Number
- CN202411391030.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-09-30
AI Technical Summary
In the prior art, when analyzing the composition of microbial communities in atmospheric aerosols, there are problems such as complex operation, long time-consuming, high cost and inability to fully cover all microbial species, especially for microbial species that are difficult to cultivate under laboratory conditions.
An analysis method including the algorithm determination stage and the data analysis stage is adopted. In the algorithm determination stage, the algorithm parameters are optimized to improve analysis accuracy by obtaining microbial composition analysis algorithms and high-throughput sequencing sequence templates, and using implicit characterization extraction and cluster analysis techniques. In the data analysis phase, the target high-throughput sequencing sequence is loaded into the optimized algorithm to obtain the microbial species markers of the target atmospheric aerosol samples.
The rapid and efficient analysis of microbial community composition in atmospheric aerosols is achieved, reducing the dependence on supervised training samples, and improving the accuracy and cost-effectiveness of the analysis.
Smart Images

Figure CN119007835B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electrical data processing, and in particular, to an analysis method, device and electronic equipment for analyzing the composition of atmospheric aerosol microbial communities. Background Art
[0002] With the rapid development of modern biotechnology, the analysis of microbial community composition plays an increasingly important role in many fields such as environmental science, ecological research, and medical health. As an important component of the environment, atmospheric aerosols carry a microbial community structure that not only reflects the quality of the environment, but is also closely related to human health. Therefore, accurately and efficiently analyzing the composition of microbial communities in atmospheric aerosols has become an important topic in current scientific research. Traditional microbial community analysis methods usually rely on laboratory culture technology and molecular identification technology based on PCR (polymerase chain reaction). However, these methods have the disadvantages of complex operation, long time consumption, and high cost, and often cannot fully cover all microbial species, especially for those microbial species that are difficult to culture under laboratory conditions. In recent years, the rise of high-throughput sequencing technology has provided a new way for microbial community analysis. By directly sequencing the DNA of microorganisms, a large amount of sequence data can be obtained, and then the composition of microbial communities can be analyzed through bioinformatics methods.
[0003] The analysis of high-throughput sequencing data also faces many challenges. First, the massive amount of sequencing data requires that the analysis algorithm must have efficient data processing capabilities. Secondly, due to the noise, errors and diversity of microbial species in the sequencing process, how to accurately map the sequencing sequences to specific microbial species has become a key issue. In addition, the accuracy of microbial community composition analysis is also highly dependent on the quality and quantity of training samples, especially supervised training samples with accurate species labels. However, in practical applications, obtaining a large number of supervised samples with accurate labels is often costly, time-consuming and labor-intensive. Summary of the invention
[0004] The object of the present invention is to provide a method, device and electronic device for analyzing the composition of atmospheric aerosol microbial communities. This application is implemented as follows:
[0005] In the first aspect, the present application provides an analysis method for the composition of atmospheric aerosol microbial communities, including an algorithm determination stage and a data analysis stage. Among them: the algorithm determination stage includes: obtaining a microbial composition analysis algorithm and a high-throughput sequencing sequence template, the training samples in the high-throughput sequencing sequence template include supervised training samples and unsupervised training samples, and the supervised training samples include corresponding microbial species labels; for each training sample, the training sample is segmented to obtain multiple DNA information sequences of the training sample; based on the microbial composition analysis algorithm, the training sample and each DNA information sequence of the training sample are respectively implicitly represented and extracted to obtain the overall implicit representation array of the training sample and the sequence implicit representation array corresponding to each DNA information sequence; according to the microbial species label of the supervised training sample, each training sample in the high-throughput sequencing sequence template is segmented. The overall implicit representation array of is clustered to obtain the microbial species label corresponding to the unsupervised training sample; for each DNA information sequence of the training sample, the matching degree between the DNA information sequence and the training sample to which it belongs is determined according to the sequence implicit representation array corresponding to the DNA information sequence and the overall implicit representation array of the training sample to which the DNA information sequence belongs; according to the matching degree and the microbial species label corresponding to the unsupervised training sample, the algorithm parameter of the microbial composition analysis algorithm is optimized to obtain the target microbial composition analysis algorithm, which is used to perform microbial community species analysis on the target high-throughput sequencing sequence to obtain the microbial species label of the target high-throughput sequencing sequence. The data analysis stage includes: obtaining the target high-throughput sequencing sequence of the target atmospheric aerosol sample of the target area; wherein the target high-throughput sequencing sequence is a sequencing sequence obtained after DNA extraction, polymerase chain reaction amplification, and high-throughput sequencing of the target atmospheric aerosol sample; loading the target high-throughput sequencing sequence into the target microbial composition analysis algorithm to obtain the microbial species label of the target atmospheric aerosol sample.
[0006] In a second aspect, the present application provides an analysis device for the composition of atmospheric aerosol microbial communities, comprising an algorithm training module and a data analysis module, wherein: the algorithm training module comprises: a template acquisition module, used to acquire a microbial composition analysis algorithm and a high-throughput sequencing sequence template, wherein the training samples in the high-throughput sequencing sequence template include supervised training samples and unsupervised training samples, and the supervised training samples include corresponding microbial species labels; a data segmentation module, used to segment each training sample to obtain multiple DNA information sequences of the training sample; a feature extraction module, used to perform implicit representation extraction on the training sample and each DNA information sequence of the training sample based on the microbial composition analysis algorithm, to obtain the overall implicit representation array of the training sample and the sequence implicit representation array corresponding to each DNA information sequence; a cluster analysis module, used to extract the implicit representation array of the training sample and the sequence implicit representation array corresponding to each DNA information sequence according to the monitoring information; The invention relates to a method for determining the microbial species label of the unsupervised training sample, performing cluster analysis on the overall implicit representation array of each training sample in the high-throughput sequencing sequence template, and obtaining the microbial species label corresponding to the unsupervised training sample; a commonality determination module, which is used to determine the matching degree between the DNA information sequence and the training sample to which it belongs, for each DNA information sequence of the training sample, according to the sequence implicit representation array corresponding to the DNA information sequence and the overall implicit representation array of the training sample to which the DNA information sequence belongs; an algorithm optimization module, which is used to optimize the algorithm parameters of the microbial composition analysis algorithm according to the matching degree and the microbial species label corresponding to the unsupervised training sample, and obtain a target microbial composition analysis algorithm, wherein the target microbial composition analysis algorithm is used to perform microbial community species analysis on the target high-throughput sequencing sequence, and obtain the microbial species label of the target high-throughput sequencing sequence. The data analysis module includes: a data acquisition module, used to acquire a target high-throughput sequencing sequence of a target atmospheric aerosol sample in a target area; wherein the target high-throughput sequencing sequence is a sequencing sequence obtained after DNA extraction from the target atmospheric aerosol sample, polymerase chain reaction amplification, and high-throughput sequencing; a marker determination module, used to load the target high-throughput sequencing sequence into the target microbial composition analysis algorithm to obtain the microbial species marker of the target atmospheric aerosol sample.
[0007] In a third aspect, the present application provides an electronic device comprising: one or more processors; a memory; one or more computer programs; wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, and when the one or more computer programs are executed by the processors, the method as described above is implemented.
[0008] Beneficial effects of the present application: In the scheme of the present application, only a few supervised training samples are needed to complete the debugging of the algorithm, and there is no need to consume too much cost for sample labeling; based on some supervised training samples, virtual labels of unsupervised training samples are generated based on cluster analysis, so as to train the algorithm based on unlabeled samples, that is, unsupervised training samples, and at the same time, the integration and sequence matching are combined, so that the disturbance information of the virtual labels obtained by cluster analysis can be processed, so that the virtual labels have higher quality, so as to increase the training quality of the algorithm, thereby obtaining accurate species analysis results. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.
[0010] Figure 1 This is a flow chart of a method for analyzing the composition of atmospheric aerosol microbial communities provided in an embodiment of the present application.
[0011] Figure 2 It is a schematic diagram of the functional module architecture of the device for analyzing the composition of atmospheric aerosol microbial communities provided in an embodiment of the present application.
[0012] Figure 3 It is a schematic diagram of the composition of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0013] The subject of the analysis method of atmospheric aerosol microbial community composition in the embodiment of the present application is an electronic device, including but not limited to a server, a personal computer, a laptop computer, a tablet computer, a smart phone, etc. Figure 1 As shown, the method includes an algorithm determination phase and a data analysis phase, wherein:
[0014] The algorithm determination phase includes the following steps:
[0015] Step S100: obtaining a microbial composition analysis algorithm and a high-throughput sequencing sequence template, wherein the training samples in the high-throughput sequencing sequence template include supervised training samples and unsupervised training samples, and the supervised training samples include corresponding microbial species labels.
[0016] In step S100, the electronic device obtains a microbial composition analysis algorithm and collects high-throughput sequencing sequence templates containing supervised and unsupervised training examples. The microbial composition analysis algorithm is designed based on machine learning or deep learning principles, and aims to extract information on the composition of microbial communities from high-throughput sequencing data. Specifically, the algorithm can adopt advanced architectures such as convolutional neural networks (CNN), recurrent neural networks (RNN), or Transformer models based on attention mechanisms to adapt to processing complex and high-dimensional DNA sequence data.
[0017] Taking the convolutional neural network as an example, the algorithm contains multiple convolutional layers for automatically extracting local features in DNA sequences (such as specific k-mer patterns); pooling layers for dimensionality reduction and computational reduction; and fully connected layers for integrating these features and outputting the final classification results of microbial species. The training and optimization process of the algorithm (although this step is performed after S100) continuously adjusts the network weights to minimize the prediction error.
[0018] Next, the electronic device constructs a high-throughput sequencing sequence template containing supervised training examples and unsupervised training examples. High-throughput sequencing technology allows a large number of DNA fragments to be sequenced in parallel in a short time, generating massive amounts of sequence data, which is the basis for analyzing the composition of microbial communities.
[0019] Supervised training examples are sequencing datasets that have been clearly labeled with microbial species information. For example, a supervised training example may contain DNA samples from a specific environment (such as urban atmospheric aerosols), which have been identified by traditional microbial identification methods (such as PCR amplification and sequencing, mass spectrometry, etc.) to determine the types of microorganisms and their relative abundance. In the dataset, each sample corresponds to one or more microbial species markers, which exist in the form of labels or classification vectors, such as [0, 1, 0, 1, 0], which means that the sample only contains the second and fourth microorganisms.
[0020] Specifically for the scenario of atmospheric aerosol microbial community analysis, supervised training examples may come from previous research projects or public databases, such as NCBI's SRA (Sequence Read Archive) database. These examples not only provide DNA sequence data, but also come with detailed microbial classification information, which is an indispensable and valuable resource in the early stages of algorithm training.
[0021] Unlike supervised training samples, unsupervised training samples only contain DNA sequence data obtained by high-throughput sequencing without clear microbial species labels. These samples usually come from a wider range of environmental sample collections, and their number may far exceed that of supervised training samples, but due to the high cost of labeling, they cannot be directly used for algorithm training. However, through the cluster analysis and virtual label generation technology in step S400, electronic devices can use a small amount of supervised information to indirectly label these unsupervised samples, thereby greatly expanding the scale of training data.
[0022] For example, assuming that for the analysis of microbial communities in urban atmospheric aerosols, the electronic device downloaded 100 labeled samples from the SRA database of NCBI as supervised training examples. Each sample contains about 100,000 DNA sequence fragments, and each sequence fragment is about 150bp long. These samples cover common urban atmospheric microbial species, such as bacteria, fungi, and viruses, and each microorganism is assigned a unique species label. At the same time, in order to increase the diversity of training data, the electronic device also downloaded another 1,000 unlabeled atmospheric aerosol samples from the same source as unsupervised training examples. These samples also contain a large amount of DNA sequence data, but due to the lack of clear species information, they cannot be directly used for algorithm training.
[0023] In step S100, the electronic device integrates these data into a high-throughput sequencing sequence template, which includes both labeled supervised training samples and unsupervised training samples to be labeled.
[0024] Step S200: For each training sample, segment the training sample to obtain multiple DNA information sequences of the training sample.
[0025] Step S200 pre-processes the training sample data obtained by high-throughput sequencing so that the subsequent steps can more effectively perform implicit representation extraction and microbial species analysis. In this step, the electronic device performs a segmentation operation on each training sample, thereby splitting it into multiple smaller DNA information sequences. High-throughput sequencing technology can generate a large amount of DNA sequence data, which usually exists in the form of long reads or short reads. For the analysis of the composition of atmospheric aerosol microbial communities, since the sample may contain a variety of microorganisms and their DNA sequence lengths and compositions are different, directly analyzing the entire training sample may face problems such as high computational complexity and difficulty in feature extraction. By segmenting the training samples, the electronic device can simplify the complex data set into a series of smaller, easier-to-process DNA information sequences, thereby improving the efficiency and accuracy of subsequent analysis.
[0026] In step S200, the electronic device performs segmentation processing on the training sample according to the following steps: First, the electronic device reads the training sample data to be processed from the storage medium. These data are usually stored in FASTA or FASTQ format and contain a large amount of DNA sequence information. Next, the electronic device determines the length of each segment (i.e., DNA information sequence). This length can be set according to specific project requirements and environmental characteristics. For example, in the scenario of atmospheric aerosol microbial community analysis, considering that the genome sizes of different microorganisms vary greatly, a moderate segment length (such as 100bp, 200bp or longer) can be selected to ensure that each segment contains enough genetic information for subsequent analysis. Once the segment length is determined, the electronic device can start to perform the segmentation operation. Specifically, it will traverse the DNA sequence of the entire training sample and cut it according to the set length. If the sequence length is not an integer multiple of the segment length, the last segment may be shorter than the set length. In order to maintain data consistency, the electronic device can choose to discard this shorter segment, or keep it and give it appropriate processing in subsequent analysis. After the segmentation operation, the electronic device will obtain a set consisting of multiple DNA information sequences. These sequences will serve as input data for subsequent steps (such as implicit representation extraction, cluster analysis, etc.).
[0027] For example, suppose a training sample of a microbial sample from urban atmospheric aerosol has a total DNA sequence length of 1,000,000 bp. In order to perform microbial community composition analysis, the electronic device decides to divide the training sample into multiple DNA information sequences of 200 bp in length.
[0028] The electronic device first reads the FASTA file of the training sample to obtain the complete DNA sequence data. According to the analysis requirements, the electronic device sets the segment length to 200bp. The electronic device starts from the first nucleotide of the DNA sequence and reads 200 nucleotides continuously as a DNA information sequence. Then, it moves to the next position (i.e., the 201st nucleotide) and reads 200 nucleotides continuously again as the next DNA information sequence. This process is repeated until the entire DNA sequence is traversed. If the last segment length is less than 200bp, the electronic device can choose to discard it (in this case, since the total length is 1,000,000bp, the last segment will be a complete 200bp and does not need to be discarded). After the segmentation operation, the electronic device obtains a set of 5,000 DNA information sequences (1,000,000bp÷200bp=5,000). These sequences will be used in the subsequent implicit representation extraction and microbial species analysis steps. Through the segmentation operation of step S200, the electronic device simplifies the complex high-throughput sequencing data into a series of smaller and easier-to-process DNA information sequences. This not only reduces the complexity of subsequent analysis, but also improves the flexibility and accuracy of data processing. More importantly, the segmented DNA information sequence retains the genetic information in the original sequence, allowing electronic devices to effectively extract the characteristics of microbial community composition in subsequent steps, thereby achieving accurate species classification and abundance estimation.
[0029] Step S300: Based on the microbial composition analysis algorithm, implicit representations are extracted for the training samples and the DNA information sequences of the training samples respectively to obtain the overall implicit representation array of the training samples and the sequence implicit representation array corresponding to each DNA information sequence.
[0030] Step S300 uses a microbial composition analysis algorithm to perform implicit representation extraction on the training samples and their respective DNA information sequences to obtain an overall implicit representation array and a sequence implicit representation array that can reflect the composition characteristics of the microbial community. Implicit representation (also called embedded representation or feature vector) is a method of converting raw data (such as DNA sequences) into points in a high-dimensional space that can capture the intrinsic relationships and structures between the data. In the scenario of atmospheric aerosol microbial community composition analysis, implicit representation can reveal the similarities and differences between different microbial species, thereby providing strong support for subsequent species classification and abundance estimation.
[0031] In step S300, the electronic device selects a microbial composition analysis algorithm to extract implicit representations. This algorithm can be based on traditional machine learning methods (such as support vector machines, random forests, etc.) or deep learning methods (such as convolutional neural networks CNN, recurrent neural networks RNN or Transformer models). Considering the complexity and high dimensionality of DNA sequence data, deep learning algorithms are more popular due to their powerful feature extraction capabilities. Taking the Transformer model as an example, the model can capture the dependencies between different positions in the DNA sequence through the self-attention mechanism, thereby generating richer implicit representations. During the training process, the model learns how to map the original DNA sequence data into a high-dimensional space, so that similar sequences are closer in space, while dissimilar sequences are farther away.
[0032] After determining the microbial composition analysis algorithm, the electronic device will perform implicit representation extraction on the training samples and their individual DNA information sequences according to the following steps:
[0033] First, the training samples and their DNA information sequences are preprocessed as necessary, such as removing low-quality sequences, removing linker sequences, quality pruning, etc., to ensure the quality of the input data. The pre-trained microbial composition analysis algorithm model (such as the Transformer model) is loaded and initialized or fine-tuned as needed. For each training sample (i.e., a data set consisting of multiple DNA information sequences), the electronic device inputs it into the model as a whole. The model is processed by a multi-layer self-attention mechanism and a feedforward neural network, and finally outputs a fixed-length vector as the overall implicit representation array of the training sample. This vector can capture the comprehensive characteristics of all DNA information sequences in the training sample.
[0034] For example, suppose a training example contains 100 DNA information sequences, each of which is 200 bp long. After being processed by the Transformer model, the training example is mapped to a 128-dimensional implicit space, resulting in a 128-dimensional overall implicit representation array. Next, the electronic device extracts the implicit representation for each DNA information sequence separately. This is usually done by passing a single sequence as input to the model. The model also outputs a fixed-length vector as the implicit representation array of the sequence. This process is repeated until all DNA information sequences have been processed. Continuing with the above example, each 200 bp DNA information sequence is also mapped to the same 128-dimensional implicit space after being processed by the Transformer model, resulting in a corresponding 128-dimensional sequence implicit representation array. Finally, the electronic device collects the overall implicit representation array of all training examples and the sequence implicit representation array of all DNA information sequences separately, and constructs them into two independent sets. These two sets will serve as input data for subsequent steps.
[0035] After obtaining the overall implicit representation array and the sequence implicit representation array, the electronic device can use them to perform a variety of analyses. For example: by calculating the distance between the overall implicit representation arrays of different training samples (such as Euclidean distance, cosine similarity, etc.), similar training samples can be grouped together to reveal the structural relationship between different microbial communities. By comparing the similarity between the sequence implicit representation array of the DNA information sequence and the overall implicit representation array of the training sample to which it belongs (such as cosine similarity), the degree of match between the sequence and the whole can be evaluated, which is crucial for subsequent species classification and abundance estimation. During the algorithm training process, the electronic device can adjust the parameters of the model according to the quality of the implicit representation (such as evaluated by calculating the loss function) to optimize the performance of the microbial composition analysis algorithm.
[0036] Step S400: According to the microbial species labels of the supervised training samples, cluster analysis is performed on the overall implicit representation array of each training sample in the high-throughput sequencing sequence template to obtain the microbial species labels corresponding to the unsupervised training samples.
[0037] Step S400 uses the microbial species labeling information of the supervised training samples to assign corresponding microbial species labels to the unsupervised training samples through cluster analysis. This process not only expands the scope of labeled data, but also improves the accuracy and reliability of subsequent analysis.
[0038] Cluster analysis is an unsupervised learning method that groups data points into multiple clusters based on their similarity or distance. In the scenario of atmospheric aerosol microbial community analysis, each data point represents an overall implicit representation array of a training sample, which is obtained through step S300 and can reflect the characteristics of the microbial community in the training sample. The goal of cluster analysis is to group similar training samples into a group, each group representing a specific microbial community type.
[0039] In step S400, the electronic device uses the microbial species labels of the supervised training samples as "anchors", which are known and accurate microbial community classification information. Through cluster analysis, the electronic device can identify unsupervised training samples similar to these supervised samples and classify them into corresponding microbial community types. In this way, even if the unsupervised training samples themselves have no label information, reliable microbial species labels can be obtained through cluster analysis.
[0040] Specifically, the electronic device first initializes a cluster center for each known microbial community type based on the microbial species label of the supervised training sample. The cluster center can be the average or median of the overall implicit representation array of the supervised training sample, or it can be a representative sample selected by a certain optimization algorithm (such as K-means++). Next, the electronic device traverses all unsupervised training samples in the high-throughput sequencing sequence template and calculates their distances from each cluster center (such as Euclidean distance, cosine similarity, etc.). Each unsupervised training sample is assigned to the microbial community type corresponding to the cluster center closest to it. After the assignment is completed, the electronic device recalculates the center position of each cluster based on the overall implicit representation array of all training samples (including supervised and unsupervised) in the current cluster. This step is iterative until the position of the cluster center no longer changes significantly or reaches a preset number of iterations. During the iteration process, the electronic device can evaluate the quality of the cluster, for example, by calculating the silhouette coefficient to evaluate the compactness and separation of the cluster. The closer the silhouette coefficient is to 1, the better the cluster quality. After multiple iterations, the cluster analysis converges, and the electronic device outputs the microbial species label corresponding to each unsupervised training sample. These labels are automatically assigned based on cluster analysis results, with high accuracy and reliability. For example, suppose there are the following overall implicit representation arrays of supervised training examples and unsupervised training examples (simplified in the form of two-dimensional vectors):
[0041] Supervised training examples (with known microbial species labels): Sample A: [0.5, 0.8] (labeled as “community X”); Sample B: [-0.2, 1.1] (labeled as “community Y”).
[0042] Unsupervised training examples (unlabeled): Example C: [0.4, 0.9]; Example D: [-0.1, 1.0].
[0043] In the initialization phase, the electronic device initializes the cluster centers for "cluster X" and "cluster Y" respectively according to the overall implicit representation arrays of supervised training examples A and B. Assume that the initial centers are [0.5, 0.8] and [-0.2, 1.1] respectively.
[0044] In the assignment phase, the electronic device calculates the distances between samples C and D and the centers of the two clusters. Assume that sample C is closer to the center of "cluster X" and is therefore assigned to "cluster X"; similarly, sample D is closer to the center of "cluster Y" and is therefore assigned to "cluster Y".
[0045] In the update phase, the electronic device recalculates the cluster center based on all the training examples in the current cluster. Since there are only two supervised training examples and two unsupervised training examples in this simplified example, and the unsupervised training examples have been successfully assigned to the correct cluster, the cluster center may not change significantly. However, in actual applications, as the number of unsupervised training examples increases and the number of iterations increases, the cluster center will gradually converge to a more stable position.
[0046] Finally, in the output stage, the electronic device outputs the microbial species labels of samples C and D as "community X" and "community Y", respectively. These labels are automatically assigned based on the cluster analysis results, providing reliable data support for the subsequent analysis of atmospheric aerosol microbial community composition.
[0047] Step S400 effectively utilizes the microbial species labeling information of the supervised training samples through the cluster analysis method, and assigns corresponding microbial species labels to the unsupervised training samples. This process not only expands the scope of the labeled data, but also improves the accuracy and reliability of subsequent analysis.
[0048] Step S500: for each DNA information sequence of the training sample, determine the matching degree between the DNA information sequence and the training sample to which it belongs according to the sequence implicit representation array corresponding to the DNA information sequence and the overall implicit representation array of the training sample to which the DNA information sequence belongs.
[0049] Step S500 evaluates the matching degree between each DNA information sequence in the training sample and the training sample to which it belongs. This process not only helps to verify the effectiveness of implicit representation extraction, but also provides key information for subsequent algorithm optimization.
[0050] In the analysis of atmospheric aerosol microbial community composition, each training sample usually contains hundreds or thousands of DNA information sequences, which together reflect the genetic characteristics of the microbial community in the sample. However, due to noise in the sequencing process, sequence splicing errors, or the diversity of microbial species, some DNA information sequences may not be completely consistent with the characteristics of the overall sample. Therefore, evaluating the match between the DNA information sequence and the training sample to which it belongs is crucial to ensure the accuracy and reliability of the analysis. In step S500, the electronic device calculates the match between them by comparing the sequence implicit representation array of the DNA information sequence with the overall implicit representation array of the training sample to which it belongs. This process involves multiple steps, including the construction of feature space, the selection of similarity metrics, and a comprehensive evaluation of the match.
[0051] First, the electronic device ensures that the overall implicit representations of all DNA information sequences and training examples are in the same feature space. This usually means that their implicit representation arrays should have the same dimensions and consistent metrics. In step S300, the corresponding implicit representation arrays have been generated for each DNA information sequence and training example by the microbial composition analysis algorithm (such as the Transformer model). These arrays are located in a high-dimensional feature space as feature vectors.
[0052] Next, the electronic device selects a suitable similarity metric to compare the implicit representation array of the DNA information sequence with the overall implicit representation array of the training example. Common similarity metrics include Euclidean distance, cosine similarity, Pearson correlation coefficient, etc. In the scenario of atmospheric aerosol microbial community analysis, since the implicit representation array may contain complex nonlinear relationships, cosine similarity becomes a reasonable choice due to its normalization property of vector length.
[0053] The calculation formula for cosine similarity is: Among them, A and B represent the sequence implicit representation array of the DNA information sequence and the overall implicit representation array of the training examples respectively, A·B represents their dot product, and ||A|| and ||B|| represent their Euclidean lengths respectively.
[0054] Simply calculating a single similarity value may not be enough to fully reflect the degree of match between the DNA information sequence and the training sample. Therefore, the electronic device may adopt a more complex evaluation strategy to integrate multiple factors. For example, the following steps are performed: First, verify whether the sequence implicit representation of the DNA information sequence is consistent with the overall implicit representation of the training sample to which it belongs in terms of key features. This can be achieved by comparing the values of the two on a specific dimension, or by checking whether their projections in some predefined subspaces are similar. Assign a confidence score to the sequence implicit representation of each DNA information sequence, which reflects the degree of contribution of the representation to the overall sample characteristics. Confidence can be determined by a variety of factors, such as sequence length, sequencing depth, sequencing quality, etc. This confidence score is then incorporated into the calculation of the match, affecting the final result in a weighted manner. Analyze the match between the DNA information sequence and the training sample at different scales. For example, comparisons can be made at multiple levels such as single nucleotides, k-mer fragments, genes, or operators to obtain a more comprehensive match evaluation. For example, suppose there is an overall implicit representation array of a training sample V sample =[v1, V2, ..., v n ], where the implicit representation array of a DNA information sequence is V seq =[s1,s2,...,s n ]. The matching degree between them can be calculated by following the steps below: First, use the cosine similarity formula to calculate V sample and V seq The similarity value between cos(V seq , V sample ). Assume that a confidence score c is assigned to this DNA information sequence (determined based on its sequencing quality and other factors). Then the weighted matching degree can be expressed as c×cos(V seq , V sample ). In addition, the above steps can be repeated at different scales, such as first comparing the representation of a single nucleotide, then comparing the representation of the k-mer fragment, and finally integrating the matching results of each scale. Through the matching evaluation of step S500, the electronic device can identify DNA information sequences that are inconsistent with the overall sample characteristics. These sequences may be outliers caused by sequencing errors, splicing errors or microbial diversity. In subsequent steps, this information can be used for further data cleaning, anomaly detection or algorithm optimization, thereby improving the accuracy and reliability of the analysis of atmospheric aerosol microbial community composition.
[0055] Step S600: According to the matching degree and the microbial species label corresponding to the unsupervised training sample, the algorithm parameters of the microbial composition analysis algorithm are optimized to obtain the target microbial composition analysis algorithm. The target microbial composition analysis algorithm is used to perform microbial community species analysis on the target high-throughput sequencing sequence to obtain the microbial species label of the target high-throughput sequencing sequence.
[0056] Step S600 optimizes the parameters of the microbial composition analysis algorithm according to the matching degree calculated in the previous step and the virtual microbial species labels of the unsupervised training samples, so as to obtain a more accurate and efficient target algorithm.
[0057] In step S600, the electronic device optimizes the parameters of the microbial composition analysis algorithm so that the algorithm can more accurately assign microbial species labels to high-throughput sequencing sequences. To achieve this goal, the electronic device needs to comprehensively consider multiple factors, including the real labels of supervised training samples, the virtual labels of unsupervised training samples, and the matching degree between the DNA information sequence and the overall sample.
[0058] The optimization process includes the following steps: defining the loss function, calculating the loss value, and updating the parameters by gradient descent or back propagation. The loss function is the key to the optimization process, which quantifies the degree of inconsistency between the algorithm's predicted results and the actual results. In the analysis of atmospheric aerosol microbial communities, the loss function can be designed as a weighted sum that considers both classification error and matching error.
[0059] Assume that Y is the real microbial species marker set of supervised training samples, Y^ is the microbial species marker set predicted by the algorithm, M is the virtual microbial species marker set of unsupervised training samples, and P is the matching degree set between the DNA information sequence and the training samples to which it belongs. The loss function L can be defined as:
[0060] in, is the cross entropy loss on the supervised training examples, which is used to measure the classification error; is the mean squared error loss on the unsupervised training examples, which is used to measure the prediction error of the virtual labels; It is based on the prediction results of the algorithm for unsupervised samples; It is the mean square error loss of the matching error, which is used to measure the consistency of the matching between the DNA information sequence and the training sample to which it belongs; It can be the target value or expected value of the matching degree; α, β, γ are weight coefficients used to balance the importance of different loss terms. After defining the loss function, the electronic device optimizes the parameters of the microbial composition analysis algorithm in an iterative manner to minimize the loss function value. This usually involves gradient descent or back propagation algorithms.
[0061] Taking the gradient descent algorithm as an example, the optimization process is as follows:
[0062] 1. Initialize parameters: First, all parameters of the algorithm (such as weights and biases in neural networks) are randomly initialized.
[0063] 2. Forward propagation: Input the training samples (including supervised and unsupervised samples) into the microbial composition analysis algorithm under the current parameter variables, perform forward propagation calculations, and obtain the predicted microbial species labels and matching degrees.
[0064] 3. Calculate the loss: Calculate the loss function L based on the results of the forward propagation and the real label, virtual label, and matching target value.
[0065] 4. Back propagation: Calculate the gradient of the loss function with respect to each parameter using the chain rule. These gradients indicate how the parameters should be adjusted to reduce the loss value.
[0066] 5. Update parameters: Update the value of each parameter according to the calculated gradient and the predetermined learning rate. Common update rules include SGD (stochastic gradient descent), Adam, etc.
[0067] 6. Iterative optimization: Repeat steps 2 to 5 above until the loss function value converges to a sufficiently small range, or the preset number of iterations is reached.
[0068] For example, suppose that during the optimization process, the electronic device finds that a certain weight w has a greater impact on the virtual label prediction of the unsupervised training examples. In one round of iteration, the loss function value calculated by forward propagation is L current , the gradient of w is obtained through back propagation calculation: Based on this gradient, the electronic device updates the value of w according to a predetermined learning rate η: The updated weight w new It is used in the forward propagation calculation of the next round of iteration in the hope of obtaining a smaller loss function value.
[0069] Through the optimization process of step S600, the electronic device can gradually adjust the parameters of the microbial composition analysis algorithm, so that the algorithm is more accurate and efficient in predicting microbial species markers. This optimization process not only takes into account the real marker information of the supervised training samples, but also makes full use of the virtual markers of the unsupervised training samples and the matching degree information between the DNA information sequence and the training samples to which it belongs, thereby improving the generalization ability and robustness of the algorithm.
[0070] Through the above steps S100 to S600, the training of the target microbial composition analysis algorithm is completed. The data analysis phase is described below, which specifically includes the following steps:
[0071] Step S700: Obtain a target high-throughput sequencing sequence of a target atmospheric aerosol sample in a target area; wherein the target high-throughput sequencing sequence is a sequencing sequence obtained after DNA extraction from the target atmospheric aerosol sample, polymerase chain reaction amplification, and high-throughput sequencing.
[0072] In step S700, the electronic device is responsible for obtaining the target atmospheric aerosol samples of the target area, and processing these samples through a series of molecular biology techniques, and finally obtaining the target high-throughput sequencing sequence for subsequent analysis. First, the electronic device clearly defines the target area for analysis, which is usually determined based on factors such as research purposes, environmental factors or specific health concerns. For example, the target area may be an urban area, an industrial area, a farmland or a nature reserve. Once the target area is determined, it is necessary to collect atmospheric aerosol samples in the area. Atmospheric aerosol samples are usually collected using professional sampling equipment, such as atmospheric particle samplers, which can collect suspended particles in the air. During the sampling process, the device automatically collects a certain volume of aerosol particles in the air according to the preset flow rate and time. The collected samples are usually stored in sterile containers and immediately refrigerated or frozen to prevent the loss of microbial activity.
[0073] Next, the electronic equipment guides the experimenters to extract the DNA of microorganisms from the collected atmospheric aerosol samples. This step is the basis for subsequent molecular biological analysis. The DNA extraction process usually involves physical and chemical methods aimed at breaking the cell walls of microorganisms, releasing and purifying the DNA inside the cells.
[0074] In actual operation, commonly used DNA extraction methods include chemical lysis, physical fragmentation or commercial DNA extraction kits. For example, a DNA extraction kit containing cell lysis solution, proteinase K and washing buffer can be used. The experimenter adds the sample to the lysis solution, and breaks the microbial cells by heating and shaking to release DNA. Subsequently, impurities are removed by centrifugation and washing steps, and finally a relatively pure microbial DNA solution is obtained.
[0075] Since the content of microorganisms in atmospheric aerosol samples is often very low, direct high-throughput sequencing may not be able to obtain sufficient sequence information. Therefore, before sequencing, the extracted DNA is usually amplified by polymerase chain reaction (PCR) to increase the number of target DNA fragments.
[0076] PCR is a method for rapid in vitro amplification of specific DNA fragments. It uses DNA polymerase under specific temperature conditions to synthesize a DNA chain complementary to the template, using a single strand of DNA as a template and a primer as a starting point. In the analysis of atmospheric aerosol microbial communities, commonly used PCR primers are designed for conservative sequences such as the microbial 16S rRNA gene or ITS (internal transcribed spacer). These sequences exist in most microorganisms and have little difference, making them suitable as amplification targets.
[0077] For example, for bacterial community analysis, universal primers targeting the V3-V4 region of the 16S rRNA gene can be selected for PCR amplification. The amplified product will contain a large number of repeated 16S rRNA gene fragments, which represent the presence of different bacterial species in the sample.
[0078] The DNA fragments amplified by PCR need to be sequenced with high throughput to obtain detailed sequence information. High throughput sequencing technology can sequence millions or even billions of DNA fragments in parallel in a short period of time, greatly improving sequencing efficiency and data volume.
[0079] In the scenario of atmospheric aerosol microbial community analysis, commonly used high-throughput sequencing platforms include Illumina's MiSeq, HiSeq or NovaSeq. These platforms use the principle of sequencing by synthesis to fix DNA fragments on the chip and perform cycle sequencing by adding fluorescently labeled dNTPs (deoxyribonucleoside triphosphates). In each cycle, only specific dNTPs can bind to the end of the DNA chain and release fluorescent signals. These signals are captured by optical detection electronic devices to determine the base type at that position.
[0080] After multiple sequencing cycles, electronic devices collect and analyze all fluorescent signals and piece them together into complete DNA sequences, which contain the genetic information of the microbial community in the sample and serve as the basis for subsequent bioinformatics analysis.
[0081] Finally, the electronic device performs quality control and filtering on the raw sequencing data (usually in FASTQ format) output by the high-throughput sequencing platform to remove low-quality sequences, adapter sequences, and duplicate sequences, etc. The cleaned data is used to generate a target high-throughput sequencing sequence set, which will be used as input data for subsequent bioinformatics analysis processes.
[0082] For example, assuming that the target area is an urban industrial area, the electronic device guides the experimenter to collect atmospheric aerosol samples in the area. Subsequently, the experimenter extracted microbial DNA from the samples using a commercial DNA extraction kit and designed specific primers for the V3-V4 region of the 16S rRNA gene for PCR amplification. After purification and quantification, the amplified product was sent to a high-throughput sequencing platform for sequencing. Ultimately, the electronic device collected and cleaned the sequencing data to generate a collection of millions of targeted high-throughput sequencing sequences that represent the genetic diversity of microbial communities in atmospheric aerosol samples in industrial areas.
[0083] Through the implementation of step S700, the electronic device converts the atmospheric aerosol samples in the target area into high-throughput sequencing sequence data that can be used for subsequent bioinformatics analysis, laying a data foundation for the subsequent analysis of the composition of the microbial community.
[0084] Step S800: Load the target high-throughput sequencing sequence into the target microbial composition analysis algorithm to obtain the microbial species markers of the target atmospheric aerosol sample.
[0085] In step S800, the electronic device loads the target high-throughput sequencing sequence collected and processed in the target area into the optimized and trained target microbial composition analysis algorithm to achieve species identification and labeling of the microbial community in the target atmospheric aerosol sample.
[0086] First, the electronic device retrieves and loads the target high-throughput sequencing sequences from a storage medium (such as a hard disk, server, or cloud storage). These sequences are obtained by DNA extraction, PCR amplification, and high-throughput sequencing of the target atmospheric aerosol sample in step S700, and contain the genetic information of the microbial community in the sample.
[0087] Next, the electronic device inputs the loaded target high-throughput sequencing sequence into the target microbial composition analysis algorithm. This algorithm is obtained through optimization training in step S600 and can accurately map the high-throughput sequencing sequence to a specific microbial species.
[0088] After the model completes the forward propagation, the electronic device will assign one or more microbial species labels to each target high-throughput sequencing sequence based on the prediction results of the output layer. This usually involves comparing the predicted probability or score with a preset threshold, or selecting the species with the highest probability as the label.
[0089] For example, suppose the target microbial composition analysis algorithm is based on a trained Transformer model that generates a predicted probability for each possible microbial species at the output layer. The electronic device can set a threshold (such as 0.5) and assign a species as a marker to the corresponding sequencing sequence only when the predicted probability of a species exceeds this threshold. If the predicted probabilities of multiple species exceed the threshold, the species with the highest probability can be selected as the main marker, or all species exceeding the threshold can be listed as multiple markers at the same time.
[0090] After obtaining the microbial species markers of all target high-throughput sequencing sequences, the electronic device can further conduct a comprehensive analysis of these markers to reveal the composition and structure of the microbial community in the target atmospheric aerosol sample. This includes calculating the relative abundance of different species, analyzing the co-occurrence relationship between species, and identifying dominant species or indicator species in the community.
[0091] For example, suppose the target atmospheric aerosol sample comes from an urban park area. After a series of processing, a data set containing 100,000 high-throughput sequencing sequences is obtained. The electronic device loads these sequences into a Transformer-based target microbial composition analysis algorithm. The algorithm outputs the predicted probability of the microbial species corresponding to each sequence, and assigns a microbial species label to each sequence according to a preset threshold (such as 0.5). Finally, the electronic device comprehensively analyzes these labels and finds that there are mainly three microbial species in the sample: A bacteria (relative abundance 40%), B fungi (relative abundance 30%) and C actinomycetes (relative abundance 20%), and the remaining species account for a low proportion. This result reveals the main components of the microbial community in the atmospheric aerosol in the urban park area.
[0092] In a feasible implementation, the above step S400, based on the microbial species labels of the supervised training samples, performs cluster analysis on the overall implicit representation array of each training sample in the high-throughput sequencing sequence template to obtain the microbial species labels corresponding to the unsupervised training samples, which may include:
[0093] Step S400A: setting a plurality of cluster centroids, and determining a commonality metric value between the overall implicit representation array of each training sample in the high-throughput sequencing sequence template and each cluster centroid;
[0094] Step S400B: for each training sample, according to the commonality metric and the microbial species label of the supervised training sample, determine the target cluster centroid that matches the training sample in each cluster centroid, and classify the training sample into the high-throughput sequencing sequence cluster corresponding to the target cluster centroid;
[0095] Step S400C: for the high-throughput sequencing sequence clusters corresponding to each cluster centroid, determine the training samples that meet the preset cluster centroid conditions in the high-throughput sequencing sequence clusters as updated cluster centroids;
[0096] Step S400D: Jump to the step of determining the commonality measurement value between the overall implicit representation array of each training sample in the high-throughput sequencing sequence template and each cluster centroid, and iteratively execute until the obtained cluster centroid meets the cluster analysis stopping requirement; determine the microbial species markers of the unsupervised training samples in the target high-throughput sequencing sequence cluster according to the microbial species markers of the supervised training samples in the target high-throughput sequencing sequence cluster corresponding to the cluster centroid that meets the cluster analysis stopping requirement.
[0097] Step S400 uses the microbial species labeling information of the supervised training examples to assign corresponding microbial species labels to the unsupervised training examples through a cluster analysis method. In this embodiment, step S400 is subdivided into four sub-steps (S400A to S400D) to achieve this goal.
[0098] In step S400A, the electronic device sets a plurality of cluster centroids, the number of which usually matches the number of microbial species to be analyzed. For example, if there are five major microbial species in the expected analysis, five cluster centroids are set. Initially, these centroids may be randomly selected or may be based on a heuristic algorithm (such as K-means++) to optimize the initial position.
[0099] Next, the electronic device calculates the commonality measure between the overall implicit representation array of each training example in the high-throughput sequencing sequence template and the centroids of each cluster. The commonality measure is used to evaluate the similarity or distance between the training example and the cluster centroid. Common commonality measures include Euclidean distance, Manhattan distance, cosine similarity, etc. In the scenario of atmospheric aerosol microbial community analysis, since the implicit representation array usually contains high-dimensional features, cosine similarity becomes a reasonable choice due to its normalization property of vector length.
[0100] For example, suppose there are three cluster centroids, denoted as C1, C2, and C3, and each centroid is a vector of the same dimension as the overall implicit representation array of the training sample. For example, C1 = [0.5, 0.3, -0.2, ...], where the ellipsis represents the value of other dimensions. At the same time, suppose there is an overall implicit representation array of a training sample X = [0.6, 0.25, -0.15, ...]. Using cosine similarity as the commonality measure, the calculation formula is:
[0101] Among them, C i X represents vector Ci The dot product of ||C i || and ||X|| represent their Euclidean lengths respectively. For each cluster centroid C1, C2, C3, the cosine similarity with X is calculated to obtain three commonality metrics. Calculation process example (taking C1 as an example):
[0102]
[0103] In step S400B, the electronic device determines a target cluster centroid for each training sample based on the commonality metric calculated in step S400A and the microbial species label of the supervised training sample, and classifies it into the high-throughput sequencing sequence cluster corresponding to the centroid. The principle of allocation is to select the cluster centroid with the highest commonality metric (for similarity metric) or the lowest (for distance metric) as the target centroid. If the training sample is a supervised training sample, its microbial species label will be used to verify the accuracy of the allocation result and may be used for centroid update in subsequent steps. For unsupervised training samples, although they do not have direct species labels, their allocation results will be based on the commonality metric with the cluster centroid. For example, continuing the example of the previous step, assuming that the calculated commonality metric is: the cosine similarity with C1 is 0.9, with C2 is 0.7, and with C3 is 0.8. Then the training sample X will be assigned to the sequence cluster corresponding to the cluster centroid C1 with the highest commonality metric. If X is a supervised training example and its known microbial species label is consistent with the species represented by C1, the assignment is successful; if not, it is necessary to adjust the position of the cluster centroid or reconsider the commonality measurement method.
[0104] In step S400C, the electronic device determines a new centroid position for the high-throughput sequencing sequence cluster corresponding to each cluster centroid. The new centroid position is usually calculated based on the average or median of the overall implicit representation array of all training samples in the cluster. However, in practical applications, in order to accelerate convergence and avoid the influence of outliers, more complex centroid update strategies may be adopted, such as weighted average or robust statistics-based methods. For supervised training samples, their microbial species labels can be used to guide the centroid update process, for example, by giving higher weights to supervised samples that are consistent with the species currently represented by the centroid. For unsupervised training samples, since they do not have direct species labels, they usually participate equally in the centroid update calculation with other supervised samples. For example, assuming that the sequence cluster corresponding to the cluster centroid C1 contains multiple training samples (including supervised and unsupervised samples), their overall implicit representation arrays are X1, X2, ..., X n The new centroid position C1' can be obtained by calculating the average value of these sample representation arrays: Here, n is the number of samples in the cluster.
[0105] In step S400D, the electronic device will repeat steps S400A to S400C until the stopping requirement of the cluster analysis is met. The stopping requirement may be based on multiple conditions, such as the change in the centroid position is less than a certain threshold, the number of iterations reaches a preset upper limit, or the variance within the cluster is reduced to an acceptable level. Once the cluster analysis converges, the electronic device will assign species labels to the unsupervised training samples based on the cluster centroid position that meets the stopping requirement and its corresponding supervised training sample microbial species label. Specifically, each unsupervised training sample will be labeled as the microbial species with the highest frequency of supervised training samples in the sequence cluster to which it belongs (or the species determined according to a certain weighting strategy). For example, suppose that after multiple iterations, the cluster analysis converges and a stable cluster centroid position is obtained. For each cluster centroid, the electronic device checks the supervised training samples in its corresponding sequence cluster and counts the frequency of occurrence of each microbial species. For example, in the sequence cluster corresponding to C1, the supervised samples of species A appear 80 times and species B appears 20 times. Therefore, the unsupervised training samples in the cluster will be labeled as species A. Ultimately, through this implementation, the electronic device assigns microbial species labels to all unsupervised training examples in the high-throughput sequencing sequence templates, which will be used for algorithm optimization and data analysis in subsequent steps.
[0106] As another implementation, step S400, based on the microbial species labels of the supervised training samples, cluster analysis is performed on the overall implicit representation array of each training sample in the high-throughput sequencing sequence template to obtain the microbial species labels corresponding to the unsupervised training samples, which may include:
[0107] Step S410: determining sample commonality measurement values between two training samples according to the overall implicit representation array of two training samples;
[0108] Step S420: generating a high-throughput sequencing sequence association map according to the sample commonality metric values, wherein the high-throughput sequencing sequence association map represents the correlation between each training sample;
[0109] Step S430: According to the high-throughput sequencing sequence association map, the microbial species labels of the supervised training samples are label-diffused to obtain the microbial species labels corresponding to the unsupervised training samples.
[0110] The above-mentioned another implementation of step S400 adopts a cluster analysis method based on graph theory, by constructing an association map of high-throughput sequencing sequences and using the microbial species labels of supervised training samples for label diffusion, thereby assigning corresponding species labels to unsupervised training samples.
[0111] In step S410, the electronic device calculates the sample commonality metric between each pair of training samples in the high-throughput sequencing sequence template. The commonality metric is used to quantify the similarity or distance between two training samples, and is the basis for constructing a high-throughput sequencing sequence association map. Common commonality metrics include Euclidean distance, Manhattan distance, cosine similarity, etc. In the scenario of atmospheric aerosol microbial community analysis, considering the high dimensionality and nonlinear characteristics of the implicit representation array, cosine similarity may be a more appropriate choice.
[0112] For example, suppose that the high-throughput sequencing sequence template contains N training examples, and the overall implicit representation array of each training example is a D-dimensional vector. For any two training examples i and j, their overall implicit representation arrays are represented as x i =[x i1 , x i2 , …, x iD ] and x j =[x j1 , x j2 , …, x jD ]. Using cosine similarity as the commonality measure, the calculation formula is:
[0113]
[0114] Among them, x i ·x j Represents vector x i and x j The dot product of ||x i || and ||x j || respectively represent vector x i and x j The Euclidean length of .
[0115] In step S420, the electronic device constructs an association map of the high-throughput sequencing sequence according to the sample commonality metric value calculated in step S410. The association map is an undirected graph in which nodes represent training samples and edges represent the correlation between training samples (i.e., the commonality metric value between them). The weight of the edge can be determined according to the commonality metric value. The higher the commonality metric value, the greater the weight of the edge, indicating that the correlation between the two training samples is closer. For example, assuming that the high-throughput sequencing sequence template contains 5 training samples (A, B, C, D, E), step S410 calculates the commonality metric value between them (expressed as cosine similarity). The electronic device can construct an association map based on these values, where: the node set is {A, B, C, D, E} and the edge set is determined according to the commonality metric value. For example, if the cosine similarity between A and B is 0.9, an edge with a weight of 0.9 is connected between nodes A and B. A threshold can be set to filter out edges with low commonality metrics, for example, only retaining edges with weights greater than a certain value (such as 0.7). The resulting association map intuitively shows the correlation between training examples and provides a basis for subsequent label diffusion steps.
[0116] In step S430, the electronic device uses the high-throughput sequencing sequence association map and the microbial species labels of the supervised training samples to assign species labels to the unsupervised training samples through the label diffusion algorithm. The basic idea of the label diffusion algorithm is to use the species label of the supervised training sample as the "source" and propagate the label to the unsupervised training sample through the edge in the association map (i.e., the correlation between the training samples). Label diffusion algorithms include, for example, algorithms based on heat conduction, algorithms based on random walks, and the like. In the scenario of atmospheric aerosol microbial community analysis, a suitable algorithm can be selected according to the specific situation. The following is an example of a label diffusion algorithm based on heat conduction. For example, assume that the association map contains supervised training samples A (species labeled M1), B (species labeled M2) and unsupervised training samples C, D, and E. The goal of the label diffusion algorithm is to assign species labels to C, D, and E based on the species labels of A and B and their correlation with C, D, and E.
[0117] The heat conduction-based marker diffusion algorithm usually includes the following steps:
[0118] 1. Initialization: Assign an initial label distribution vector to each training example (node). For supervised training examples, the label value of the corresponding species in its label distribution vector is 1, and the rest are 0; for unsupervised training examples, all elements of its label distribution vector are initialized to the same non-zero value (such as 1 / total number of species).
[0119] 2. Iterative diffusion: Iteratively update the label distribution vector of each training example according to the edges in the association graph (i.e., commonality measures or weights). The update rule usually involves weighted averaging the label distribution of neighboring nodes according to the weight of the edge, and may include a certain attenuation factor to prevent over-diffusion.
[0120] 3. Convergence judgment: Repeat the iterative diffusion process until the convergence condition is met (such as the change in the marker distribution vector is less than a certain threshold, the preset number of iterations is reached, etc.).
[0121] 4. Label assignment: After the iteration, the species label is assigned to the unsupervised training sample according to its label distribution vector. Usually, the species corresponding to the element with the largest value in the label distribution vector is selected as the species label of the training sample.
[0122] For example, in a simple example, there are three training examples A(M1), B(M2), and C (unsupervised), and the edge weights between A and C and between B and C are w_AC and w_BC respectively. Initially, the label distribution vector of A is [1, 0] (M1 is 1, M2 is 0), the label distribution vector of B is [0, 1], and the label distribution vector of C is [0.5, 0.5] (assuming there are two possible species). In the first iteration, the label distribution vector of C may be updated to As iterations proceed, the label distribution vector of C will gradually converge to a stable state, thereby assigning a final species label to it. Through this implementation, the electronic device can use the correlation between the microbial species label information of the supervised training examples and the high-throughput sequencing sequence to assign reasonable species labels to the unsupervised training examples.
[0123] As an implementation mode, the high-throughput sequencing sequence association map includes sample vertices corresponding to each training sample and connecting lines between sample vertices, where the connecting lines represent the correlation between two connected sample vertices; based on this, step S430, according to the high-throughput sequencing sequence association map, performs label diffusion on the microbial species labels of the supervised training samples to obtain the microbial species labels corresponding to the unsupervised training samples, which may include:
[0124] Step S431: performing label diffusion on the microbial species labels of the supervised training samples based on the connection lines between the sample vertices in the high-throughput sequencing sequence association map to determine the preliminary microbial species labels of the unsupervised training samples;
[0125] Step S432: For each unsupervised training sample, the preliminary microbial species label of the unsupervised training sample is repeatedly corrected according to the adjacent sample vertices in the high-throughput sequencing sequence association map of the unsupervised training sample until the label of the sample vertex in the high-throughput sequencing sequence association map is stable, and the microbial species label corresponding to the unsupervised training sample is obtained.
[0126] In step S431, the electronic device starts the label diffusion process according to the structure of the high-throughput sequencing sequence association map, that is, the sample vertices corresponding to each training sample and the connecting lines between them (indicating the correlation relationship). The supervised training samples already have clear microbial species labels, which will be propagated as seeds in the association map, affecting the label assignment of the unsupervised training samples connected to them. The specific implementation method of label diffusion can be based on a variety of algorithms, such as heat conduction-based algorithms, random walk-based algorithms, or graph-based label propagation algorithms. Here, the graph-based label propagation algorithm (Label Propagation Algorithm, LPA) is used as an example for explanation.
[0127] For example, suppose there are five sample vertices A, B, C, D, and E in the high-throughput sequencing sequence association map, where A and B are supervised training samples with microbial species labels M1 and M2, respectively, and C, D, and E are unsupervised training samples. The connecting lines in the association map represent the similarity or correlation between the sample vertices, and the higher the weight, the closer the relationship.
[0128] In LPA, each sample vertex maintains a label set (i.e., microbial species label set). Initially, the label sets of supervised samples A and B are {M1} and {M2}, respectively, and the label sets of unsupervised samples C, D, and E are empty or contain all possible species labels (depending on the specific implementation).
[0129] The diffusion process starts with supervised examples, A and B propagate their own labels to the unsupervised examples connected to them. Specifically, each unsupervised example updates its own label set according to the label distribution of its neighboring examples. For example, if C is connected to both A and B, and the weights of the connection lines from A and B to C are w_AC and w_BC respectively, then C's label set may be updated by taking a weighted average of these weights. However, in a simplified version of LPA, C may directly adopt the labels of most of its neighbors as its own label.
[0130] In a simple example, suppose that C's neighbors are only A and B, and w _ AC>w _ BC, then the preliminary label of C (microorganism species label) may be directly set to A's label M1, or some form of voting may be performed based on the weight, but here we simplify the process and directly use the label of the neighbor A with a larger weight.
[0131] After one round of diffusion, the unsupervised training examples obtain preliminary microbial species labels. However, these labels may be unstable because they are based on only one round of neighbor information propagation.
[0132] After step S431, although the unsupervised training samples obtain preliminary microbial species labels, these labels may not be accurate or stable. Therefore, in step S432, the electronic device repeatedly calibrates these preliminary labels until the labels of all sample vertices in the association map reach a stable state. The calibration process usually involves multiple iterations, and in each iteration each sample vertex updates its own label according to the current label of its neighbors. If the label of the sample vertex remains unchanged in multiple consecutive iterations, it is considered to have reached a stable state.
[0133] For example (continuing from the previous example), after the initial label assignment, suppose C is assigned A's label M1, but D is connected to both B and C, and the weight of the connection line between D and B is higher. In the first correction iteration, D may update its own label based on the labels of its neighbors (mainly B's M2 label), thereby changing the result of the initial assignment. As the iterations proceed, the label of each sample vertex is dynamically adjusted based on the labels of its neighbors. For example, if C's label changes in subsequent iterations due to other factors (such as interaction with other unsupervised samples), then D's label may also be updated again.
[0134] In practical applications, the specific implementation of the correction process may vary from algorithm to algorithm. In an extended version of LPA, each sample vertex updates its own label set based on the label distribution of its neighbors in each iteration. The update rule may involve weighted averaging, majority voting, or other complex decision mechanisms. In some cases, in order to prevent over-smoothing or maintain the diversity of labeling, some regularization terms or constraints may be introduced. For example, a threshold can be set to limit the amount of change in the label in each iteration; or a persistence parameter can be introduced to control the tendency of the sample vertex to retain its original label.
[0135] The iteration of the correction process will continue until a certain convergence condition is met. Convergence conditions include, for example: the labels of all sample vertices remain unchanged in multiple consecutive iterations; or the change in the overall label distribution is less than a preset threshold. After reaching the convergence state, the unsupervised training samples will obtain stable microbial species labels. These labels will be assigned based on the structure of the entire association map and the known information of the supervised training samples, thereby ensuring the accuracy and rationality of the labels.
[0136] Through the label diffusion and repeated correction process in step S430, the electronic device can effectively assign microbial species labels to unsupervised training samples, providing strong support for algorithm optimization and data analysis in subsequent steps. This process not only makes full use of the known information of the supervised training samples, but also takes into account the complex correlation between high-throughput sequencing sequences, thereby improving the accuracy and robustness of label assignment.
[0137] As an implementation manner, step S500, for each DNA information sequence of the training sample, according to the sequence implicit representation array corresponding to the DNA information sequence and the overall implicit representation array of the training sample to which the DNA information sequence belongs, determines the matching degree between the DNA information sequence and the training sample to which it belongs, which may include:
[0138] Step S510: generating an overall implicit representation array set according to the overall implicit representation array of each training example, and generating a sequence implicit representation array set according to the sequence implicit representation array of the DNA information sequence of each training example;
[0139] Step S520: for each training example, query the overall implicit representation array set for one or more matching overall implicit representation arrays that match the overall implicit representation array of the training example, and determine the pending label library of the training example according to the microbial species label of the training example to which the matching overall implicit representation array belongs;
[0140] Step S530: for each DNA information sequence of the training sample, one or more matching sequence implicit representation arrays matching the sequence implicit representation array of the DNA information sequence are searched in the sequence implicit representation array set, and the pending label library of the DNA information sequence is determined according to the microbial species label of the training sample to which the matching sequence implicit representation array belongs;
[0141] Step S540: Determine the degree of match between the DNA information sequence and the training sample to which it belongs based on the pending label library of the DNA information sequence and the pending label library of the training sample to which the DNA information sequence belongs.
[0142] In step S510, the electronic device generates two sets: a set of overall implicit representation arrays and a set of sequence implicit representation arrays according to the overall implicit representation arrays of each training example and the sequence implicit representation arrays of each DNA information sequence in each training example obtained in step S300. The two sets are used to store the overall feature representation of all training examples and the local feature representation of all DNA information sequences, respectively.
[0143] For example, suppose there are three training examples A, B, and C. Each training example is extracted through implicit representation to obtain a 128-dimensional overall implicit representation array. At the same time, each training example contains multiple DNA information sequences, and each sequence also corresponds to a 128-dimensional sequence implicit representation array.
[0144] The overall implicit representation array of training example A: V A =[v A1 , v A2 , …, v A128 ];
[0145] The overall implicit representation array of training example B: V B =[v B1 , v B2 , …, v B128 ];
[0146] The overall implicit representation array of training example C: V C =[v C1 , v C2 , …, v C128 ];
[0147] Put these overall implicit representation arrays into the overall implicit representation array set, and get the overall implicit representation array set = {V A , V B ,V C}; Similarly, for each DNA information sequence in the training example, a corresponding sequence implicit representation array set is also generated.
[0148] In step S520, the electronic device traverses the overall implicit representation array of each training sample in the overall implicit representation array set, and for each training sample, searches for one or more overall implicit representation arrays that match it in the set. The matching here can be determined based on a similarity metric (such as cosine similarity), that is, all other overall implicit representation arrays whose similarity with the overall implicit representation array of the current training sample exceeds a certain threshold are found. Then, based on the microbial species labels of the training samples to which these matching overall implicit representation arrays belong, a pending label library of the current training sample is constructed. The pending label library contains all labels that may belong to the same microbial species as the current training sample. For example, suppose the overall implicit representation array V of training sample A is compared. A With the other overall implicit representation arrays in the collection, we find that V B The similarity is high (for example, the cosine similarity is greater than 0.9). At the same time, it is assumed that the microbial species of training sample B to which VB belongs is labeled as community X. Therefore, the undetermined label library of training sample A can be preliminarily determined as {"community X"}. If there are other overall implicit representation arrays that are similar to V AIf the training samples to which they belong have different microbial species labels, these labels will also be added to the library of pending labels.
[0149] Step S530 is similar to step S520, but this step is performed for each DNA information sequence in each training sample. The electronic device traverses each sequence implicit representation array in the sequence implicit representation array set, and for each DNA information sequence, searches the set for one or more sequence implicit representation arrays that match it. The matching here is also determined based on the similarity metric. Then, based on the microbial species labels of the training samples to which these matching sequence implicit representation arrays belong, a library of pending labels for the current DNA information sequence is constructed. The library of pending labels contains all labels that may belong to the same microbial species as the current DNA information sequence. For example, suppose there is a DNA information sequence S1 in training sample A, and its sequence implicit representation array is s1=[s 11 ,s 12 ,…,s 128 ]. The electronic device compares s1 with other arrays in the sequence implicit representation array set and finds that it has a high similarity with the sequence implicit representation array of a DNA information sequence from training sample B. Since the microbial species of training sample B is known to be labeled "community X", the undetermined label library of DNA information sequence S1 can also be preliminarily determined as {"community X"}.
[0150] In step S540, the electronic device comprehensively considers the pending tag library of the DNA information sequence and the pending tag library of the training sample to which it belongs, and determines the matching degree between the DNA information sequence and the training sample to which it belongs by calculating the similarity or consistency between them. The matching degree quantifies the degree of consistency between the DNA information sequence and the training sample to which it belongs in the classification of microbial species. The specific implementation method may include calculating the proportion of common tags in the two pending tag libraries, using a set similarity metric (such as Jaccard similarity), or evaluating the matching degree based on a more complex probability model. For example, assume that the pending tag library of the DNA information sequence S1 is {"community X"}, and the pending tag library of the training sample A to which it belongs is also {"community X"} (in actual applications, the pending tag library may contain multiple tags, and only one tag is considered here to simplify the description). A matching degree calculation method is to directly compare whether the tags in the two pending tag libraries are consistent. In this example, since the two tag libraries are exactly the same, it can be considered that the matching degree between the DNA information sequence S1 and the training sample A to which it belongs is 1 (or 100%). In practical applications, the pending tag library may contain multiple tags, and different tags may have different priorities or weights. Therefore, a more complex matching degree calculation method may involve the following steps:
[0151] 1. Calculate the confidence of the pending tag library: For each pending tag library, calculate the confidence of each tag based on the source and quantity of the tags (such as tags of supervised training samples, virtual tags obtained by cluster analysis of unsupervised training samples). Confidence can reflect the reliability and importance of the tag.
[0152] 2. Compare the pending marker library: Compare the pending marker library of the DNA information sequence with the pending marker library of the training examples to which it belongs, and identify common markers and different markers.
[0153] 3. Calculate the degree of match: Based on the confidence of the markers and the proportion of common markers, calculate the degree of match. For example, a weighted average method can be used to calculate the degree of match, where the weight is based on the confidence of the marker.
[0154] For example, suppose the undetermined marker library of DNA information sequence S1 is M seq ={"community X":c X , "Colony Y": c Y}, where c X and cY are the confidences of the labels “community X” and “community Y” respectively; the undetermined label library of training sample A is M sample ={"community X":c X ′, "community Z": c z ′}. A possible way to calculate the matching degree is:
[0155]
[0156] The numerator is the sum of the smaller confidence values in the common markers (to take into account the difference in confidence in the two marker libraries), and the denominator is the sum of the confidence values of all markers in the DNA information sequence pending marker library. This calculation method tends to underestimate the matching degree because it only considers the value with lower confidence in the common marker. In practical applications, the matching degree calculation method can be adjusted according to specific needs, such as using geometric mean instead of arithmetic mean, introducing additional penalty terms to deal with differences between different marker libraries, etc.
[0157] As an implementation manner, step S540, determining the degree of match between the DNA information sequence and the training example to which it belongs, based on the pending label library of the DNA information sequence and the pending label library of the training example to which the DNA information sequence belongs, may include:
[0158] Step S541: Summarize and analyze the microbial species markers in the pending marker library of the DNA information sequence to determine the marker confidence distribution of the DNA information sequence;
[0159] Step S542: Summarize and analyze the microbial species markers in the pending marker library of the training sample to which the DNA information sequence belongs, and determine the marker confidence distribution of the training sample to which the DNA information sequence belongs;
[0160] Step S543: Determine the matching degree between the DNA information sequence and the training sample to which it belongs according to the label confidence distribution of the DNA information sequence and the label confidence distribution of the training sample to which the DNA information sequence belongs.
[0161] Step S540 aims to determine the degree of match between the DNA information sequence and the pending label library of the training sample to which it belongs by comparing the two.
[0162] In step S541, the electronic device summarizes and analyzes the microbial species markers in the pending marker library of the DNA information sequence. The pending marker library is obtained through the process described in step S530, and it contains all the microbial species markers of the training examples belonging to the sequence implicit representation array that matches the sequence implicit representation array of the current DNA information sequence. Since a DNA information sequence may be similar to sequences in multiple training examples, its pending marker library may contain multiple different microbial species markers.
[0163] The main purpose of the summary analysis is to determine the confidence distribution of these markers. Confidence can be calculated based on a variety of factors, such as the number of matched sequences, the similarity of the matches, the source of the markers (supervised training samples or virtual markers obtained by cluster analysis of unsupervised training samples), etc. Here, it is assumed that the confidence is calculated based on the similarity of the matches and the source of the markers.
[0164] For example, assume that the candidate marker library of DNA information sequence S contains the following microbial species markers and their sources:
[0165] Label A (derived from supervised training examples, with a similarity of 0.9);
[0166] Label B (a virtual label obtained from cluster analysis of unsupervised training samples, with a similarity of 0.8);
[0167] Label A (again from the supervised training example, but belongs to another match with a similarity of 0.7);
[0168] For the labels of supervised training examples, a higher initial confidence (such as 0.9 or 1) can be assigned, while for the virtual labels obtained by cluster analysis of unsupervised training examples, a lower initial confidence (such as 0.5 or dynamically adjusted according to the quality of cluster analysis) is assigned. Then, the initial confidence is adjusted according to the similarity. For example, the higher the similarity, the more the confidence increases.
[0169] After calculation, the following label confidence distribution may be obtained:
[0170] Mark A:C A =0.9×weight1+0.7×weight2;
[0171] Mark B:C B =0.8×weight3;
[0172] Among them, weight 1, weight 2, and weight 3 respectively represent the weights of contributions of different matching items to confidence, and these weights can be set according to actual conditions or obtained through learning.
[0173] Step S542 is similar to step S541, and the pending label library of the training sample to which the DNA information sequence belongs is summarized and analyzed to determine the label confidence distribution of the training sample. The pending label library also contains multiple possible microbial species labels and their confidence information, which are derived from the microbial species labels of the training samples belonging to other overall implicit representation arrays that match the overall implicit representation array of the training sample.
[0174] Since training examples usually contain more DNA information sequences and more comprehensive microbial community characteristics, their candidate marker library may contain richer information than a single DNA information sequence. However, this may also introduce some noise or inconsistency, so the reliability and importance of different markers need to be quantified through confidence distribution.
[0175] In step S543, after determining the label confidence distribution of the DNA information sequence and the training sample, the electronic device compares the two distributions to calculate the matching degree between them. The matching degree quantifies the degree of consistency of the DNA information sequence with the training sample as a whole in terms of microbial species classification.
[0176] The specific method for calculating the matching degree can be flexibly selected according to the actual situation, and the following aspects need to be considered:
[0177] The consistency of confidence of common markers in the two distributions, that is, whether the confidence of markers that appear in both distributions is similar. The treatment of unique markers in the two distributions, that is, how markers that appear only in one distribution should affect the calculation of the matching degree. The overall similarity of the confidence distribution can be evaluated using some statistics or distance metrics (such as KL divergence, JS divergence, Wasserstein distance, etc.). For example, continuing with the previous example, suppose the marker confidence distribution of the DNA information sequence S is P seq ={A: 0.8, B: 0.2}, the label confidence distribution of the training sample A is P sample ={A:0.95, C:0.05}.
[0178] To calculate the match, there are a variety of approaches that can be used. A simple approach is to calculate the confidence similarity of the common markers (in this case, marker A) in the two distributions, and take into account the overall difference in the distributions. But it is more common to use a statistic or distance measure to comprehensively evaluate the similarity of the two distributions.
[0179] For example, you can use JS divergence (Jensen-Shannon Divergence) to calculate the similarity of two distributions, and then subtract this similarity from 1 to get the match (because the smaller the JS divergence, the more similar the distributions are, and what is needed is a larger match to indicate greater similarity). However, since JS divergence is used for probability distribution, the confidence distribution needs to be normalized first.
[0180] The normalized distribution is:
[0181]
[0182] Since the JS divergence requires that the two distributions have the same support set (i.e. contain the same elements), here and The supports of are not exactly the same (one contains B and the other contains C), so one of the distributions needs to be adjusted, for example by merging similar or related tokens, ignoring tokens with very low confidence, or introducing a smoothing term.
[0183] To simplify the explanation, assume that low-confidence markers (such as C) in the distribution are ignored and only marker A is considered. In this way, the confidence difference between the two distributions on marker A can be directly compared, or a more complex metric can be used to consider the difference of the entire distribution (but this is usually impractical in practical applications because a comprehensive metric is required to evaluate all possible markers). To provide a satisfactory example, a simplified method can be used to calculate the match, that is, considering the confidence difference between the two distributions on marker A, and introducing a penalty term to consider the difference between the distributions:
[0184] Degree=max(0,1-|C seq,A -C sample,A |×d);
[0185] Among them, C seq,A C is the confidence level of the algorithm in its prediction result (such as the probability that the sequence belongs to a certain microbial species) for the DNA information sequence A; sample,A It is the confidence level of the algorithm in the overall prediction result (such as the composition of the microbial community in the sample) of the training sample A containing multiple DNA information sequences. d is the penalty factor, which is a constant greater than 1 and is used to amplify the impact of confidence differences on the matching degree.
[0186] As an implementation mode, step S600, optimizing the algorithm parameters of the microbial composition analysis algorithm according to the matching degree and the microbial species labels corresponding to the unsupervised training samples to obtain the target microbial composition analysis algorithm, may include:
[0187] Step S610: performing microbial community species analysis on the training samples according to the overall implicit representation array of the training samples to obtain the overall species confidence distribution corresponding to the training samples;
[0188] Step S620: performing microbial community species analysis on the DNA information sequence according to the sequence implicit representation array corresponding to the DNA information sequence, and obtaining a sequence species confidence distribution corresponding to the DNA information sequence;
[0189] Step S630: According to the overall species confidence distribution, sequence species confidence distribution, matching degree and microbial species labels corresponding to the unsupervised training samples, the algorithm parameters of the microbial composition analysis algorithm are optimized to obtain the target microbial composition analysis algorithm.
[0190] In step S610, the electronic device uses the overall implicit representation array of the training sample to perform microbial community species analysis. For example, the overall implicit representation array is input into a pre-trained classifier or regression model, which can predict the corresponding microbial species distribution based on the input feature vector. Due to the complexity of the microbial community, this distribution is often not a single species label, but a probability distribution containing multiple species and their confidence levels.
[0191] For example, suppose the overall implicit representation array of training example A is V A =[v A1 , v A2 , …, v An ], where n is the dimension of the feature vector. The electronic device inputs this vector into a species classifier based on machine learning (such as a support vector machine, random forest, or deep learning model). The output of the classifier is not a single species label, but a species confidence distribution vector P A =[p A1 , p A2 ,…,p Am ], where m is the number of known microbial species in the database, and p Ai Represents the confidence that training example A belongs to the i-th species.
[0192] The overall implicit representation array V AIt will be processed through multiple hidden layers and finally output a confidence vector equal to the number of species. In this process, the model's parameters (such as weights and biases) are constantly adjusted according to the training data to minimize the difference between the predicted distribution and the actual distribution (usually measured by the loss function).
[0193] Step S620 is similar to step S610, but step S620 is performed on the sequence implicit representation array of each DNA information sequence. The electronic device inputs the sequence implicit representation array of each DNA information sequence into the same species classifier to obtain the species confidence distribution corresponding to the sequence. Since the DNA information sequence is a component of the training sample, its species confidence distribution should be consistent with the overall species confidence distribution of the training sample to which it belongs, but it may be affected by factors such as sequencing noise and sequence splicing errors and deviate.
[0194] For example, suppose that training sample A contains a DNA information sequence S1, whose sequence implicit representation array is s1 = [s 11 ,s 12 ,…,s 1n The electronic device also inputs this vector into the species classifier to obtain the species confidence distribution vector p1 of sequence S1 = [p 11 , p 12 ,…,p 1m ].
[0195] The calculation process is the same as that in step S610, but the input data is changed from the overall implicit representation array of the training sample to the sequence implicit representation array of the DNA information sequence.
[0196] In step S630, the electronic device optimizes the parameters of the microbial composition analysis algorithm based on the overall species confidence distribution, sequence species confidence distribution, the matching degree between the DNA information sequence and the training sample, and the microbial species labeling of the unsupervised training sample obtained in the previous step. The goal of the optimization is to enable the algorithm to more accurately predict the distribution of microbial species while reducing the impact of noise and errors on the prediction results. The optimization method refers to the similar description in the aforementioned step S600 and is not repeated here.
[0197] Assume a loss function L that takes into account the JS divergence of the species confidence distribution, the accuracy of the match, and the consistency of the unsupervised training example labels:
[0198]
[0199] Among them: α, β, γ are weight coefficients used to balance the importance of different loss terms. JS(P true , P pred ) is the true species distribution, Ptrue and predicted species distribution P pred Degree is the degree of match between the DNA information sequence and its training example (calculated as above). is a virtual label for unsupervised training examples The cross entropy loss between the predicted label y obtained by cluster analysis. For supervised training examples, P true It can be obtained through experimental determination; for unsupervised training examples, P true does not exist, but its species distribution can be approximately estimated by virtual markers obtained through cluster analysis (although this estimate may not be accurate enough). In each iteration, the electronic device calculates the gradient of the loss function L with respect to the algorithm parameters (such as weights and biases in the neural network) and updates the values of these parameters according to the gradient descent algorithm. Specifically, for each parameter w, its update rule may be as follows: Where η is the learning rate, which controls the step size of the parameter update. Through the continuous iteration of the optimization process, the electronic device can gradually adjust the value of the algorithm parameter so that the loss function L gradually decreases, thereby improving the accuracy and robustness of the algorithm in predicting the distribution of microbial species. Finally, when the loss function value converges below a certain threshold, the optimization process ends and the target microbial composition analysis algorithm is obtained. This algorithm will be used in the subsequent task of analyzing the species of microbial communities on the target high-throughput sequencing sequence.
[0200] As an implementation mode, step S630, according to the overall species confidence distribution, sequence species confidence distribution, matching degree and microbial species labels corresponding to the unsupervised training samples, optimizes the algorithm parameters of the microbial composition analysis algorithm to obtain the target microbial composition analysis algorithm, which may include:
[0201] Step S631: for each training sample, according to the sequence species confidence distribution of each DNA information sequence in the training sample and the matching degree corresponding to each DNA information sequence, the microbial species label of the training sample is adjusted to obtain the adjusted microbial species label of the training sample;
[0202] Step S632: merging the adjusted microbial species labels of each training example according to the overall species confidence distribution corresponding to each training example to obtain an overall error;
[0203] Step S633: According to the overall error, the algorithm parameters of the microbial composition analysis algorithm are optimized to obtain the target microbial composition analysis algorithm.
[0204] In step S631, the electronic device adjusts the initial microbial species label of each training sample using the sequence species confidence distribution of each DNA information sequence contained therein and the matching degree of these sequences with the training sample as a whole. The purpose of the adjustment is to make the label of the training sample more accurately reflect the composition of the microbial community it contains, while taking into account the detailed information at the DNA information sequence level.
[0205] For example, suppose that training sample A contains three DNA information sequences S1, S2, and S3, and their corresponding sequence species confidence distributions are p1, p2, and p3, respectively, and it is known that the matching degrees of these sequences with the training sample A as a whole are m1, m2, and m3, respectively. The initial microbial species label of training sample A may be a collection of one or more species, but for simplicity of explanation, it is assumed here that it is a single species label L A .
[0206] The adjustment process can be based on the weighted average method, and the species confidence distribution of each DNA information sequence is weighted and summed according to its matching degree to obtain the weighted species confidence distribution of training sample A. Then, the species with the highest confidence is selected from this weighted distribution as the adjusted microbial species marker L of training sample A. A ’. But more commonly, since microbial communities often contain multiple species, the adjusted signature may be a collection of multiple species and their confidence levels.
[0207] The specific calculation process includes, for example, weighted summation of the species confidence distribution and matching degree of each sequence to obtain a weighted species confidence matrix W, where each element w ij represents the weighted confidence of the ith sequence for the jth species (w ij =p ij ×m i ).
[0208] Sum each column (i.e., each species) of the weighted species confidence matrix W to obtain the overall weighted confidence c = [c1, c2, ..., c m ].
[0209] According to the overall weighted confidence c, species with confidence exceeding a certain threshold are selected as part of the adjusted microbial species labeling, or several species with the highest confidence are directly selected as labels (if a single label is required). In practical applications, due to the complexity of microbial communities, one or several species are usually not simply used as labels for training samples. On the contrary, it is more common to retain a set of multiple species and their confidences as labels. Therefore, the output of step S631 may be an adjusted species confidence distribution vector L A ′=[1A1 ′,1 A2 ′,…,1 Am ′], where 1 Ai ′ represents the adjusted confidence that the training example A belongs to the i-th species.
[0210] In step S632, the electronic device calculates the overall error using the overall species confidence distribution corresponding to each training sample and the adjusted microbial species label (or confidence distribution) obtained in step S631. The overall error is an important indicator to measure the difference between the algorithm prediction result and the actual situation (or supervision information), which will be used to optimize the algorithm parameters in subsequent steps.
[0211] For example, suppose the training set contains multiple training examples (such as A, B, C, etc.), each of which has an overall species confidence distribution (such as P A , P B , P C ) and an adjusted microbial species marker (or confidence distribution, such as L A ′, L B ′, L C ′).
[0212] The calculation of the overall error is usually based on some kind of loss function, such as the cross entropy loss function. Cross entropy loss is a common method to measure the difference between two probability distributions, which is particularly suitable for the comparison between the predicted probability distribution and the actual distribution in classification problems.
[0213] The specific calculation process includes, for example, for each training example (such as A), first calculating the overall species confidence distribution P A Perform a logarithmic operation and then compare the logarithmic operation result with the adjusted microbial species marker confidence distribution L A ′, and the overall sub-error E of the training example is calculated by the cross entropy loss formula. A . In practical applications, since the overall species confidence distribution and the adjusted marker confidence distribution may not be strictly probability distributions (i.e., their sum may not be equal to 1), appropriate normalization processing or adjustment of the loss function calculation method can be performed according to actual needs. Then, the overall sub-errors of all training samples are summed (or weighted averaged) to obtain the overall error E. If all training samples have the same importance, the sum can be directly calculated; if different training samples have different importance (for example, some samples may contain more information or more reliable supervision information), weighted averaging can be used to merge the sub-errors.
[0214] In step S633, the electronic device updates the parameters of the microbial composition analysis algorithm using an optimization algorithm such as gradient descent (or its variants, such as Adam, RMSprop, etc.) based on the overall error calculated in step S632. The goal of the optimization is to minimize the overall error so that the algorithm can more accurately predict the species composition of the microbial community.
[0215] After obtaining the overall error E, the electronic device calculates the gradient of the error with respect to each parameter of the algorithm (such as weights and biases in a neural network). This usually involves the application of the back-propagation algorithm, which can efficiently calculate the gradient information.
[0216] For each parameter w in the algorithm, the back propagation algorithm is used to calculate the partial derivative of the error E with respect to w , which is the gradient. This process may require multiple passes through the training set (called "epochs") and multiple updates of the parameters in each pass (called "iterations" or "batches").
[0217] Based on the gradient information, the gradient descent algorithm (or its variant) is used to update the value of the parameter. The process of gradient calculation and parameter update is repeated until a certain stopping condition is met (such as the error is lower than a certain threshold, the change in the parameter is less than a certain threshold, the preset number of iterations is reached, etc.). In each iteration, it may be necessary to recalculate the overall error and gradient and update the parameter accordingly.
[0218] During the optimization process, check whether the error has converged regularly. If the error changes very little (or no longer changes) for multiple consecutive iterations, it can be considered that the algorithm has converged to a local optimal solution (or a global optimal solution, but this is usually difficult to guarantee). At this time, the optimization process can be stopped and the current parameter value is used as the parameter of the target microbial composition analysis algorithm.
[0219] Through this series of optimization processes in step S630, the electronic device can gradually adjust the parameters of the microbial composition analysis algorithm so that it can better predict the species composition of the atmospheric aerosol microbial community. This process not only relies on rich information sources such as the overall species confidence distribution of the training samples and the sequence species confidence distribution of the DNA information sequence, but also ensures the accuracy of the algorithm at the detail level through matching. The final target algorithm will have higher prediction accuracy and robustness.
[0220] As an implementation manner, step S633, optimizing the algorithm parameters of the microbial composition analysis algorithm according to the overall error to obtain the target microbial composition analysis algorithm, may include:
[0221] Step S6331: determining the sequence analysis error of the DNA information sequence according to the sequence species confidence distribution of the DNA information sequence and the microbial species label of the training sample to which the DNA information sequence belongs;
[0222] Step S6332: According to the overall error and the sequence analysis error, the algorithm parameters of the microbial composition analysis algorithm are optimized to obtain the target microbial composition analysis algorithm.
[0223] In step S6331, the electronic device calculates the sequence analysis error for each DNA information sequence based on its sequence species confidence distribution and the microbial species label of the training sample. The sequence analysis error measures the prediction accuracy of the algorithm at the level of a single DNA information sequence and is an important indicator for evaluating the performance of the algorithm at the detail level.
[0224] For example, suppose that training sample A contains a DNA information sequence S1, whose sequence species confidence distribution is p1 = [p 11 , p 12 ,…,p 1m ], where m is the number of known microbial species in the database, and p 1i represents the confidence that sequence S1 belongs to the i-th species. At the same time, assume that the microbial species of training sample A to which sequence S1 belongs is labeled L A (L A For example, it is a set containing multiple species and their weights. To simplify the explanation, it is assumed here that it is a single species marker).
[0225] To calculate the sequence analysis error, the electronic device defines a loss function to quantify the difference between the predicted distribution (i.e., the sequence species confidence distribution p1) and the actual label (i.e., the microbial species label L of the training sample A). A ). Commonly used loss functions include cross entropy loss, mean square error (MSE), etc. Here, since the actual label is a single species and the predicted distribution is a probability distribution, cross entropy loss can be used for determination. In practice, the label L A is a single species, and the predicted distribution p1 is a probability distribution. Therefore, the actual label can be converted into a one-hot encoded vector y A =[y A1 ,y A2 , …, y Am ], where y Ai =1 if L A is the i-th species, otherwise y Ai = 0. Then, the cross entropy loss function is used to calculate the sequence analysis error E of sequence S1 seq,1 .
[0226] After determining the overall error (such as in step S632) and the sequence analysis error, the electronic device uses this error information to optimize the parameters of the microbial composition analysis algorithm. The goal of the optimization is to find a set of parameter values that makes the prediction error of the algorithm at both the overall and sequence levels as small as possible.
[0227] For example, assume that the overall error E has been calculated in step S632, and the sequence analysis error (such as E) has been calculated for each DNA information sequence in the training set in step S6331. seq,1 ). Now, the electronics uses this information to update the parameters of the algorithm.
[0228] First, the electronic device defines a joint error function that combines the overall error and the sequence analysis error, for example by weighted summing them. Next, the electronic device calculates the gradient of the joint error function Etotal with respect to each parameter of the algorithm (such as weights and biases in a neural network). This usually involves the application of a backpropagation algorithm, which efficiently calculates the partial derivatives of the error with respect to each parameter in the network. Once the gradient is calculated, the electronic device can use a gradient descent (or its variants, such as Adam, RMSprop, etc.) algorithm to update the value of the parameter. The goal of the update is to move the parameter in the opposite direction of the gradient to reduce the value of the error function.
[0229] The above process (calculating gradients, updating parameters) will be repeated many times until a certain stopping condition is met (such as the error is lower than a certain threshold, the change in parameters is less than a certain threshold, the preset number of iterations is reached, etc.). In each iteration, the electronic device recalculates the joint error function and gradient, and updates the parameters based on the new gradient information. During the optimization process, the electronic device periodically checks whether the error has converged. If the error changes very little (or no longer changes) for multiple consecutive iterations, it can be considered that the algorithm has converged to a local optimal solution (or a global optimal solution, but this is usually difficult to guarantee). At this point, the optimization process can be stopped and the value of the current parameter is used as the parameter of the target microbial composition analysis algorithm.
[0230] As an implementation mode, step S6332, optimizing the algorithm parameters of the microbial composition analysis algorithm according to the overall error and the sequence analysis error to obtain the target microbial composition analysis algorithm, may include:
[0231] Step S63321: performing error calculation between the sequence species confidence distribution and the equal confidence distribution of the DNA information sequence to obtain the distribution difference corresponding to the DNA information sequence;
[0232] Step S63322: According to the matching degree corresponding to the DNA information sequence, the sequence analysis error and the distribution difference are combined to obtain the sequence error of the DNA information sequence;
[0233] Step S63323: According to the overall error and the sequence error corresponding to each DNA information sequence of the training sample, the algorithm parameters of the microbial composition analysis algorithm are optimized to obtain the target microbial composition analysis algorithm.
[0234] In step S63321, the electronic device first defines an equal confidence distribution (Uniform Confidence Distribution), which assumes that all microbial species have the same confidence. Then, for each DNA information sequence, the difference between its sequence species confidence distribution and the equal confidence distribution is calculated. This difference reflects the degree of deviation between the species confidence distribution predicted by the algorithm and the actual possible uniform distribution, which can measure the concentration and reliability of the prediction to a certain extent. For example, suppose there is a DNA information sequence S1, whose sequence species confidence distribution is p1=[p 11 , p 12 ,…,p 1m ], where m is the number of known microbial species in the database, and p 1i Indicates the confidence that sequence S1 belongs to the i-th species. Equal confidence distribution u=[u1,u2,…,u m ] is a vector whose elements are all equal and sum to 1 (i.e. u i =m1 for all i).
[0235] In order to quantify the difference between p1 and u, a variety of distance metrics can be used, such as KL divergence (Kullback-Leibler Divergence), JS divergence or simple Euclidean distance. However, since KL divergence and JS divergence require that the two distributions have non-zero values in at least one element and are usually used for comparison between probability distributions, and although the equal confidence distribution here can be regarded as a special probability distribution, the sequence species confidence distribution may not strictly meet all the conditions of the probability distribution (such as the sum is 1). Therefore, a more general distance metric is chosen, such as the square of the Euclidean distance.
[0236] In step S63322, the electronic device combines the distribution difference calculated in step S63321 with the sequence analysis error calculated in step S6331 to obtain a comprehensive sequence error for each DNA information sequence. This merging takes into account both the uniformity and accuracy of the algorithm's predictions in the species confidence distribution, and helps to more comprehensively evaluate the prediction performance at the sequence level. The merging process can be achieved by weighted summation, where the weights can be adjusted according to actual conditions to balance the importance of distribution differences and sequence analysis errors. By calculating the comprehensive sequence error for each DNA information sequence, the electronic device obtains an error indicator that can comprehensively reflect the sequence-level prediction performance.
[0237] In step S63323, the electronic device uses the overall error and sequence error calculated in steps S63321 and S63322 to optimize the parameters of the microbial composition analysis algorithm. The goal of the optimization is to find a set of parameter values so that the overall performance of the algorithm on the training set (measured by the overall error) and the sequence level performance (measured by the sequence error) are as good as possible. The optimization process, for example, uses the application of a gradient descent (or its variant) algorithm, which guides the update direction of the parameter by calculating the gradient of the error function with respect to the parameter. Here, the error function can be defined as the weighted sum of the overall error and all sequence errors.
[0238] As an implementation method, step S300, based on the microbial composition analysis algorithm, performs implicit representation extraction on the training sample and each DNA information sequence of the training sample, respectively, to obtain the overall implicit representation array of the training sample and the sequence implicit representation array corresponding to each DNA information sequence, which may include:
[0239] Step S310: Based on the microbial composition analysis algorithm, weight distribution embedding is performed on the training samples and each DNA information sequence of the training samples respectively to obtain the overall implicit representation array of the training samples and the sequence implicit representation array of the DNA information sequence.
[0240] Specifically, the process may include: based on the microbial composition analysis algorithm, obtaining the DNA representation vector and classification representation vector corresponding to each DNA information in the DNA information sequence of the training sample, the classification representation vector represents the information type to which the DNA information belongs; encoding the position information of each DNA information in the DNA information sequence, and obtaining the distribution position representation vector corresponding to each DNA information; merging the DNA representation vector, the classification representation vector and the distribution position representation vector to obtain the implicit representation of each DNA information in the DNA information sequence of the training sample; weight distribution embedding of the implicit representation of each DNA information in the DNA information sequence, and obtaining the overall implicit representation array of the training sample. In step S310, the electronic device processes the training sample and its DNA information sequence using the microbial composition analysis algorithm (which may be a model based on deep learning, machine learning or other advanced algorithms), and generates an implicit representation by weight distribution embedding. Weight distribution embedding is a technology that maps raw data to a high-dimensional feature space, and emphasizes or suppresses its importance in the representation by assigning different weights to different features. Specifically, the electronic device extracts the DNA representation vector of each DNA information (such as k-mer fragments, gene fragments, etc.) for each DNA information sequence in the training sample. The DNA representation vector is a numerical representation of DNA information in a certain feature space, which may be learned through models such as convolutional neural networks (CNN), recurrent neural networks (RNN) or Transformer. These vectors capture information such as sequence specificity, base composition, and structural characteristics of DNA information. At the same time, the electronic device also assigns a classification representation vector to each DNA information to characterize the information type to which the DNA information belongs (such as coding region, non-coding region, promoter region, etc.). The classification representation vector may be obtained through one-hot encoding, embedding layer, or other classification feature encoding methods.
[0241] For example, suppose a DNA information sequence contains three DNA information fragments, namely fragment A, fragment B and fragment C. The DNA representation vector of fragment A is v A =[v A1 , v A2 , …, v An ], where n is the dimension of the vector; the classification representation vector of fragment A is c A=[0, 1, 0, ..., 0] (assuming there are four types of information, and fragment A belongs to the second type). Similarly, the DNA representation vector and classification representation vector of fragment B and fragment C can be obtained. In order to retain the position information of the DNA information in the sequence, the electronic device encodes the position of each DNA information in the DNA information sequence. The position encoding can be a simple integer index, a unique hot encoding, or a more complex position embedding vector. The position embedding vector can capture the relative and absolute position relationship between DNA information, which is of great significance for understanding the structure and function of DNA sequences.
[0242] For example, suppose the DNA information sequence is arranged in the direction of 5' to 3', fragment A is at the first position, fragment B is at the second position, and fragment C is at the third position. The position embedding matrix P∈R L×d to generate an embedding vector for each position, where L is the maximum possible number of positions in the sequence and d is the dimension of the embedding vector. Then, according to the actual position of each DNA information in the sequence, the corresponding embedding vector is selected from the position embedding matrix as the distribution position representation vector. For example, the distribution position representation vector of fragment A may be p1, that of fragment B is p2, and that of fragment C is p3. Next, the electronic device merges the DNA representation vector, the classification representation vector, and the distribution position representation vector of each DNA information to generate a comprehensive implicit representation of the DNA information. The merging operation may involve simple concatenation, weighted sum, or other complex feature fusion methods. For example, assume that the dimension of the DNA representation vector is n, the dimension of the classification representation vector is m, and the dimension of the distribution position representation vector is d. For fragment A, its implicit representation can be obtained by concatenation: h A =[v A ;c A ;p1], where the semicolon (;) represents the concatenation operation of the vectors. Similarly, the implicit representations hB and hC of fragment B and fragment C can be obtained.
[0243] Finally, the electronic device performs weighted embedding on the implicit representation of each DNA message in the DNA message sequence to generate an overall implicit representation array of the training examples. The weight assignment can be calculated dynamically based on different features of the DNA message (such as length, GC content, conservation, etc.) or based on the attention mechanism. The purpose of weighted embedding is to emphasize the DNA messages that contribute significantly to the overall representation while suppressing noise or redundant information.
[0244] Through this series of operations in step S310, the electronic device can convert complex DNA sequence data into an implicit representation form that is easy to process. These implicit representations not only retain key information such as sequence specificity, structural characteristics, and position information of DNA information, but also emphasize the DNA information that makes important contributions to the overall representation through weight distribution embedding. These implicit representations will serve as input data for subsequent steps (such as cluster analysis, matching calculation, algorithm optimization, etc.), providing a data basis for microbial composition analysis.
[0245] Based on Figure 1 Based on the same principle as the method shown in , the present application also provides an analysis device 10 for the composition of atmospheric aerosol microbial communities, such as Figure 2 As shown, the device 10 includes an algorithm training module 11 and a data analysis module 12. The algorithm training module 11 includes:
[0246] The template acquisition module 111 is used to acquire a microbial composition analysis algorithm and a high-throughput sequencing sequence template, wherein the training examples in the high-throughput sequencing sequence template include supervised training examples and unsupervised training examples, and the supervised training examples include corresponding microbial species labels;
[0247] A data segmentation module 112 is used to segment each training sample to obtain multiple DNA information sequences of the training sample;
[0248] The feature extraction module 113 is used to extract implicit representations of the training samples and the DNA information sequences of the training samples based on the microbial composition analysis algorithm, and obtain the overall implicit representation array of the training samples and the sequence implicit representation array corresponding to each DNA information sequence;
[0249] The cluster analysis module 114 is used to perform cluster analysis on the overall implicit representation array of each training sample in the high-throughput sequencing sequence template according to the microbial species labels of the supervised training samples, and obtain the microbial species labels corresponding to the unsupervised training samples;
[0250] The commonality determination module 115 is used to determine, for each DNA information sequence of the training sample, the matching degree between the DNA information sequence and the training sample to which it belongs according to the sequence implicit representation array corresponding to the DNA information sequence and the overall implicit representation array of the training sample to which the DNA information sequence belongs;
[0251] The algorithm optimization module 116 is used to optimize the algorithm parameters of the microbial composition analysis algorithm according to the matching degree and the microbial species labels corresponding to the unsupervised training samples to obtain the target microbial composition analysis algorithm. The target microbial composition analysis algorithm is used to perform microbial community species analysis on the target high-throughput sequencing sequence to obtain the microbial species labels of the target high-throughput sequencing sequence;
[0252] The data analysis module 12 includes:
[0253] The data acquisition module 121 is used to acquire a target high-throughput sequencing sequence of a target atmospheric aerosol sample of a target area; the target high-throughput sequencing sequence is a sequencing sequence obtained after DNA extraction from the target atmospheric aerosol sample, polymerase chain reaction amplification, and high-throughput sequencing;
[0254] The marker determination module 122 is used to load the target high-throughput sequencing sequence into the target microbial composition analysis algorithm to obtain the microbial species marker of the target atmospheric aerosol sample.
[0255] The above embodiment introduces the atmospheric aerosol microbial community composition analysis device 10 from the perspective of a virtual module. The following introduces an electronic device from the perspective of a physical module, which is specifically as follows:
[0256] The present application embodiment provides an electronic device, such as Figure 3 As shown, the electronic device 100 includes: a processor 101 and a memory 103. The processor 101 and the memory 103 are connected, such as through a bus 102. Optionally, the electronic device 100 may further include a transceiver 104. It should be noted that in actual applications, the transceiver 104 is not limited to one, and the structure of the electronic device 100 does not constitute a limitation on the embodiments of the present application. In other words, the embodiments of the present application provide an electronic device, and the electronic device in the embodiments of the present application includes: one or more processors; a memory; one or more computer programs, wherein the one or more computer programs are stored in the memory and configured to be executed by one or more processors, and when the one or more programs are executed by the processor, the above method is implemented.
[0257] The above are only some implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for analyzing the composition of atmospheric aerosol microbial communities, characterized in that: It includes the algorithm determination stage and the data analysis stage, in which: The algorithm determination stage includes: Obtaining a microbial composition analysis algorithm and a high-throughput sequencing sequence template, wherein the training samples in the high-throughput sequencing sequence template include supervised training samples and unsupervised training samples, and the supervised training samples include corresponding microbial species labels; For each training sample, segment the training sample to obtain multiple DNA information sequences of the training sample; Based on the microbial composition analysis algorithm, the implicit representation extraction is performed on the training sample and each DNA information sequence of the training sample, respectively, to obtain the overall implicit representation array of the training sample and the sequence implicit representation array corresponding to each DNA information sequence; According to the microbial species labels of the supervised training samples, cluster analysis is performed on the overall implicit representation array of each training sample in the high-throughput sequencing sequence template to obtain the microbial species labels corresponding to the unsupervised training samples; For each DNA information sequence of the training sample, determining the matching degree between the DNA information sequence and the training sample to which it belongs according to the sequence implicit representation array corresponding to the DNA information sequence and the overall implicit representation array of the training sample to which the DNA information sequence belongs; According to the matching degree and the microbial species label corresponding to the unsupervised training sample, the algorithm parameter variables of the microbial composition analysis algorithm are optimized to obtain a target microbial composition analysis algorithm, and the target microbial composition analysis algorithm is used to perform microbial community species analysis on a target high-throughput sequencing sequence to obtain a microbial species label of the target high-throughput sequencing sequence; The data analysis phase includes: Obtaining a target high-throughput sequencing sequence of a target atmospheric aerosol sample in a target area; wherein the target high-throughput sequencing sequence is a sequencing sequence obtained after DNA extraction from the target atmospheric aerosol sample, amplification by polymerase chain reaction, and high-throughput sequencing; The target high-throughput sequencing sequence is loaded into the target microbial composition analysis algorithm to obtain the microbial species markers of the target atmospheric aerosol sample.
2. The method according to claim 1, characterized in that: The step of performing cluster analysis on the overall implicit representation array of each training sample in the high-throughput sequencing sequence template according to the microbial species label of the supervised training sample to obtain the microbial species label corresponding to the unsupervised training sample includes: Setting a plurality of cluster centroids, and determining a commonality metric value between the overall implicit representation array of each training sample in the high-throughput sequencing sequence template and each cluster centroid; For each training sample, according to the commonality metric value and the microbial species label of the supervised training sample, a target cluster centroid matching the training sample is determined among the cluster centroids, and the training sample is classified into a high-throughput sequencing sequence cluster corresponding to the target cluster centroid; For each high-throughput sequencing sequence cluster corresponding to the cluster centroid, a training sample satisfying a preset cluster centroid condition is determined in the high-throughput sequencing sequence cluster as an updated cluster centroid; Jump to the step of determining the commonality measurement value between the overall implicit representation array of each training sample in the high-throughput sequencing sequence template and each cluster centroid and iterate until the obtained cluster centroid meets the cluster analysis stopping requirement; determine the microbial species markers of the unsupervised training samples in the target high-throughput sequencing sequence cluster according to the microbial species markers of the supervised training samples in the target high-throughput sequencing sequence cluster corresponding to the cluster centroid that meets the cluster analysis stopping requirement; Alternatively, the method of performing cluster analysis on the overall implicit representation array of each training sample in the high-throughput sequencing sequence template according to the microbial species label of the supervised training sample to obtain the microbial species label corresponding to the unsupervised training sample includes: Determine the sample commonality measure between the two training samples according to the overall implicit representation array of the two training samples; Generate a high-throughput sequencing sequence association map according to the sample commonality metric value, wherein the high-throughput sequencing sequence association map represents the correlation between each training sample; According to the high-throughput sequencing sequence association map, the microbial species labels of the supervised training samples are subjected to label diffusion to obtain the microbial species labels corresponding to the unsupervised training samples.
3. The method according to claim 2, characterized in that The high-throughput sequencing sequence association map includes sample vertices corresponding to each training sample and connecting lines between sample vertices, wherein the connecting lines represent the correlation between two connected sample vertices; and according to the high-throughput sequencing sequence association map, performing label diffusion on the microbial species labels of the supervised training samples to obtain the microbial species labels corresponding to the unsupervised training samples, including: Performing label diffusion on the microbial species labels of the supervised training samples based on the connection lines between sample vertices in the high-throughput sequencing sequence association map to determine preliminary microbial species labels of the unsupervised training samples; For each unsupervised training sample, the preliminary microbial species label of the unsupervised training sample is repeatedly corrected according to the adjacent sample vertices in the high-throughput sequencing sequence association map of the unsupervised training sample until the labels of the sample vertices in the high-throughput sequencing sequence association map are stable, thereby obtaining the microbial species label corresponding to the unsupervised training sample.
4. The method according to claim 1, characterized in that For each DNA information sequence of the training examples, determining the matching degree between the DNA information sequence and the training example to which it belongs according to the sequence implicit representation array corresponding to the DNA information sequence and the overall implicit representation array of the training example to which the DNA information sequence belongs, comprises: According to the overall implicit representation array of each training example, a set of overall implicit representation arrays is generated, and according to the sequence implicit representation array of the DNA information sequence of each training example, a set of sequence implicit representation arrays is generated; For each training example, query the overall implicit representation array set for one or more matching overall implicit representation arrays that match the overall implicit representation array of the training example, and determine the pending label library of the training example according to the microbial species label of the training example to which the matching overall implicit representation array belongs; For each DNA information sequence of the training sample, query the sequence implicit representation array set for one or more matching sequence implicit representation arrays that match the sequence implicit representation array of the DNA information sequence, and determine the pending label library of the DNA information sequence according to the microbial species label of the training sample to which the matching sequence implicit representation array belongs; According to the pending label library of the DNA information sequence and the pending label library of the training sample to which the DNA information sequence belongs, the matching degree between the DNA information sequence and the training sample to which it belongs is determined.
5. The method according to claim 4, characterized in that The step of determining the degree of match between the DNA information sequence and the training example to which the DNA information sequence belongs based on the pending label library of the DNA information sequence and the pending label library of the training example to which the DNA information sequence belongs comprises: Summarizing and analyzing the microbial species markers in the pending marker library of the DNA information sequence to determine the marker confidence distribution of the DNA information sequence; Summarizing and analyzing the microbial species markers in the pending marker library of the training sample to which the DNA information sequence belongs, and determining the marker confidence distribution of the training sample to which the DNA information sequence belongs; The matching degree between the DNA information sequence and the training example to which the DNA information sequence belongs is determined according to the label confidence distribution of the DNA information sequence and the label confidence distribution of the training example to which the DNA information sequence belongs.
6. The method according to claim 1, characterized in that The method of optimizing the algorithm parameters of the microbial composition analysis algorithm according to the matching degree and the microbial species labels corresponding to the unsupervised training examples to obtain a target microbial composition analysis algorithm includes: According to the overall implicit representation array of the training sample, performing a microbial community species analysis on the training sample to obtain an overall species confidence distribution corresponding to the training sample; According to the sequence implicit representation array corresponding to the DNA information sequence, performing microbial community species analysis on the DNA information sequence to obtain a sequence species confidence distribution corresponding to the DNA information sequence; According to the overall species confidence distribution, the sequence species confidence distribution, the matching degree and the microbial species labels corresponding to the unsupervised training samples, the algorithm parameters of the microbial composition analysis algorithm are optimized to obtain a target microbial composition analysis algorithm.
7. The method according to claim 6, characterized in that The method of optimizing the algorithm parameters of the microbial composition analysis algorithm according to the overall species confidence distribution, the sequence species confidence distribution, the matching degree and the microbial species label corresponding to the unsupervised training sample to obtain a target microbial composition analysis algorithm includes: For each training sample, adjusting the microbial species label of the training sample according to the sequence species confidence distribution of each DNA information sequence in the training sample and the matching degree corresponding to each DNA information sequence, to obtain the adjusted microbial species label of the training sample; According to the overall species confidence distribution corresponding to each training example, the adjusted microbial species labels of each training example are merged to obtain the overall error; According to the overall error, the algorithm parameters of the microbial composition analysis algorithm are optimized to obtain a target microbial composition analysis algorithm.
8. The method according to claim 7, characterized in that The method of optimizing the algorithm parameters of the microbial composition analysis algorithm according to the overall error to obtain a target microbial composition analysis algorithm includes: Determining a sequence analysis error of the DNA information sequence according to a sequence species confidence distribution of the DNA information sequence and a microbial species label of a training sample to which the DNA information sequence belongs; According to the overall error and the sequence analysis error, the algorithm parameters of the microbial composition analysis algorithm are optimized to obtain a target microbial composition analysis algorithm.
9. The method according to claim 8, characterized in that The method of optimizing the algorithm parameters of the microbial composition analysis algorithm according to the overall error and the sequence analysis error to obtain a target microbial composition analysis algorithm comprises: Calculating the error between the sequence species confidence distribution and the equal confidence distribution of the DNA information sequence to obtain the distribution difference corresponding to the DNA information sequence; According to the matching degree corresponding to the DNA information sequence, the sequence analysis error and the distribution difference are combined to obtain the sequence error of the DNA information sequence; Optimizing the algorithm parameters of the microbial composition analysis algorithm according to the overall error and the sequence errors corresponding to the respective DNA information sequences of the training samples to obtain a target microbial composition analysis algorithm; Based on the microbial composition analysis algorithm, the implicit representation extraction is performed on the training sample and each DNA information sequence of the training sample to obtain the overall implicit representation array of the training sample and the sequence implicit representation array corresponding to each DNA information sequence, including: Based on the microbial composition analysis algorithm, the training samples and the DNA information sequences of the training samples are weighted and embedded respectively to obtain the overall implicit representation array of the training samples and the sequence implicit representation array of the DNA information sequences.
10. An analytical device for atmospheric aerosol microbial community composition, characterized in that: It includes algorithm training module and data analysis module, including: The algorithm training module includes: A template acquisition module, used to acquire a microbial composition analysis algorithm and a high-throughput sequencing sequence template, wherein the training examples in the high-throughput sequencing sequence template include supervised training examples and unsupervised training examples, and the supervised training examples include corresponding microbial species markers; A data segmentation module, for segmenting each training sample to obtain a plurality of DNA information sequences of the training sample; A feature extraction module is used to extract implicit representations of the training samples and the DNA information sequences of the training samples based on the microbial composition analysis algorithm, and obtain an overall implicit representation array of the training samples and a sequence implicit representation array corresponding to each DNA information sequence; A cluster analysis module, configured to perform cluster analysis on the overall implicit representation array of each training sample in the high-throughput sequencing sequence template according to the microbial species labels of the supervised training samples, and obtain the microbial species labels corresponding to the unsupervised training samples; A commonality determination module, for determining, for each DNA information sequence of the training sample, a matching degree between the DNA information sequence and the training sample to which it belongs, according to a sequence implicit representation array corresponding to the DNA information sequence and an overall implicit representation array of the training sample to which the DNA information sequence belongs; An algorithm optimization module, for optimizing the algorithm parameters of the microbial composition analysis algorithm according to the matching degree and the microbial species labels corresponding to the unsupervised training samples, and obtaining a target microbial composition analysis algorithm, wherein the target microbial composition analysis algorithm is used to perform microbial community species analysis on a target high-throughput sequencing sequence, and obtain a microbial species label of the target high-throughput sequencing sequence; The data analysis module includes: A data acquisition module, used to acquire a target high-throughput sequencing sequence of a target atmospheric aerosol sample in a target area; wherein the target high-throughput sequencing sequence is a sequencing sequence obtained after DNA extraction from the target atmospheric aerosol sample, amplification by polymerase chain reaction, and high-throughput sequencing; The marker determination module is used to load the target high-throughput sequencing sequence into the target microbial composition analysis algorithm to obtain the microbial species marker of the target atmospheric aerosol sample.
11. An electronic device, characterized in that: include: one or more processors; Memory; one or more computer programs; The one or more computer programs are stored in the memory and configured to be executed by the one or more processors, and when the one or more computer programs are executed by the processors, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Atmospheric aerosol microbial community composition analysis method
CN113077845A
Method and system for realizing DNA trace material evidence identification based on deep learning
CN118038997A