Target plate base assembly error identification method, computer equipment and storage medium
By image processing and position matching of the target plate base in the gene sequencing pre-processing device, the target plate base assembly error is identified and calibrated, the problem of the accuracy of the target plate base is affected, and high-precision target plate position calibration is achieved.
Patent Information
- Application Number
- CN202411963363.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-25
AI Technical Summary
In the pre-gene sequencing device, the assembly error of the target plate base is difficult to identify, affecting the accuracy of the target plate base.
By acquiring the original image of the target board base, segmenting the target mark, and matching the position of the core image and the target segmented image, the target board base assembly error is determined.
High-precision identification and calibration of the assembly error of the target plate base is achieved, and the accuracy of the target plate position is improved.
Smart Images

Figure CN119887916A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of gene sequencing technology, and in particular to a method for identifying assembly errors of a target plate base, a computer device, and a storage medium. Background Art
[0002] In gene sequencing pre-processing equipment, the target plate is an important component. There are many steps involved in the pre-processing process, and different steps use different target plates and target plates in different areas. Before conducting the pre-processing experiment, the operator needs to manually place various types of target plates on the base. Inevitably, during the installation of gene sequencing pre-processing equipment, each base will have different degrees of assembly errors, and this assembly error will also bring about assembly errors of the target plate base, affecting the accuracy of the target plate base. Because the assembly error is small and cannot be distinguished by the naked eye, it is impossible to accurately identify the assembly error of the target plate base. Therefore, how to identify the assembly error of the target plate base with high precision has become a problem that needs to be solved urgently. Summary of the invention
[0003] The embodiments of the present disclosure at least provide a method for identifying target plate base assembly errors, a computer device, and a storage medium.
[0004] In a first aspect, an embodiment of the present disclosure provides a method for identifying an assembly error of a target plate base, comprising:
[0005] Acquire an original image of a target plate base; the original image is obtained by photographing a target plate base for placing a target plate in a gene sequencing pre-processing instrument, and the original image includes a target mark on the target plate base;
[0006] The target mark is used as the foreground content, and the original image is segmented to obtain a target segmented image; wherein the pixel value of each pixel in the target segmented image is used to indicate whether the pixel belongs to the foreground content;
[0007] Position matching is performed on the nuclear image and / or the target segmented image with the goal of maximizing the overlap between the target segmented image and the nuclear image; the nuclear image is used to characterize the standard position of the target marker;
[0008] The target plate base assembly error is determined based on the position adjustment information in the position matching process.
[0009] Optionally, also include:
[0010] According to the set clipping area coordinates and the set clipping area size, a first image block including the target mark is clipped from the original image;
[0011] The step of using the target mark as the foreground content and performing segmentation processing on the original image to obtain a target segmented image includes:
[0012] The target mark is used as the foreground content, and the first image block is segmented to obtain the target segmented image.
[0013] Optionally, the step of intercepting the image including the target mark from the original image according to the set interception area coordinates and the set interception area size includes:
[0014] Detecting whether the original image meets the target condition;
[0015] When the original image satisfies the target condition, an image block including the target mark is intercepted from the original image according to the set interception area coordinates and the set interception area size;
[0016] The original image satisfies the target condition including at least one of the following:
[0017] The size of the original image is greater than or equal to a preset size threshold;
[0018] A noise region with an intensity greater than or equal to the foreground content intensity exists in the original image, and the noise region is larger than a preset area threshold.
[0019] Optionally, taking the target mark as the foreground content and performing segmentation processing on the original image or the first image block to obtain a target segmented image includes:
[0020] Determining a segmentation threshold of the original image or the image block according to the intensity value of each pixel in the original image or the image block;
[0021] Traversing each pixel in the original image or the image block, and comparing the intensity value of the traversed pixel with the segmentation threshold;
[0022] When the pixel value of the traversed pixel point is greater than or equal to the segmentation threshold, setting the pixel value of the pixel point to a first value; and
[0023] When the pixel value of the traversed pixel point is less than the segmentation threshold, the pixel value of the pixel point is set to a second value;
[0024] The first value is used to indicate that the corresponding pixel point belongs to the foreground content; the second value is used to indicate that the corresponding pixel point belongs to the background content.
[0025] Optionally, determining a segmentation threshold of the original image or the image block according to the intensity value of each pixel in the original image or the image block includes:
[0026] According to the pixel value of each pixel point in the original image or the image block, the original image or the image block is converted into a grayscale image; the grayscale value of each pixel point in the grayscale image represents the intensity value of the corresponding pixel point;
[0027] The segmentation threshold is determined according to the grayscale value of each pixel in the grayscale image.
[0028] Optionally, the performing position matching on the nuclear image and / or the target segmented image with the goal of maximizing the overlap between the target segmented image and the nuclear image includes:
[0029] Taking the nuclear image as a sliding window, and taking the maximum overlap between the nuclear image and the target segmented image after sliding as the goal, the nuclear image is displaced and adjusted according to a preset sliding step and a preset sliding trajectory;
[0030] Determining the center position of the nuclear image relative to the target segmented image when the overlap is maximum;
[0031] The center position is used as a rotation point, and the maximum overlap between the nuclear image and the target segmented image after rotation is used as a goal. The rotation angle of the nuclear image is adjusted according to a preset rotation angle step and a preset rotation direction.
[0032] Optionally, the degree of coincidence between the core image and the target segmented image is obtained by accumulating and summing pixel values of the core image and the target segmented image.
[0033] Optionally, the center position of the nuclear image is obtained by calculating the upper left corner position of the nuclear image and the length and width of the target mark.
[0034] Optionally, the nuclear image is constructed in the following manner:
[0035] Acquire a reference image; the reference image is obtained by photographing a target plate base without assembly errors, and the reference image includes a target mark on the target plate base without assembly errors;
[0036] The target mark is used as the foreground content, and the reference image is segmented to obtain the core image; the pixel value of each pixel point in the core image is used to indicate whether the corresponding pixel point belongs to the target mark.
[0037] Optionally, also include:
[0038] According to the set clipping area coordinates and the set clipping area size, clipping a second image block including the target mark from the reference image;
[0039] The step of taking the target mark as the foreground content and performing segmentation processing on the reference image to obtain the core image includes:
[0040] The target mark is used as the foreground content, and the second image block is segmented to obtain the nuclear image.
[0041] Optionally, the method further includes: performing position calibration processing on each target plate in the gene sequencing pre-processing equipment based on the target plate base assembly error.
[0042] In a second aspect, an optional implementation of the present disclosure further provides a computer device, a processor, and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the processor is used to execute the machine-readable instructions stored in the memory, and when the machine-readable instructions are executed by the processor, the machine-readable instructions perform the steps in the above-mentioned first aspect, or any possible implementation of the first aspect.
[0043] In a third aspect, an optional implementation of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed, the steps of the above-mentioned first aspect, or any possible implementation of the first aspect are executed.
[0044] The present invention photographs a target plate base for placing a target plate in a gene sequencing pre-processing instrument, obtains an original image of the target plate base, takes a target mark in the original image as a foreground content, performs segmentation processing on the original image to obtain a target segmentation image, performs position matching between a nuclear image representing a standard position of the target mark and the target segmentation image, and determines the assembly error of the target plate base based on the position adjustment information in the position matching process, thereby achieving high-precision detection and calibration of the target plate position error.
[0045] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.
[0047] Figure 1 A schematic diagram showing a nucleic acid extraction process provided by some embodiments of the present disclosure is shown;
[0048] Figure 2 A schematic diagram of a gene sequencing pre-processing system provided by some embodiments of the present disclosure is shown;
[0049] Figure 3 A schematic diagram of a quality control system provided by some embodiments of the present disclosure is shown;
[0050] Figure 4 A schematic diagram of a library construction system provided in some embodiments of the present disclosure is shown;
[0051] Figure 5 A flow chart of a method for identifying target plate base assembly errors provided in some embodiments of the present disclosure is shown;
[0052] Figure 6 A schematic diagram showing a nuclear image provided by some embodiments of the present disclosure;
[0053] Figure 7 A schematic diagram of a computer device provided by some embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure is not intended to limit the scope of the present disclosure claimed for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0055] Next Generation Sequencing (NGS) technology is a revolutionary change to first-generation sequencing technology. Among the second-generation sequencing technologies, polymerase sequencing, pyrophosphate sequencing and AB ligase sequencing are the representatives. These technologies use miniaturized and parallelized platforms, and each instrument runs 10,000 to 4.3 billion short reads (50 to 400 bases each) for sequencing. In the past two years, PacBio and Oxford Nanopore Technologies have successively launched third-generation sequencing technologies. Compared with the previous two generations, the biggest feature of the third-generation sequencing technology is single-molecule sequencing, and the sequencing process does not require PCR amplification. However, due to the immaturity of the third-generation sequencing technology, the most widely used technology in the world is still the second-generation sequencing technology.
[0056] Although the second-generation sequencing technology has a wide range of applications, it requires a relatively complex pre-treatment process before sequencing. The pre-treatment process includes but is not limited to nucleic acid extraction, nucleic acid extraction product quality control, library construction, library construction product quality control, and finally the obtained library can be sequenced on the machine.
[0057] To facilitate the understanding of the technical solution of the present disclosure, the technical terms in the embodiments of the present disclosure are first explained:
[0058] Nucleic acid extraction
[0059] Nucleic acid extraction is a technique that separates nucleic acids from biological samples by physical, chemical, biological methods or a combination of these methods. It is mainly used to separate nucleic acid molecules (such as DNA or RNA) from biological samples for subsequent experimental analysis, such as sequencing analysis.
[0060] Taking chemical separation as an example, nucleic acid molecules can be released from sample cells by lysing sample cells with cell lysis solution, and nucleic acid molecules exist in the lysate solution together with impurities such as proteins. If pure nucleic acid molecules are to be obtained, the lysate needs to be further purified. Figure 1As shown, the embodiment of the present disclosure provides a specific example of nucleic acid extraction, and the example takes magnetic bead purification as an example. Magnetic beads are added to the lysate, and the nucleic acid molecules released from the sample cells are specifically adsorbed on the surface of the magnetic beads, while impurities such as proteins are not adsorbed and remain in the lysate. After a certain reaction time, the magnetic beads adsorbed with the nucleic acid molecules are separated from the solution under the action of the magnetic field, and then the magnetic beads adsorbed with the nucleic acid molecules are washed with a washing solution to wash away impurities such as proteins. At the same time, in order to wash cleanly, the washing can be repeated many times to recover pure magnetic beads adsorbed with nucleic acid molecules. Finally, the nucleic acid molecules and the magnetic beads are desorbed by elution with an elution solution. After a certain reaction time, the magnetic beads are separated from the nucleic acid molecules again under the action of the magnetic field. After removing the magnetic beads, only pure nucleic acid molecules remain in the nucleic acid extraction product.
[0061] Nucleic acid extraction product quality control
[0062] The concentration detection (or concentration quantitative analysis) of nucleic acid molecules (such as DNA or RNA) in the nucleic acid extraction product solution is very important. Usually, the subsequent library construction process has certain requirements for the total amount of nucleic acid required. Once the actual nucleic acid input exceeds the total amount of nucleic acid required for the subsequent library construction process, it will affect the amplification efficiency during library construction. Therefore, it is also necessary to detect the nucleic acid concentration in the nucleic acid extraction product before library construction. After detecting the nucleic acid concentration, the total capacity of the required nucleic acid extraction product can be further determined based on the nucleic acid concentration and the total amount of nucleic acid required for the subsequent library construction process. In addition, when the detected nucleic acid concentration is too high, the total capacity of the required nucleic acid extraction product will be lower than the minimum pipetting volume of the pipetting device and affect the pipetting accuracy. Therefore, it is necessary to add a diluent (e.g., pure water) to the nucleic acid extraction product before pipetting for appropriate dilution. Several common concentration detection methods include, for example, spectrophotometry, fluorescent dye detection, microfluidics analysis, or capillary gel electrophoresis.
[0063] Library construction
[0064] In the next generation sequencing (NGS) technology, nucleic acid molecules (such as DNA or RNA) extracted from biological samples need to be broken by physical or enzymatic methods, for example, by ultrasound, to form nucleic acid fragments. The two ends of the nucleic acid fragments are first filled with enzymes, and then the two ends of the fragments are connected to a specific DNA sequence (usually, this specific DNA sequence is also called a linker) with a specific enzyme. Finally, the nucleic acid fragments formed are called libraries in the industry.
[0065] In order to save sequencing costs, generally, multiple biological samples will be sequenced in a sequencer at the same time. In order to distinguish the sequencing results of different samples, when preparing libraries of different samples, a DNA sequence (usually containing 6-8 bases) that can identify the source of the sample will be included in the connector. This DNA sequence that can identify the source of the sample can also be called a sample tag (or Index, Barcode). It can be understood that each sample library connector contains its own sample tag.
[0066] Library construction product quality control
[0067] The quality of the constructed library is crucial for the data quality of the subsequent gene sequencing output. Therefore, it is also necessary to detect and control the quality of the library in the library construction product before sequencing on the machine. Usually, the library quality detection includes at least one of the library length detection, library concentration detection and library pollutant detection. Among them, the library concentration can be detected by library concentration detection (or concentration quantitative analysis), and when the detected library concentration is too high, the total capacity of the library construction product required for subsequent sequencing will be lower than the minimum pipetting volume of the pipetting device and affect the pipetting accuracy. Therefore, it is necessary to add a diluent (e.g., pure water) to the library construction product before pipetting for moderate dilution. In addition, due to the difference between the library concentrations of multiple biological samples and the difference between the sequencing data output, the total capacity of the library construction products of multiple biological samples required for subsequent sequencing is different and ultimately affects the balance of the sequencing data output of multiple biological samples. Therefore, it is also necessary to add a diluent (e.g., pure water) to dilute the library construction products of some biological samples before pipetting to narrow the gap between the total capacity of the library construction products of multiple biological samples. Several common concentration detection methods include, for example, spectrophotometry, fluorescent dye detection, microfluidics analysis, or capillary gel electrophoresis.
[0068] Here, it should be noted that for the quality control of library construction products and nucleic acid extraction products, their concentration detection can adopt the same method or different methods, and this application does not limit this.
[0069] Gene sequencing pre-processing system
[0070] See also Figure 2 As shown, the gene sequencing pre-processing system (or sequencing pre-processing instrument) includes: a nucleic acid extraction system 10, a library construction system 20, a quality control system 30, an electronic control system 40 and a host computer 50. Among them:
[0071] A nucleic acid extraction system 10 configured to controllably separate nucleic acid molecules (such as DNA or RNA) from a biological sample;
[0072] A library construction system 20 is configured to controllably prepare nucleic acid molecules (such as DNA or RNA) into a library that can be sequenced on a machine;
[0073] The quality control system 30 is configured to controllably detect the concentration of nucleic acid molecules in the nucleic acid extraction product and adjust the concentration of the nucleic acid molecules to a pre-required concentration range according to the detection result, and / or controllably detect the concentration of the library in the library construction product and adjust the concentration of the library to a pre-required concentration range according to the detection result;
[0074] The electronic control system 40 is configured to control the operation and work of the nucleic acid extraction system 10, the library construction system 20, and the quality control system 30 according to the instructions of the host computer 50;
[0075] The host computer 50 is configured to control the operation and work of the nucleic acid extraction system 10 , the library construction system 20 , and the quality control system 30 by sending control instructions to the electronic control system 40 .
[0076] Nucleic acid extraction system 10
[0077] Taking chemical separation and magnetic bead purification as examples, the nucleic acid extraction system 10 at least includes a nucleic acid extraction platform and a magnetic rod / magnetic rod sleeve assembly. Among them, the nucleic acid extraction platform is provided with an extraction working container (such as a single reagent strip or a deep well plate) and a heating device (such as a heating block). In addition to accommodating one or more reagents required for nucleic acid extraction (such as cell lysis solution, washing solution, eluent), the extraction working container can also accommodate biological samples and magnetic particles (such as magnetic beads), and provide reaction space for various chemical reactions (such as lysis reaction, washing reaction, elution reaction) during nucleic acid extraction; the heating device can provide suitable reaction temperature and reaction conditions for various chemical reactions occurring in the extraction working container. The magnetic rod sleeve is set on the magnetic rod to prevent the magnetic rod from directly contacting the nucleic acid extraction reagent and corroding the magnetic rod. When the magnetic rod / magnetic rod sleeve assembly enters the extraction working container through the motion mechanism, it can provide the necessary magnetic field environment for the washing reaction and elution reaction during the nucleic acid extraction process.
[0078] It should be noted that the nucleic acid extraction system 10 can perform nucleic acid extraction processing on multiple biological samples in batches.
[0079] Quality Control System 30
[0080] like Figure 3 As shown, the quality control system 30 at least includes a quantitative analyzer 31, a quality control operator component 32 ( Figure 3 Only the working area is shown), the transmission mechanism 33, the quality control pipetting component 34 ( Figure 3 Only the working area is shown), a reaction container 35, a quality control container 36 and a detection reagent container 37 are constructed. It should be noted that Figure 3It is merely illustrative and should not be construed as limiting the positions of the various parts.
[0081] Among them, the construction reaction container 35 (such as a microplate) can accommodate nucleic acid extraction products and library construction products, and further provide reaction space for some chemical reactions in the library construction process; the quality control container 36 (such as a centrifuge tube) can accommodate the test object and can be placed in the quantitative instrument for detection; the detection reagent container 37 (such as a reagent kit) can accommodate one or more reagents required for the quantitative analyzer 31 to perform concentration detection and a diluent for adjusting the concentration of nucleic acid extraction products and library construction products. The construction reaction container 35, the quality control container 36, and the detection reagent container 37 are respectively located in their respective storage areas, and the quality control operator assembly 32 and the quality control pipetting assembly 34 work in their respective working areas. The storage area of the quality control container 36 is located within the working area of the quality control operator assembly 32, and the storage area of the construction reaction container 35 and the quality control reagent container 37 are located within the working area of the quality control pipetting assembly 34. A conveying mechanism 33 is provided between the working area of the quality control operating hand assembly 32 and the working area of the quality control pipetting assembly 34 , and the conveying mechanism 33 can reciprocately convey the quality control container 36 between the working area of the quality control operating hand assembly 32 and the working area of the quality control pipetting assembly 34 .
[0082] Before quality control begins, the quality control operator component 32 is responsible for taking out the quality control container 36 from the storage area of the quality control container 36 and placing it on the conveying mechanism 33. The conveying mechanism 33 conveys the quality control container 36 to the working area of the quality control pipetting component 34. The quality control pipetting component 34 is responsible for drawing a certain amount of detection reagent from the detection reagent container 37 and adding it to the quality control container 36. The conveying mechanism 33 then conveys the quality control container 36 (with the detection reagent added) back to the working area of the quality control operator component 32. The quality control operator component 32 is then responsible for placing the quality control container 36 (with the detection reagent added) back to the storage area of the quality control container 36.
[0083] In addition, if it is quality control of the nucleic acid extraction product, the quality control pipetting component 34 is also responsible for sucking the nucleic acid extraction product from the extraction operation container and adding it to the construction reaction container 35.
[0084] After the quality control starts, the quality control operator component 32 is responsible for taking out the quality control container 36 (with the detection reagent added) from the storage area of the quality control container 36 and placing it on the conveying mechanism 33. The conveying mechanism 33 conveys the quality control container 36 (with the detection reagent added) to the working area of the quality control pipetting component 34. The quality control pipetting component 34 is responsible for drawing a certain amount of nucleic acid extraction product / library construction product from the construction reaction container 35 and adding it to the quality control container 36, and stirring it evenly. The conveying mechanism 33 then conveys the quality control container 36 (with the detection reagent and nucleic acid extraction product / library construction product added successively) back to the working area of the quality control operator component 32. The quality control operator component 32 is then responsible for placing the quality control container 36 (with the detection reagent and nucleic acid extraction product / library construction product added successively) back to the storage area of the quality control container 36.
[0085] After the detection reagent and the nucleic acid extraction product / library construction product in the quality control container 36 react for a period of time, the quality control operator component 32 is responsible for taking out the quality control container 36 from the storage area of the quality control container 36 and placing it in the quantitative analyzer 31 for concentration detection. After the detection is completed, the quality control operator component 32 is responsible for taking out the quality control container 36 and putting it back to the storage area.
[0086] If the detected nucleic acid molecule concentration / library concentration is higher than the required concentration, the quality control pipetting component 34 is also responsible for drawing a certain amount of pure water from the detection reagent container 37 and adding it to the construction reaction container 37 for dilution.
[0087] It should be noted here that the quality control system 30 can perform quality control processing on the nucleic acid extraction products / library construction products of multiple biological samples in batches. In the scenario of batch processing, the quality control operator component 32 can take and place the quality control containers 36 one by one, or can take and place multiple quality control containers 36 in batches at one time; correspondingly, the conveying mechanism 33 can convey the quality control containers 36 one by one, or can convey multiple quality control containers 36 in batches at one time; the quality control pipetting component 34 can be a single-channel pipetting component, which absorbs the detection reagents one by one and adds them to the quality control container 36 one by one, or can be a multi-channel pipetting component, which absorbs the detection reagents in batches at one time and adds them to multiple quality control containers 36 in batches at one time. It can be freely set according to the occupied space and work efficiency. Figure 2 This is just an example. In this example, the quality control operator assembly 32 takes and places the quality control containers 36 one by one. The conveying mechanism 33 is provided with two container positions, and can reciprocate one quality control container 36 in opposite directions. The quality control pipetting assembly 34 is a single-channel pipetting assembly.
[0088] In one possible implementation, the quality control pipetting component 34 can be a pipetting pump. To cooperate with the work of the pipetting pump, the pipetting pump needs to be equipped with a pipetting head for pipetting. When the pipetting work starts, the pipetting pump sets the pipetting head on its end. After the pipetting work is completed, the pipetting pump detaches the pipetting head from its end. Correspondingly, the quality control system 30 is also provided with a pipetting head storage area, such as Figure 3 shown.
[0089] Library Construction System 20
[0090] like Figure 4 As shown, the library construction system 20 at least includes a PCR instrument 21, a library construction operator component 22 ( Figure 4 Only the working area is shown), library construction pipetting component 23 ( Figure 4 Only the working area is shown), library construction reagent container 24, oscillating heating component 25 and magnet component 26. It should be noted that Figure 4 It is merely illustrative and should not be construed as limiting the positions of the various parts.
[0091] Among them, the library construction reagent container 24 (such as a test kit) can accommodate one or more reagents required for library construction, and the library construction reagent container 24, the oscillation heating component 25 and the magnet component 26 are respectively located in their respective storage areas, and their respective storage areas are located within the working area range of the library construction operator component 22 and the library construction pipetting component 23. The storage area of the library construction reagent container 24 generally needs to be in a low-temperature refrigeration environment to facilitate the low-temperature refrigeration of the library construction reagents. The oscillation heating component 25 is provided with a purification container (such as a deep well plate) and an oscillation heating device. The purification container can provide a reaction space for the magnetic bead purification in the library construction process, and the oscillation heating device can provide a suitable reaction temperature and reaction conditions for the magnetic bead purification. At the same time, the magnet component 26 can provide the necessary magnetic field environment for the magnetic bead purification.
[0092] After the nucleic acid extraction quality control is completed, the library construction operator component 22 is responsible for taking out the construction reaction container 35 (with the nucleic acid extraction product added) from the quality control system 30 and placing it in a specific storage area in the library construction system 20. In this storage area, various reaction reagents are added to the construction reaction container 35. For the convenience of description, this storage area can be called a reagent adding area. Since nucleic acids are stored in the construction reaction container, the reagent adding area generally needs to be in a low-temperature refrigeration environment to facilitate the low-temperature refrigeration of nucleic acids. Since the entire library construction process includes multiple reaction steps, for each reaction step, the library construction pipetting component 23 is first responsible for aspirating the corresponding reaction reagents from the library construction reagent container 24 and adding them to the construction reaction container 35 (to which the nucleic acid extraction product has been added), and the library construction operator component 22 is then responsible for placing the construction reaction container 35 (to which the nucleic acid extraction product and the corresponding reaction reagents have been added in sequence) into the PCR instrument 21 for reaction. After the reaction is completed, the library construction operator component 22 takes the construction reaction container 35 out of the PCR instrument 21 and puts it back to a specific area to wait for the addition of the reaction reagents for the next reaction, and repeats the above process.
[0093] Wherein, in the process of library construction, after connecting the joints at both ends of the nucleic acid fragments, the connection product needs to be purified, and a pure library can be obtained after purification. In addition, since the amount of library obtained at this time is small, library amplification is usually required, and after library amplification, the amplified product also needs to be purified to obtain a pure library. If magnetic bead purification is adopted, the library construction reagent container 24 can accommodate one or more reagents required for library construction (including washing solution and eluent required for magnetic bead purification), and can also accommodate magnetic beads or other magnetic particles. During the magnetic bead purification reaction of the connection product or amplification product, the library construction pipetting component 23 is responsible for first drawing the connection product / amplification product from the construction reaction container 35 and adding it to the purification container of the oscillating heating component 25, and then drawing the magnetic beads from the library construction reagent container 24 and adding them to the purification container (with the connection product / amplification product added). After a certain reaction time, the library construction operator component 22 is responsible for transferring the purification container (the library has been adsorbed on the surface of the magnetic beads) to the magnet component 26. Under the action of the magnetic field, the magnetic beads adsorbed with the library are separated from the solution, and the library construction pipetting component 23 then sucks out the supernatant in the purification container, leaving the magnetic beads adsorbed with the library. The library construction pipetting component 23 continues to draw the washing solution from the library construction reagent container 24 and add it to the purification container. After a certain reaction time, the supernatant is sucked away. According to experimental needs, the library construction pipetting component 23 can be repeatedly operated for multiple washings. After washing, the library construction operation hand component 22 transfers the purification container to the oscillating heating component 25, and the library construction pipetting component 23 continues to absorb the eluent from the library construction reagent container 24 and add it to the purification container. After a certain reaction time, the library and the magnetic beads are desorbed, and the library construction pipetting component 23 then absorbs the supernatant (i.e., the library construction product) in the purification container and adds it to the construction reaction container 35.
[0094] Generally, a sealing film is attached to the upper surface of the library construction reagent container 24 to facilitate the storage and transportation of the internal reagents. After the reagent container is loaded into the sequencing pre-processing instrument, it needs to be pierced by the piercing component 27 ( Figure 4 After the sealing film is pierced (only the working area is shown in the figure), the corresponding pipetting component can draw reagents from the library file reagent container 24, and the storage area of the library construction reagent container 24 is located within the working area of the piercing component 27.
[0095] In addition, considering that the capacity of magnetic beads, washing solution, and eluent required in the magnetic bead purification process is large and does not need to be in a low-temperature refrigeration environment, in addition to the library construction reagent container 24, the library construction system 20 can further be provided with a large-capacity reagent container 29 to store large-capacity reagents such as magnetic beads, washing solution, and eluent.
[0096] It should be noted that the library construction operator component 22 and the library construction pipetting component 23 can be independently set. Considering that the library construction operator component 22 and the library construction pipetting component 23 do not need to work in parallel, the two can also be integrated into one to save space. In addition, the library construction system 30 can perform library construction processing on nucleic acid extraction products of multiple biological samples in batches.
[0097] In one possible implementation, the library pipetting component 22 can be a pipetting pump. To cooperate with the operation of the pipetting pump, the pipetting pump needs to be equipped with a pipetting head for pipetting. When the pipetting work starts, the pipetting pump sets the pipetting head on its end. After the pipetting work is completed, the pipetting pump detaches the pipetting head from its end. Correspondingly, the library construction system 20 is also provided with a pipetting head storage area, and the used pipetting heads will be put into the waste container 28, such as Figure 4 shown.
[0098] However, there are many steps involved in the pre-processing of gene sequencing, and the containers used in different steps and the areas where the containers are located are different. For example, the library construction reagent container 24 (such as a test kit), the construction operation container 35 (such as a microplate), the purification container placed on the oscillating heating component 25 (such as a deep well plate), the pipette head container (such as a pipette head plate) placed in the pipette head storage area for accommodating the pipette head used for pipetting by the pipette pump, etc., these containers can also be collectively referred to as target plates in this application. Before conducting the pre-processing experiment, the operator needs to manually place various types of target plates on their bases. Inevitably, during the assembly process of the gene sequencing pre-processing equipment, each target plate base used to place the target plate will have different degrees of assembly errors, and this assembly error will further bring about the position error of the target plate. Each position error will affect the accuracy and completion of the actions performed by the relevant actuators (e.g., library construction operator component 22, library construction pipetting component 23, quality control operator component 32, quality control pipetting component 34) in the gene sequencing pre-processing system. Therefore, before the experiment in the gene pre-processing system, it is necessary to first identify and calibrate the positions of each target plate in the system. Since the assembly error of the base is small and cannot be distinguished by the naked eye, the position error of the target plate is also difficult to accurately identify. Therefore, a high-precision target plate base assembly error identification method is needed to be able to identify the target plate base assembly error with higher accuracy, so that the target plate placed on the target plate base can be calibrated according to the target plate base assembly error.
[0099] Based on the above research, the present disclosure provides a method for identifying and calibrating the assembly error of a target plate base. Marks are set on the base of the target plate, and based on the marks on the target plate base, the assembly error of the target plate base is accurately identified so that the position of the target plate placed on the target plate base can be calibrated to avoid the target plate position error caused by the assembly error affecting the accuracy and completeness of the execution actions of the relevant actuators in the gene sequencing pre-processing system.
[0100] The defects existing in the above solutions are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the present disclosure for the above problems below should be the contributions made by the inventor to the present disclosure during the disclosure process.
[0101] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0102] To facilitate understanding of this embodiment, a method for identifying a target plate base assembly error disclosed in an embodiment of the present disclosure is first introduced in detail. The execution subject of the method for identifying a target plate base assembly error provided in the embodiment of the present disclosure is generally a computer device with certain computing power, and the computer device includes, for example, a host computer in a gene sequencing pre-processing device. In some possible implementations, the method for identifying a target plate base assembly error can be implemented by a processor calling a computer-readable instruction stored in a memory.
[0103] The following is an explanation of the target plate base assembly error identification method provided by the embodiment of the present disclosure.
[0104] See also Figure 5 As shown, it is a flow chart of a method for identifying target plate base assembly errors provided by an embodiment of the present disclosure, the method comprising steps S501 to S504, wherein:
[0105] S501: Acquire an original image of a target plate base; the original image is obtained by photographing a target plate base for placing a target plate in a gene sequencing pre-processing instrument, and the original image includes a target mark on the target plate base.
[0106] In a specific implementation, the target plate base is a component in a gene sequencing pre-processing instrument for placing a target plate; each target plate base is used to place at least one target plate; when the target plate base is assembled into a gene sequencing pre-processing instrument, there may be a certain assembly error; a target mark is provided on the target plate base, and the embodiment of the present disclosure identifies the assembly error of the target plate base through the target mark.
[0107] In order to obtain the original image, an image sensor for photographing the target plate base can be deployed on the pre-processing device, or an image sensor independent of the pre-processing device can be set, and the shooting field of the image sensor is directed toward the target plate base. The image sensor is controlled to photograph the target plate base to obtain the original image of the target plate base.
[0108] When shooting the original image, the image sensor may be controlled to shoot the entire area where the target plate base is located, or each target plate base in the area where the target plate base is located may be shot separately.
[0109] a1: When the area where the target plate base is located is photographed as a whole, the original image usually includes multiple target plate bases; in this case, the relative position of the image sensor and the target plate base usually does not change; before using the image sensor to photograph the target plate base, the association relationship between each target plate base and the image coordinate system corresponding to the image sensor can be pre-calibrated, that is, the coordinates in the image coordinate system are determined for each target plate base; based on the above association relationship, each target plate base photographed in the image can be bound to the specific image coordinates to facilitate the subsequent detection of the target marks on each target plate base.
[0110] a2: When each target plate base deployed in the area where the target plate base is located is photographed separately, the original image obtained usually includes only one target plate base; the image sensor can be controlled to move relative to each target plate base according to a specific moving path, and after each movement, a specific target plate base in the area where the target plate base is located enters the shooting field of view of the image sensor, and the image sensor is controlled to shoot the specific target plate base to obtain the original image corresponding to the target plate base. In this case, the association relationship between the target plate base and the corresponding image coordinate system after the image sensor moves to a certain target plate base can also be pre-calibrated; according to the above association relationship, the photographed target plate base and the image coordinate system are bound together to facilitate the subsequent detection of the target mark in the original image.
[0111] Following the above S501, the target plate base assembly error identification method provided by the embodiment of the present disclosure further includes:
[0112] S502: Using the target mark as the foreground content, the original image is segmented to obtain a target segmented image; wherein the pixel value of each pixel in the target segmented image is used to indicate whether the pixel belongs to the foreground content.
[0113] In a specific implementation, the target mark is, for example, a cross mark set on the target plate base; the center of the cross mark is, for example, located at the center of the target plate base; the cross mark also includes two arms perpendicular to each other; when the two arms of the cross mark are in a specific state, such as being parallel to a certain direction respectively, and the projection center of the cross mark in the image coordinate system is located at a certain position, the assembly of the target plate base is in a standard state. The assembly error of the target plate base can be determined by detecting the error between the target mark and the specific state.
[0114] When the target mark is used as the foreground content, when the original image is segmented, the original image including the target plate base can be directly segmented.
[0115] In addition, the acquired original image may include the complete target plate base, and may also include a partial area of the target plate base where the target mark is set.
[0116] If the original image also includes other areas besides the target mark on the target plate base, it will affect the efficiency of the subsequent processing process. Therefore, in another embodiment of the present disclosure, after acquiring the original image, the first image block including the target mark can be intercepted from the original image according to the set interception area coordinates and the set interception area size:
[0117] When the target mark is used as the foreground content and the original image is segmented to obtain the target segmented image, for example, the target mark is used as the foreground content and the first image block is segmented to obtain the target segmented image.
[0118] Specifically, when the first image block including the target mark is intercepted from the original image according to the set interception area coordinates and the set interception area size, for example, the following method may be used:
[0119] Detecting whether the original image meets the target condition;
[0120] When the original image satisfies the target condition, a first image block including the target mark is intercepted from the original image according to the set interception area coordinates and the set interception area size;
[0121] The original image satisfies the target condition, which may include at least one of the following:
[0122] b1: The captured original image includes multiple target plate bases.
[0123] In this case, it can be directly determined whether the target condition is met according to the configuration data when the target plate image is captured. If the configuration data indicates that the target plate base of the pre-processing device is captured as a whole, the original image will include multiple target plate bases. In this case, the first image block containing the target mark will be captured from the original image according to the set capture area coordinates and the set capture area size.
[0124] b2: The size of the original image is greater than or equal to the preset size threshold.
[0125] In this case, the error identification method provided by the embodiment of the present disclosure further includes:
[0126] Performing size detection on the original image; and determining that the original image meets the target condition when the size of the original image is greater than or equal to a preset size threshold.
[0127] b3: There is a noise area in the original image whose intensity is greater than or equal to the foreground content intensity, and the noise area is larger than a preset area threshold.
[0128] In this case, the error identification method provided by the embodiment of the present disclosure further includes:
[0129] Performing intensity value detection on the original image; and determining that the original image meets the target condition when there is a noise region in the original image whose intensity is greater than the foreground content intensity and the noise region is greater than a preset area threshold.
[0130] In addition, when the first image block including the target mark is intercepted from the original image, since the position of the target mark on the target plate base is usually fixed, that is, the target mark is set at the same position of each target plate base. When the original image is captured by an image sensor at a fixed position or an image sensor moving according to a specific moving path without error in the assembly of the target plate base, the position of the target mark on each target plate base in the image coordinate system is usually unchanged, and the projection position of the target mark in the image coordinate system when each target plate base is in a standard state can be established. Therefore, according to the projection position, the set interception area coordinates corresponding to the target mark on each target plate base and the set interception area size can be pre-set. When the first image block is intercepted from the original image, if the original image is determined in the manner described in a1 above, the first image block including the target mark on each target plate base can be intercepted from the original image directly according to the set interception area coordinates and the set interception area size corresponding to each target plate base. If the original image is determined by the method described in a2 above, the coordinates of the interception area corresponding to the target plate base can be obtained and the size of the interception area can be set based on the mapping relationship between the camera coordinate system where the original image is located and the target plate base. Then, the first image block containing the target mark can be intercepted from the original image.
[0131] In another embodiment of the present disclosure, for example, a pre-trained target detection model can be used to perform target detection processing on the target mark included in the original image to identify the position information of the target mark in the original image, where the position information includes the coordinates and size of the target mark in the original image (such as defined by a rectangular frame). Then, based on the position information, the first image block including the target mark is captured from the original image.
[0132] After obtaining the first image block, the target mark can be used as the foreground content, and other areas on the target plate can be used as the background content to perform segmentation processing on the first image block to obtain a target segmentation image.
[0133] Specifically, for example, the original image or the first image block may be segmented in the following manner:
[0134] Determining a segmentation threshold of the original image or the first image block according to the intensity value of each pixel in the original image or the first image block;
[0135] Traversing each pixel in the original image or the first image block, and comparing the intensity value of the traversed pixel with the segmentation threshold;
[0136] When the pixel value of the traversed pixel point is greater than or equal to the segmentation threshold, setting the pixel value of the pixel point to a first value; and
[0137] When the pixel value of the traversed pixel point is less than the segmentation threshold, the pixel value of the pixel point is set to a second value;
[0138] The first value is used to indicate that the corresponding pixel point belongs to the foreground content; the second value is used to indicate that the corresponding pixel point belongs to the background content.
[0139] In specific implementations, the intensity value of a pixel is a numerical value used to describe the size of a physical quantity (such as light intensity, color component, etc.) carried by the pixel. It is a basic concept in digital image processing, and different image types (such as grayscale images, color images) have different ways of representing pixel intensity values.
[0140] For example, in a grayscale image, a pixel has only one intensity value, which usually represents a grayscale level from black to white. The range of this intensity value can vary depending on the storage format and depth of the image. For example, for an 8-bit grayscale image, the pixel intensity value range is 0-255, where 0 represents black (no light intensity at all), 255 represents white (maximum light intensity), and the values in between represent different shades of gray.
[0141] In the most common RGB color images, each pixel consists of three intensity values, representing the intensity of the three color channels: red, green, and blue. Similarly, for each 8-bit color channel, the intensity value range is 0-255. For example, the pixel represents pure red, where 255 is the intensity value of the red channel, indicating that the intensity of red light reaches the maximum value, while the green and blue channel intensity values are 0, indicating that there is no green and blue light.
[0142] By changing the intensity value combination of the three channels, a variety of colors can be obtained. For example, to represent cyan, since cyan is a mixture of green and blue, the red channel intensity is 0, and the green and blue channel intensities are the maximum.
[0143] In the CMYK color model, the intensity value of a pixel represents the content of four colors: cyan, magenta, yellow, and key / black. In the HSV (Hue, Saturation, Value) color model, the pixel intensity value corresponds to hue, saturation, and value. For example, in the HSV model, the hue value determines the type of color, and the value range is usually 0-360 degrees; saturation represents the purity of the color, and the range is 0-1; and lightness represents the brightness of the color, and the range is 0-1.
[0144] The intensity value of each pixel in the original image or the first image block may be represented by, for example, the grayscale value of each pixel in the original image or the first image block.
[0145] If the captured original image is an image with multiple color channels, the original image with multiple color channels or the first image block obtained by cropping the original image is converted into a grayscale image, and the grayscale value of each pixel in the grayscale image is determined as the intensity value of each pixel.
[0146] In the embodiments of the present disclosure, for example, the average intensity value of each pixel in the original image or the first image block can be counted and the average intensity value can be used as the segmentation threshold; or, the number of pixel points that fall into multiple intensity value intervals can be counted, and based on the number of pixel points corresponding to the multiple intensity value intervals, a target intensity value interval with the largest number of pixel points can be determined from the multiple intensity value intervals, and the maximum intensity value or the minimum intensity value or the average of the maximum intensity value and the minimum intensity value of the target intensity value interval can be determined as the segmentation threshold.
[0147] In addition, when determining the segmentation threshold of the original image or the first image block, for example, the following method may be used:
[0148] According to the pixel value of each pixel point in the original image or the first image block, the original image or the first image block is converted into a grayscale image; the grayscale value of each pixel point in the grayscale image represents the intensity value of the corresponding pixel point;
[0149] The segmentation threshold is determined according to the grayscale value of each pixel in the grayscale image.
[0150] Specifically, the embodiment of the present disclosure takes the Otsu method as an example to determine the segmentation threshold value, and describes in detail the method for determining the segmentation threshold value of the original image:
[0151] For the original image, the original image is converted into a grayscale image, that is, the pixel value of each pixel in the original image is mapped to a grayscale value of 0-255, and each pixel in the original image converted into a grayscale image is divided into two categories: foreground and background through a segmentation threshold τ.
[0152] Among them, the background is called class A (intensity value is less than τ), and the foreground is called class B (intensity value is greater than or equal to τ).
[0153] When converting the original image into a grayscale image, for example, any one of the weighted average method, the average method, and the maximum and minimum method may be used.
[0154] Then count the number of pixels of each gray value, let n i is the total number of pixels with gray value i in the image, then we can get: n1, n2, ..., ni ,…,n 255 .
[0155] The probability that the gray value of each pixel in the grayscale image is i is:
[0156]
[0157] And satisfy:
[0158] Assuming that the segmentation threshold t is known, the variance between class A and class B can be determined.
[0159] For class A, the probability that a pixel is assigned to class A is:
[0160]
[0161] The average pixel gray value of class A pixels is:
[0162]
[0163] Similarly, for class B, the probability that a pixel is assigned to class B is:
[0164]
[0165] The average pixel gray value of class B pixels is:
[0166]
[0167] And the average gray value of the pixels of the entire image is:
[0168]
[0169] Then we can get the following formula (1) and formula (2):
[0170] p A (t)+p B (t) = 1 (1)
[0171] p A (t)×m A (t)+p B (t)×m B (t) = m G (2)
[0172] And the overall variance of class A and class B is:
[0173] σ 2 =p A (t)(m A (t)-m G ) 2 +pB (t)(m B (t)-m G ) 2 (3)
[0174] Substituting (2) into (3) yields:
[0175] σ 2 =p A (t)p B (t)(m A (t)-m B (t)) 2 (4)
[0176] Therefore, the inter-class variance is expressed as a function of the segmentation threshold t. It is only necessary to solve t so that the variance σ 2 The maximum value is sufficient. To do this, we can traverse [0-255] and find the value that makes σ 2 The largest t.
[0177] will make σ 2 The largest t is used as the segmentation threshold τ to segment the original image.
[0178] The method of determining the segmentation threshold of the first image block using the Otsu method is similar to the above process and will not be described in detail here.
[0179] After obtaining the segmentation threshold, the grayscale values of each pixel in the grayscale image can be traversed, and the grayscale values of the traversed pixels can be compared with the segmentation threshold. If the grayscale value of a pixel is greater than or equal to the segmentation threshold, it is determined that the pixel belongs to the foreground content; if the grayscale value of a pixel is less than the segmentation threshold, it is determined that the pixel belongs to the background content.
[0180] The pixel values of the pixels belonging to the foreground content are set to 1, and the pixel values of the pixels belonging to the background content are set to 0, to obtain the target segmented image.
[0181] Following the above S502, the target plate base assembly error identification method provided by the embodiment of the present disclosure further includes:
[0182] S503: Position matching is performed on the nuclear image and the target segmented image with the goal of maximizing the overlap between the target segmented image and the nuclear image; the nuclear image is used to represent the standard position of the target mark;
[0183] S504: Determine the target plate base assembly error based on the position adjustment information in the position matching process.
[0184] In a specific implementation, when the nuclear image and the target image are positionally matched, the relative position relationship between the nuclear image and the target image is adjusted, for example, by adjusting at least one of the position and rotation angle of the nuclear image, the target image, or a combination thereof, so that the overlap between the nuclear image and the target image can be maximized.
[0185] In this process, corresponding displacement and rotation will be generated, and the displacement includes, for example, the direction of movement and the distance of movement; the rotation includes, for example, the direction of rotation and the angle of rotation. The above displacement and rotation related information are the position adjustment information.
[0186] The nuclear image in the embodiment of the present disclosure is, for example, an image used to characterize the standard position of the target mark obtained by photographing the target plate base in the standard position when the assembly position of the target plate base is in the standard position (no assembly error). The nuclear image is used to perform a sliding window traversal on the target segmentation image; the size of the nuclear image is the same as the size of the sliding window, and the pixel value of each pixel in the nuclear image is used to characterize whether the pixel belongs to the target mark. Exemplarily, when the target mark is a cross mark and the size of the nuclear image is 5*5, the nuclear image can be, for example, as follows Figure 6 As shown, a black pixel indicates that the pixel belongs to the target mark; a white pixel indicates that the pixel does not belong to the target mark.
[0187] In addition, the present disclosure provides a specific method for acquiring a nuclear image, including:
[0188] Acquire a reference image; the reference image is obtained by photographing a target plate base without assembly errors, and the reference image includes a target mark on the target plate base without assembly errors;
[0189] The target mark is used as the foreground content, and the reference image is segmented to obtain the core image; the pixel value of each pixel point in the core image is used to indicate whether the corresponding pixel point belongs to the target mark.
[0190] In a specific implementation, the position of the target plate base in a certain assembly state can be used as its standard position, and the position of the target plate base in the standard position can be used as the standard position of the target mark, and a reference image of the target plate base can be obtained in this assembly state.
[0191] Then, the target mark is used as the foreground content, and the reference image is segmented to obtain the core image.
[0192] In addition, after obtaining the reference image, the second image block including the target mark can be intercepted from the reference image according to the set interception area coordinates and the set interception area size. When the reference image is segmented, for example, the target mark can be used as the foreground content, and the second image block can be segmented to obtain the core image.
[0193] Here, the manner of segmenting the reference image or the second image block is similar to the manner of segmenting the original image or the first image block, and will not be described in detail herein.
[0194] After the nuclear image is formed, the nuclear image and the target segmentation image can be matched, and the target plate base assembly error can be determined based on the matched position adjustment information.
[0195] Specifically, the embodiment of the present disclosure further provides a specific method for position matching the nuclear image and / or the target segmented image with the goal of maximizing the overlap between the target segmented image and the nuclear image, including:
[0196] Taking the nuclear image as a sliding window, and taking the maximum overlap between the nuclear image and the target segmented image after sliding as the goal, the nuclear image is displaced and adjusted according to a preset sliding step and a preset sliding trajectory;
[0197] Determining the center position of the nuclear image relative to the target segmented image when the overlap is maximum;
[0198] The center position is used as a rotation point, and the maximum overlap between the nuclear image and the target segmented image after rotation is used as a goal. The rotation angle of the nuclear image is adjusted according to a preset rotation angle step and a preset rotation direction.
[0199] In a specific implementation, the core image is displaced and adjusted according to a preset sliding step and a preset sliding trajectory. For example, the core image is used as a sliding window to traverse the target segmented image. During the traversal process, the preset sliding step is, for example, 1 pixel, that is, the target segmented image is traversed pixel by pixel. The traversal can start from the starting point of the traversal, such as using the pixel points in the first row and first column of the segmented image as the pixel points that match the pixel points in the first row and first column of the core image, to determine the traversal starting point, and to determine the size of the core image as the size of the traversal window, and to circle the sub-region corresponding to the traversal starting point from the segmented image; then, the intensity values of the pixel points in the sub-region and the pixel points in the core image are accumulated and summed, and the result of the accumulated sum is used as the overlap between the sub-region and the core image.
[0200] With a step length of 1 pixel, the window is controlled to slide from left to right and from top to bottom in the segmented image (preset sliding track), and after each window slide, the area within the window on the segmented image is used as the sub-region of each traversal, and the intensity values of the pixel points of the sub-region of each traversal and the pixel points of the nuclear image are accumulated and summed, and the result of the accumulated sum is used as the coincidence between the sub-region and the nuclear image. Until the window moves from the upper left corner of the segmented image to the lower right corner, the coincidence between multiple sub-regions and the nuclear image is obtained.
[0201] Then, the sub-region with the highest overlap is taken as the target region where the center of the target mark is located. After the target region is determined, the center position of the nuclear image relative to the target segmented image is determined. The center position of the nuclear image is calculated by the upper left corner position of the nuclear image and the length and width of the target mark.
[0202] After the center position of the nuclear image is obtained, the rotation angle of the nuclear image is adjusted according to a preset rotation angle step and a preset rotation direction.
[0203] A maximum candidate overlap is determined from the candidate overlaps corresponding to the multiple angle adjustments, and an angle value and / or a direction of the angle adjustment is determined according to an adjustment order corresponding to the maximum candidate overlap and the preset angle step.
[0204] Here, when the angle of the nuclear image is adjusted, for example, the nuclear image is rotated clockwise or counterclockwise with the center position of the nuclear image as the rotation point. After each angle adjustment, the method of determining the candidate coincidence degree between the nuclear image after the angle adjustment and the target area is similar to the method of determining the candidate coincidence degree between the nuclear image and the sub-area described above, and will not be repeated here.
[0205] Assume that the nuclear image is adjusted N times, the preset angle step is s, and the preset angle direction of each adjustment is clockwise and counterclockwise; Assume that after the i-th adjustment in the clockwise direction (adjustment order), the overlap between the adjusted nuclear image and the target area is the largest, then at this time, the angle value of the angle adjustment is: i×s, and the clockwise direction is determined as the direction of the angle adjustment. Assume that after the j-th adjustment in the counterclockwise direction (adjustment order), the overlap between the adjusted nuclear image and the target area is the largest, then at this time, the angle value of the angle adjustment is: -j×s, and the counterclockwise direction is determined as the direction of the angle adjustment.
[0206] It should be noted here that the above only gives an example of performing displacement adjustment and angle adjustment on the nuclear image toward the target segmentation image. It can be understood that the target segmentation image can also be subjected to displacement adjustment and angle adjustment toward the nuclear image, or the target segmentation image and the nuclear image can be subjected to displacement adjustment and angle adjustment with respect to each other. All of the above are within the protection scope of the present application.
[0207] In another embodiment of the present disclosure, after obtaining the target plate base assembly error, the target plate installed on the target plate base can also be subjected to position calibration processing based on the target plate base assembly error. When the target plate installed on the target plate base is subjected to position calibration processing, for example, the positions of each target plate recorded in the gene sequencing pre-processing equipment are calibrated to obtain the calibrated target plate position, so that the relevant actuators in the gene sequencing pre-processing system perform corresponding actions based on the calibrated target plate position, thereby improving the accuracy and completion of the actions performed by the relevant actuators.
[0208] The present invention photographs a target plate base for placing a target plate in a gene sequencing pre-processing instrument, obtains an original image of the target plate base, takes a target mark in the original image as a foreground content, performs segmentation processing on the original image to obtain a target segmentation image, performs position matching between a nuclear image representing a standard position of the target mark and the target segmentation image, and determines the assembly error of the target plate base based on the matched position adjustment information, thereby achieving high-precision detection and calibration of the target plate position error.
[0209] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0210] The present disclosure also provides a computer device, such as Figure 7 FIG. 1 is a schematic diagram of a computer device structure provided in an embodiment of the present disclosure, including:
[0211] A processor 71 and a memory 72; the memory 72 stores machine-readable instructions executable by the processor 71, and the processor 71 is used to execute the machine-readable instructions stored in the memory 72. When the machine-readable instructions are executed by the processor 71, the processor 71 performs the following steps:
[0212] Acquire an original image of a target plate base; the original image is obtained by photographing a target plate base for placing a target plate in a gene sequencing pre-processing instrument, and the original image includes a target mark on the target plate base;
[0213] The target mark is used as the foreground content, and the original image is segmented to obtain a target segmented image; wherein the pixel value of each pixel in the target segmented image is used to indicate whether the pixel belongs to the foreground content;
[0214] The nuclear image and the target segmented image are positionally matched with each other with the goal of maximizing the overlap between the target segmented image and the nuclear image; the nuclear image is used to characterize the standard position of the target marker;
[0215] The target plate base assembly error is determined based on the position adjustment information summarized in the position matching process.
[0216] The above-mentioned memory 72 includes internal memory 721 and external memory 722; the memory 721 here is also called internal memory, which is used to temporarily store the calculation data in the processor 71 and the data exchanged with the external memory 722 such as the hard disk. The processor 71 exchanges data with the external memory 722 through the internal memory 721.
[0217] The specific execution process of the above instructions can refer to the steps of the target plate base assembly error identification method described in the embodiment of the present disclosure, which will not be repeated here.
[0218] The embodiment of the present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the target plate base assembly error identification method described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0219] The embodiments of the present disclosure also provide a computer program product, which carries a program code. The instructions included in the program code can be used to execute the steps of the target plate base assembly error identification method described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.
[0220] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0221] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the aforementioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the aforementioned embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be based on the protection scope of the claims.
Claims
1. A method for identifying target plate base assembly error, characterized in that: include: Acquire an original image of a target plate base; the original image is obtained by photographing a target plate base for placing a target plate in a gene sequencing pre-processing instrument, and the original image includes a target mark on the target plate base; The target mark is used as the foreground content, and the original image is segmented to obtain a target segmented image; wherein the pixel value of each pixel in the target segmented image is used to indicate whether the pixel belongs to the foreground content; Position matching is performed on the nuclear image and / or the target segmented image with the goal of maximizing the overlap between the target segmented image and the nuclear image; the nuclear image is used to characterize the standard position of the target marker; The target plate base assembly error is determined based on the position adjustment information in the position matching process.
2. The method according to claim 1, characterized in that: Also includes: According to the set clipping area coordinates and the set clipping area size, a first image block including the target mark is clipped from the original image; The step of using the target mark as the foreground content and performing segmentation processing on the original image to obtain a target segmented image includes: The target mark is used as the foreground content, and the first image block is segmented to obtain the target segmented image.
3. The method according to claim 2, characterized in that The step of intercepting a first image block including the target mark from the original image according to the set interception area coordinates and the set interception area size includes: Detecting whether the original image meets the target condition; When the original image satisfies the target condition, the first image block including the target mark is intercepted from the original image according to the set interception area coordinates and the set interception area size; The original image satisfies the target condition including at least one of the following: The size of the original image is greater than or equal to a preset size threshold; A noise region with an intensity greater than or equal to the foreground content intensity exists in the original image, and the noise region is larger than a preset area threshold.
4. The method according to any one of claims 1 to 3, characterized in that: The target mark is used as the foreground content, and the original image or the first image block is segmented to obtain a target segmented image, including: Determining a segmentation threshold of the original image or the first image block according to the intensity value of each pixel in the original image or the first image block; Traversing each pixel in the original image or the first image block, and comparing the intensity value of the traversed pixel with the segmentation threshold; When the pixel value of the traversed pixel point is greater than or equal to the segmentation threshold, setting the pixel value of the pixel point to a first value; and When the pixel value of the traversed pixel point is less than the segmentation threshold, the pixel value of the pixel point is set to a second value; The first value is used to indicate that the corresponding pixel point belongs to the foreground content; the second value is used to indicate that the corresponding pixel point belongs to the background content.
5. The method according to claim 4, characterized in that The determining, according to the intensity value of each pixel point in the original image or the first image block, a segmentation threshold of the original image or the first image block includes: According to the pixel value of each pixel point in the original image or the first image block, the original image or the first image block is converted into a grayscale image; the grayscale value of each pixel point in the grayscale image represents the intensity value of the corresponding pixel point; The segmentation threshold is determined according to the grayscale value of each pixel in the grayscale image.
6. The method according to any one of claims 1 to 5, characterized in that: The step of performing position matching on the nuclear image and the target segmented image with the goal of maximizing the overlap between the target segmented image and the nuclear image comprises: Taking the nuclear image as a sliding window, and taking the maximum overlap between the nuclear image and the target segmented image after sliding as the goal, the nuclear image is displaced and adjusted according to a preset sliding step and a preset sliding trajectory; Determining the center position of the nuclear image relative to the target segmented image when the overlap is maximum; The center position is used as a rotation point, and the maximum overlap between the rotated nuclear image and the target segmented image is used as a goal. The rotation angle of the nuclear image is adjusted according to a preset rotation angle step and a preset rotation direction.
7. The method according to claim 6, characterized in that The degree of coincidence between the core image and the target segmented image is obtained by accumulating and summing pixel values of the core image and the target segmented image.
8. The method according to claim 6, characterized in that The center position of the nuclear image is calculated by the upper left corner position of the nuclear image and the length and width of the target mark.
9. A computer device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the processor is used to execute the machine-readable instructions stored in the memory. When the machine-readable instructions are executed by the processor, the processor executes the steps of the method for identifying the target plate base assembly error according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program. When the computer program is executed by a computer device, the computer device executes the steps of the target plate base assembly error identification method according to any one of claims 1 to 8.