A method and device for detecting zero-loss peak drift in cryo-em
By automatically detecting zero-loss peak drift in cryo-electron microscopy and utilizing data collection scripts and image analysis, the problems of low efficiency and poor quality in existing technologies have been solved, achieving efficient drift detection and image acquisition.
Patent Information
- Application Number
- CN202110710674.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-25
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2041-06-25
AI Technical Summary
In existing technologies, zero-loss peak drift detection in cryo-electron microscopy relies on manual observation or timed alignment commands, resulting in low data acquisition efficiency and poor image quality. In particular, it is difficult to detect and process ZLP drift in a timely manner at night.
By acquiring the data collection script of cryo-electron microscopy, the target file and target grayscale image are determined, the zero-loss peak is automatically detected to be drifted, the drift status is determined by using preset rules and similarity calculation, and the centering operation is automatically performed after the drift is detected.
It achieves highly accurate drift detection without human intervention, improves data acquisition efficiency and image quality, and ensures the efficiency and quality of image generation.
Smart Images

Figure CN115526821B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of detection correction, in particular to a method and device for detecting zero-loss peak drift of cryo-EM. BACKGROUND
[0002] Cryo-EM is mainly applied in the field of structural biology, and provides high-resolution structures for proteins that are not suitable for crystallization, and explains the relationship between structure and function at the atomic level. In transmission electron microscopy imaging, the electrons generated by the electron gun are accelerated to sub-light speed in a high-voltage electric field and move inside the microscope in a high vacuum. According to the principle that the high-speed moving electrons are deflected in a magnetic field, a series of electromagnetic lenses in the transmission electron microscope converge the electrons and focus the electrons that interact with the sample during penetration of the sample to form an image, and then form a magnified image of the sample on a recording medium, with the magnification being several thousand to several hundred thousand times. The fine structure of the sample is obtained by processing and analyzing the magnified image using a computer.
[0003] Among them, the electron is a particle with small mass and negative charge. When the electron passes through the sample, it will interact with the sample and be scattered. Electron scattering can be divided into “elastic scattering” without energy loss and “inelastic scattering” with energy loss. Typical energy loss includes single electron scattering (intra / inter-band transition): 2-20 eV; plasma interaction: 5-30 eV; inner-shell ionization: 50-2000 eV. The energy distribution of the electron after passing through the sample can be analyzed by electron energy loss spectrum (EELS). Among them, the zero-loss peak (ZLP) mainly contains the forward scattering electrons in elastic scattering. The electrons scattered inelastically will pass through the objective lens in different paths, thus producing chromatic aberration, thereby reducing the resolution of the sample imaging. Therefore, the chromatic aberration effect caused by the sample can be eliminated by filtering the inelastically scattered electrons, thereby improving the quality of the imaging.
[0004] The energy filter is a device with high sensitivity. When the electron beam energy is as high as 300 keV, the energy resolution can be as low as 1 eV. The energy filter selects electrons of a specific energy through a slit, and only allows these electrons to fall on the display screen or CCD camera, thereby improving the image resolution and increasing the image contrast. However, the energy loss spectrum is easily affected by the environment, and the ZLP will drift over time, making it difficult to continuously image, so it is necessary to continuously center and refocus the ZLP.
[0005] In the prior art, it is necessary to rely on manual observation of whether ZLP drift occurs, and then manual operation is needed for centering, or centering instructions are executed by program at a fixed time (whether ZLP drift occurs or not). Through manual monitoring, discovery delay is inevitable, especially at night, it is difficult to discover and handle in time; through the way of executing centering instructions by program at a fixed time, if the time interval is set too short, a lot of time will be used for centering, thereby slowing down the data acquisition efficiency; and if the time interval is set too long, when ZLP drift occurs, a large number of invalid images will be generated, thereby reducing the image collection quality. SUMMARY
[0006] Therefore, the purpose of the embodiments of the present application is to provide a cryo-EM zero-loss peak drift detection method and device, which is used to solve the problems of low data acquisition efficiency and poor image quality in the prior art.
[0007] In a first aspect, the embodiments of the present application provide a cryo-EM zero-loss peak drift detection method, which comprises the following steps:
[0008] obtaining a data collection script of a cryo-EM; wherein the data collection script comprises data collected by the cryo-EM;
[0009] determining a target file based on the data collection script;
[0010] determining a target gray image based on the target file;
[0011] determining whether zero-loss peak drift of the cryo-EM occurs based on the target gray image.
[0012] In a possible implementation, the step of determining a target file based on the data collection script comprises:
[0013] generating candidate files from data in the data collection script; wherein each candidate file corresponds to a generation time;
[0014] finding a target generation time with the shortest time interval from a current time;
[0015] taking a candidate file corresponding to the target generation time as the target file.
[0016] In a possible implementation, the step of determining a target gray image based on the target file comprises:
[0017] performing drift correction processing on the target file to obtain a preset format file;
[0018] converting the preset format file into the target gray image.
[0019] In a possible implementation, the determining whether the zero-loss peak of the cryo-EM drifts based on the target gray image comprises:
[0020] selecting N sub-region images surrounding the middle region in the target gray image according to a preset rule, N being a natural number;
[0021] calculating a gray average value of each of the N sub-region images;
[0022] in a case where at least one of the gray average values is less than a first preset threshold, obtaining other files adjacent to the target file from the data collection script, wherein other generation times of the other files are all earlier than the target generation time;
[0023] determining other gray images based on the other files;
[0024] determining whether the zero-loss peak of the cryo-EM drifts based on the target gray image and the other gray images.
[0025] In a possible implementation, the determining whether the zero-loss peak of the cryo-EM drifts based on the target gray image and the other gray images comprises:
[0026] calculating a similarity between the N sub-region images in the target gray image and the N sub-region images in the other gray images;
[0027] if the similarity is greater than a second preset threshold, determining that the zero-loss peak of the cryo-EM drifts;
[0028] if the similarity is less than or equal to the second preset threshold, determining that the zero-loss peak of the cryo-EM does not drift.
[0029] In a possible implementation, the detection method further comprises:
[0030] storing the drift state of the zero-loss peak of the cryo-EM to a preset location, wherein the drift state comprises drifting and not drifting.
[0031] In a possible implementation, the detection method further comprises:
[0032] determining whether to perform a centering operation based on the drift state.
[0033] In a second aspect, the embodiments of the present application further provide a detection device for a zero-loss peak drift of a cryo-EM, comprising:
[0034] acquire a data collection script of a cryo-EM; wherein the data collection script comprises data collected by the cryo-EM;
[0035] determine a target file based on the data collection script;
[0036] determine a target grayscale image based on the target file;
[0037] determine whether the zero-loss peak of the cryo-EM has a drift based on the target grayscale image.
[0038] In a third aspect, the present application further provides a storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is run by a processor to perform the following steps:
[0039] acquire a data collection script of a cryo-EM; wherein the data collection script comprises data collected by the cryo-EM;
[0040] determine a target file based on the data collection script;
[0041] determine a target grayscale image based on the target file;
[0042] determine whether the zero-loss peak of the cryo-EM has a drift based on the target grayscale image.
[0043] In a fourth aspect, the present application further provides an electronic device, comprising: a processor and a memory, wherein the memory stores machine readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through a bus, and the machine readable instructions are executed by the processor to perform the following steps:
[0044] acquire a data collection script of a cryo-EM; wherein the data collection script comprises data collected by the cryo-EM;
[0045] determine a target file based on the data collection script;
[0046] determine a target grayscale image based on the target file;
[0047] determine whether the zero-loss peak of the cryo-EM has a drift based on the target grayscale image.
[0048] The target grayscale image determined by the target file in the data collection script is used to determine whether the zero-loss peak of the cryo-EM has a drift, without manual observation, and the zero-loss peak of the cryo-EM is automatically determined to have a drift, and the accuracy of the detection result is higher.
[0049] In order to make the above objectives, characteristics and advantages of the present application more apparent, comprehensible and easier to understand, the following will describe a preferred embodiment in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS
[0050] In order to make the above objectives, characteristics and advantages of the present application more apparent, comprehensible and easier to understand, the following will describe a preferred embodiment in detail with reference to the accompanying drawings.
[0051] Figure 1 A flow chart of a method for detecting zero-loss peak drift of cryo-EM provided by the present application is shown;
[0052] Figure 2 A flow chart of determining a target file based on a data collection script in the detection method provided by the present application is shown;
[0053] Figure 3 A flow chart of determining a target gray scale image based on a target file in the detection method provided by the present application is shown;
[0054] Figure 4 A flow chart of determining whether the zero-loss peak of cryo-EM drifts based on a target gray scale image in the detection method provided by the present application is shown;
[0055] Figure 5 A flow chart of determining whether the zero-loss peak of cryo-EM drifts based on a target gray scale image and other gray scale images in the detection method provided by the present application is shown;
[0056] Figure 6 A structural schematic diagram of a device for detecting zero-loss peak drift of cryo-EM provided by the present application is shown;
[0057] Figure 7 A structural schematic diagram of an electronic device provided by the present application is shown. DETAILED DESCRIPTION
[0058] The various schemes and features of the present application are described herein with reference to the accompanying drawings.
[0059] It should be understood that various modifications can be made to the embodiments disclosed herein. Therefore, the above description should not be regarded as limiting, but only as an example of the embodiments. Those skilled in the art will think of other modifications within the scope and spirit of the present application.
[0060] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the application and, together with the general description of the application given above, and the detailed description of the embodiments given below, serve to explain the principles of the present application.
[0061] These and other characteristics of the present application will become apparent from the following description of the preferred forms given, by way of non-limiting example, with reference to the attached drawings.
[0062] It is also to be understood that even though a number of specific embodiments of the application have been described herein, these are merely possible embodiments and that many others are possible which will be readily gleaned by those skilled in the art since the generic principles of the application have been described above and are fully recognized to those skilled in the art.
[0063] The above and other aspects, features and advantages of the present application will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings in which:
[0064] Specific embodiments of the present application are described hereinafter; however, it is to be understood that the application is not limited to the particular embodiments described and as such can vary. It is also to be understood that well-known and / or redundant
[0065] The specification can use phrases such as "in one embodiment", "in another embodiment", "in yet another embodiment", or "in other embodiments", which can refer to one or more embodiments under the same or different embodiments of the application.
[0066] To facilitate understanding of the present application, first, a method for detecting zero-loss peak drift of cryo-EM provided by the present application is described in detail. As shown in Figure 1 The flow chart of the detection method provided by the embodiment of the present application is shown in FIG. 1. The specific steps include S101-S104.
[0067] S101, obtaining a data collection script of cryo-EM; wherein the data collection script includes data collected by the cryo-EM.
[0068] The cryo-EM can emit electrons to the biological sample, the electrons interact with the sample, and then pass through the sample. The electrons passing through the energy filter can be acquired by the imaging device and generate an image. The data collection script of the cryo-EM in the embodiment of the present application includes the data collected by the cryo-EM, such as the number of emitted electrons, the number of electrons acquired by the imaging device, etc. It can also include attribute data of the cryo-EM, such as the electron dose of each electron, the high voltage of the cryo-EM, the temperature factor, the size of a single pixel, etc. It can also include preset parameters, such as the number of image blocks, the image reading mode, etc.
[0069] S102, determining a target file based on the data collection script.
[0070] After acquiring the data collection script, the target file is determined based on the data included in the data collection script. The target file contains data that can generate an image of the sample.
[0071] Specifically, Figure 2 A method flowchart for determining a target file based on a data collection script is shown, and the specific steps include S201-S203.
[0072] S201, generating a candidate file from the data in the data collection script; wherein each candidate file corresponds to a generation time.
[0073] S202, finding a target generation time with the shortest time interval from the current time.
[0074] S203, taking the candidate file corresponding to the target generation time as the target file.
[0075] In specific implementation, multiple images of the sample at different angles need to be collected, and then a three-dimensional structure of the sample is formed based on a large number of images. In actual application, an electron collected each time is generated into a candidate file, and each candidate file corresponds to a generation time. For example, the collected electron is generated into a file and a mapping relationship is established between the file and its generation time to form a candidate file, or the collected electron is formed into a candidate file, and then its generation time is taken as a tag of the candidate file, etc. The present embodiment does not make specific limitation on this. It is worth noting that the collection time of the collected electron is equivalent to the generation time of the generated file.
[0076] In the case of forming a certain number of candidate files, or in the case of reaching a preset time interval, the generation time corresponding to each candidate file is checked, and the one with the shortest time interval from the current time is found from multiple and taken as the target generation time.
[0077] After determining the target generation time, the candidate file corresponding to the target generation time is taken as the target file to determine whether the image formed by the target file meets the requirements and further determine whether the zero-loss peak of the cryo-EM drifts, thereby avoiding the low detection efficiency and resource waste caused by detecting the image formed by each candidate file.
[0078] S103, determining a target gray image based on the target file.
[0079] After determining the target file, a target gray image corresponding to the target file is generated based on the target file to determine whether the zero-loss peak of the cryo-EM drifts according to the target gray image.
[0080] Specifically, Figure 3 A method flowchart for determining a target gray image based on a target file is shown, specifically including S301 and S302.
[0081] S301, performing drift correction processing on the target file to obtain a preset format file.
[0082] S302, converting the preset format file into a target gray image.
[0083] In a specific implementation, the data in the target file is subjected to drift correction processing, which is preferably completed by MotionCor2, and of course can also be completed by other ways, which are not limited in the embodiments of the present application.
[0084] After the drift correction processing, a preset format file is obtained, which is an mrc type file in the embodiments of the present application. After obtaining the preset format file, the preset format file is converted into a target gray image, i.e., a gray image corresponding to the target file.
[0085] S104, determining whether the zero-loss peak of the cryo-EM drifts based on the target gray image.
[0086] After obtaining the target gray image, the target gray image is analyzed to determine whether the zero-loss peak of the cryo-EM drifts.
[0087] Specifically, Figure 4 A method step for determining whether the zero-loss peak of the cryo-EM drifts based on a target gray image is shown, specifically including S401-S405.
[0088] S401, selecting N sub-region images surrounding the central region in the target gray image according to a preset rule, N being a natural number.
[0089] S402, calculating the gray average value of each of the N sub-region images.
[0090] S403, in the case where at least one gray average value is less than the first preset threshold, obtaining other files adjacent to the target file from the data collection script; wherein the other generation times of the other files are all earlier than the target generation time.
[0091] S404, determining other gray images based on the other files.
[0092] S405, determining whether the zero-loss peak of the cryo-EM drifts based on the target gray image and the other gray images.
[0093] Considering that the edges of the gray image formed after the zero-loss peak of the cryo-EM drifts will produce black pixels, the preset rule is set to select N corner regions around the middle region of the gray image, N is a natural number such as 4, etc.; and the shape and area of each region are the same, for example, each corner region is a square with i as the side length, etc. Here, 2*i is less than or equal to the side length of the target gray image. Wherein, the edge frame of the target gray image and the other gray images are all rectangles.
[0094] In specific implementation, N sub-region images in the target gray image are selected according to the preset rule, and in the case where N is 4, the upper left corner, the lower left corner, the upper right corner and the lower right corner are preferably selected. After determining the N sub-region images in the target gray image, the gray values of each sub-region image are extracted, and the gray average values of each sub-region image are calculated.
[0095] After calculating the gray average values of the N sub-region images, each gray average value is compared with the first preset threshold, if at least one gray average value is less than the first preset threshold, other files adjacent to the target file are obtained from the data collection script based on the generation time, and other gray images are determined based on the other files, wherein the other generation times of the other files are all earlier than the target generation time, and the method steps for determining other gray images based on other files can refer to the method steps for determining target gray images based on target files, which will not be described in detail here.
[0096] After obtaining the other gray images, it is determined whether the zero-loss peak of the cryo-EM drifts based on the target gray image and the other gray images.
[0097] If the gray average value is greater than or equal to the first preset threshold, it is determined that the zero-loss peak of the cryo-EM does not drift.
[0098] Further, Figure 5 The method steps for determining whether the zero-loss peak of the cryo-EM drifts based on the target gray image and the other gray images are shown, which specifically include S501-S503.
[0099] S501, calculate the similarity between the N sub-region images in the target gray image and the N sub-region images in the other gray images.
[0100] S502, if the similarity is greater than a second preset threshold, determine that the zero-loss peak of the cryo-EM drifts.
[0101] S503, if the similarity is less than or equal to the second preset threshold, determine that the zero-loss peak of the cryo-EM does not drift.
[0102] In specific implementation, the number of the other gray images can be 2, 3, etc., and the specific number can be determined according to actual conditions.
[0103] After obtaining the other gray images, the target gray image is compared with each of the other gray images to calculate the similarity between the target gray image and each of the other gray images; or the N sub-region images in the target gray image are compared with the N sub-region images in the other gray images respectively to obtain the similarity; or the sub-region image with the average gray value less than the first preset threshold in the target gray image is compared with the corresponding sub-region image in the other gray image to obtain the similarity, etc. After obtaining the similarity between the target gray image and each of the other gray images, each similarity is compared with the second preset threshold, if the similarity is greater than the second preset threshold, it is determined that the zero-loss peak of the cryo-EM drifts; if the similarity is less than or equal to the second preset threshold, it is determined that the zero-loss peak of the cryo-EM does not drift. Here, based on the target gray image and the other gray images, whether the zero-loss peak of the cryo-EM drifts can be determined, which can exclude the case that the target gray image is caused by accidental factors to have the average gray value less than the first preset threshold, and thus the accuracy of determining whether the zero-loss peak of the cryo-EM drifts can be ensured.
[0104] Here, the first preset threshold and the second preset threshold can be stored in the data collection script.
[0105] The embodiments of the present application determine whether the zero-loss peak of the cryo-EM drifts by the target gray image determined by the target file in the data collection script, without manual observation, automatically determine whether the zero-loss peak of the cryo-EM drifts, and the accuracy of the detection result is higher.
[0106] In the case of determining that the zero-loss peak of the cryo-EM drifts, the drift state of the zero-loss peak of the cryo-EM is stored in a preset position, for example, in the zlp_status.txt file; in specific implementation, the preset position can be part of the data collection script; wherein the drift state includes drift and no drift, and can be set to 1 to indicate drift and 0 to indicate no drift, etc.
[0107] A program for determining whether to perform the centering operation is set in the data collection script, and specifically, the program can be added to the SerialEM software, etc. Whether to perform the centering operation is determined based on the drift state, specifically, when it is read that the drift state is drift, it is determined to perform the centering operation for the purpose of correction; when it is read that the drift state is no drift, it is determined not to perform the centering operation.
[0108] The embodiment of the present application automatically performs the centering operation after determining that the zero-loss peak of the cryo-EM drifts, without the need for human intervention, thereby improving the data collection efficiency and the image generation efficiency, and ensuring the quality of the collected images.
[0109] Based on the same inventive concept, the second aspect of the present application also provides a cryo-EM zero-loss peak drift detection device corresponding to the cryo-EM zero-loss peak drift detection method. Since the principle of the device in the present application for solving the problem is similar to the above-mentioned cryo-EM zero-loss peak drift detection method of the present application, the implementation of the device can be referred to the implementation of the method, and the repeated parts will not be described here.
[0110] Referring to Figure 6 The cryo-EM zero-loss peak drift detection device includes:
[0111] The acquisition module 601 is configured to acquire a data collection script of a cryo-EM; wherein the data collection script includes data collected by the cryo-EM;
[0112] The first determination module 602 is configured to determine a target file based on the data collection script;
[0113] The second determination module 603 is configured to determine a target grayscale image based on the target file;
[0114] The third determination module 604 is configured to determine whether the zero-loss peak of the cryo-EM drifts based on the target grayscale image.
[0115] In another embodiment, the first determination module 602 is specifically configured to:
[0116] Generate a candidate file from the data in the data collection script; wherein each candidate file corresponds to a generation time;
[0117] Find a target generation time with the shortest time interval from the current time;
[0118] The candidate file corresponding to the target generation time is taken as the target file.
[0119] In another embodiment, the second determination module 603 is specifically configured to:
[0120] performing a drift correction on the target file to obtain a preset format file;
[0121] converting the preset format file into the target gray scale image.
[0122] In another embodiment, the third determining module 604 is specifically configured to:
[0123] selecting N sub-region images surrounding the middle region in the target gray scale image according to a preset rule, N being a natural number;
[0124] calculating a gray scale average value of each of the N sub-region images;
[0125] in a case where at least one of the gray scale average values is less than a first preset threshold, obtaining other files adjacent to the target file from the data collection script, wherein other generation times of the other files are all earlier than the target generation time;
[0126] determining other gray scale images based on the other files;
[0127] determining whether the zero-loss peak of the cryo-EM has drifted based on the target gray scale image and the other gray scale images.
[0128] In another embodiment, when determining whether the zero-loss peak of the cryo-EM has drifted based on the target gray scale image and the other gray scale images, the third determining module 604 specifically includes:
[0129] calculating a similarity between the N sub-region images in the target gray scale image and the N sub-region images in the other gray scale images;
[0130] if the similarity is greater than a second preset threshold, determining that the zero-loss peak of the cryo-EM has drifted;
[0131] if the similarity is less than or equal to the second preset threshold, determining that the zero-loss peak of the cryo-EM has not drifted.
[0132] In another embodiment, the detection device further includes a storage module 605, which is configured to:
[0133] store the drift state of the zero-loss peak of the cryo-EM to a preset location, wherein the drift state includes drifting and not drifting.
[0134] In another embodiment, the detection device further includes a fourth determining module 606, which is configured to:
[0135] determine whether to perform a centering operation based on the drift state.
[0136] The embodiment of the application determines whether the zero-loss peak of the cryo-EM drifts by a target gray image determined by a target file in a data collection script, without manual observation, automatically determines whether the zero-loss peak of the cryo-EM drifts, and the accuracy of the detection result is high; and after determining that the zero-loss peak of the cryo-EM drifts, automatically performs centering operation without manual intervention, improves the data collection efficiency and the image generation efficiency, and ensures the quality of the collected images.
[0137] The third aspect of the application further provides a storage medium, which is a computer readable medium and stores a computer program, the computer program is executed by a processor to implement the method provided by any embodiment of the application, and includes the following steps:
[0138] S11, acquiring a data collection script of a cryo-EM; wherein the data collection script includes data collected by the cryo-EM;
[0139] S12, determining a target file based on the data collection script;
[0140] S13, determining a target gray image based on the target file;
[0141] S14, determining whether the zero-loss peak of the cryo-EM drifts based on the target gray image.
[0142] When the computer program is executed by the processor to determine the target file based on the data collection script, the computer program is further executed by the processor to perform the following steps: generating a candidate file from the data in the data collection script; wherein each candidate file corresponds to a generation time; finding a target generation time with the shortest time interval from the current time; and taking the candidate file corresponding to the target generation time as the target file.
[0143] When the computer program is executed by the processor to determine the target gray image based on the target file, the computer program is executed by the processor to perform the following steps: performing drift correction processing on the target file to obtain a preset format file; and converting the preset format file into the target gray image.
[0144] When the computer program is executed by the processor to determine whether the zero-loss peak of the cryo-EM drifts based on the target gray image, the processor further executes the following steps: selecting N sub-region images surrounding the middle region in the target gray image according to a preset rule, N being a natural number; calculating the average gray value of each of the N sub-region images; in a case where at least one of the average gray values is less than a first preset threshold, obtaining other files adjacent to the target file from the data collection script; wherein the other files have other generation times earlier than the target generation time; determining other gray images based on the other files; and determining whether the zero-loss peak of the cryo-EM drifts based on the target gray image and the other gray images.
[0145] When the computer program is executed by the processor to determine whether the zero-loss peak of the cryo-EM drifts based on the target gray image and the other gray images, the processor specifically executes the following steps: calculating the similarity between the N sub-region images in the target gray image and the N sub-region images in the other gray images; if the similarity is greater than a second preset threshold, determining that the zero-loss peak of the cryo-EM drifts; and if the similarity is less than or equal to the second preset threshold, determining that the zero-loss peak of the cryo-EM does not drift.
[0146] When the computer program is executed by the processor to execute the detection method, the processor specifically executes the following steps: storing the drift state of the zero-loss peak of the cryo-EM to a preset location; wherein the drift state includes drift and no drift.
[0147] When the computer program is executed by the processor to execute the detection method, the processor specifically executes the following steps: determining whether to perform centering operation based on the drift state.
[0148] The embodiments of the present application determine whether the zero-loss peak of the cryo-EM drifts through the target gray image determined by the target file in the data collection script, without manual observation, automatically determine whether the zero-loss peak of the cryo-EM drifts, and the accuracy of the detection result is high; and after determining that the zero-loss peak of the cryo-EM drifts, automatically perform the centering operation without human intervention, improve the data acquisition efficiency and the image generation efficiency, and ensure the quality of the collected images.
[0149] It should be noted that the storage medium of the above-mentioned embodiments of the present application can be a computer readable signal medium or a computer readable storage medium or any combination of the above-mentioned two. The computer readable storage medium may, for example, be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer readable storage media can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or component. In the present application, the computer readable signal medium can include a data signal carried in a baseband or as part of a carrier wave, which carries computer readable program code. Such a propagated data signal can take various forms, including but not limited to an electromagnetic signal, an optical signal or any suitable combination thereof. The computer readable signal medium can also be any storage medium other than the computer readable storage medium, which can send, propagate or transmit a program for use by or in conjunction with an instruction execution system, device or component. The program code contained in the storage medium can be transmitted by any suitable medium, including but not limited to electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0150] The fourth aspect of the present application also provides an electronic device, as shown, which at least includes a memory 701 and a processor 702, the memory 701 stores a computer program, and the processor 702 implements the method provided by any embodiment of the present application when executing the computer program on the memory 701. For example, the method executed by the electronic device computer program is as follows: Figure 7
[0151] S21, obtaining a data collection script of cryo-EM; wherein the data collection script includes data collected by the cryo-EM;
[0152] S22, determining a target file based on the data collection script;
[0153] S23, determining a target gray image based on the target file;
[0154] S24, determining whether the zero-loss peak of the cryo-EM has drifted based on the target gray image.
[0155] The processor, when executing the data collection script stored in the memory, further executes a computer program for determining a target file based on the data collection script, generating a candidate file from data in the data collection script, wherein each candidate file corresponds to a generation time, finding a target generation time with the shortest time interval from a current time, and taking the candidate file corresponding to the target generation time as the target file.
[0156] The processor, when executing the target file stored in the memory, further executes a computer program for determining a target gray image based on the target file, performing drift correction processing on the target file to obtain a preset format file, and converting the preset format file into the target gray image.
[0157] The processor, when executing the target gray image stored in the memory, further executes a computer program for determining whether the zero-loss peak of the cryo-EM drifts based on the target gray image, selecting N sub-region images around a central region in the target gray image according to a preset rule, N being a natural number, calculating the average gray value of each of the N sub-region images, obtaining other files adjacent to the target file from the data collection script in a case where at least one of the average gray values is less than a first preset threshold, wherein the other generation times of the other files are earlier than the target generation time, determining other gray images based on the other files, and determining whether the zero-loss peak of the cryo-EM drifts based on the target gray image and the other gray images.
[0158] The processor, when executing the target gray image and the other gray image stored in the memory, further executes a computer program for determining whether the zero-loss peak of the cryo-EM drifts based on the target gray image and the other gray image, calculating the similarity between the N sub-region images in the target gray image and the N sub-region images in the other gray image, determining that the zero-loss peak of the cryo-EM drifts if the similarity is greater than a second preset threshold, and determining that the zero-loss peak of the cryo-EM does not drift if the similarity is less than or equal to the second preset threshold.
[0159] The processor, when executing the detection method stored in the memory, further executes a computer program for storing the drift state of the zero-loss peak of the cryo-EM to a preset location, wherein the drift state includes drift and no drift.
[0160] The processor, when executing the detection method stored in the memory, further executes a computer program for determining whether to perform a centering operation based on the drift state.
[0161] The embodiment of the application determines whether the zero-loss peak of the cryo-EM drifts through the target gray image determined by the target file in the data collection script, without manual observation, automatically determines whether the zero-loss peak of the cryo-EM drifts, and the accuracy of the detection result is higher; and after determining that the zero-loss peak of the cryo-EM drifts, automatically performs the centering operation without manual participation, improves the data collection efficiency and the image generation efficiency, and ensures the quality of the collected image.
[0162] The flowcharts and block diagrams in the drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the application. In this regard, each block in the flowcharts or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in a different order than that shown in the figures. For example, two blocks noted in succession can actually be executed substantially concurrently, or they can sometimes be executed in reverse order, depending on the functionality involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented by dedicated hardware-based systems that perform specified logical functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0163] The above description is merely preferred embodiments of the application and a description of the principles of the technology used. Those skilled in the art should understand that the disclosed scope of the application is not limited to the technical solutions formed by the specific combinations of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or equivalent features without departing from the above disclosed concept. For example, the above features can be replaced with the technical features disclosed in the application (but not limited to) having similar functions to form technical solutions.
[0164] In addition, although the operations are depicted in a particular order, this should not be understood as requiring the operations to be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing can be advantageous. Similarly, although specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the application. Certain features described in the context of separate embodiments can also be combined in a single embodiment. Conversely, various features described in the context of a single embodiment can also be separated and implemented in multiple embodiments.
[0165] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
[0166] The above detailed description has shown, described, and pointed out novel features of the application as applied to various embodiments. However, it will be understood that various omissions and substitutions and changes of the form of the detail of embodiments of the application can be made by those skilled in the art without departing from the spirit of the application, as described above.
Claims
1. A method for detecting zero-loss peak shift using cryo-electron microscopy, characterized in that, include: Obtain a data collection script for cryo-electron microscopy; wherein the data collection script includes the data acquired by the cryo-electron microscope; The target file is determined based on the data collection script; The step of determining the target file based on the data collection script includes: The data in the data collection script is used to generate candidate files; each candidate file corresponds to a generation time. Find the target generation time with the shortest time interval to the current time; The candidate file corresponding to the target generation time is used as the target file; Determine the target grayscale image based on the target file; Based on the target grayscale image, determine whether the zero-loss peak of the cryo-electron microscope has shifted; The step of determining whether the zero-loss peak of the cryo-electron microscope has shifted based on the target grayscale image includes: N sub-region images surrounding the central region of the target grayscale image are selected according to preset rules, where N is a natural number. Calculate the average grayscale value of each of the N sub-region images; If at least one of the grayscale average values is less than a first preset threshold, other files adjacent to the target file are obtained from the data collection script; wherein, the other generation times of the other files are all earlier than the target generation time; Other grayscale images are determined based on the other files; Based on the target grayscale image and the other grayscale images, determine whether the zero-loss peak of the cryo-electron microscope has shifted.
2. The detection method according to claim 1, characterized in that, The step of determining the target grayscale image based on the target file includes: The target file is subjected to drift correction processing to obtain a file in a preset format. Convert the preset format file into the target grayscale image.
3. The detection method according to claim 1, characterized in that, The step of determining whether the zero-loss peak of the cryo-electron microscope has shifted based on the target grayscale image and the other grayscale images includes: Calculate the similarity between N sub-region images in the target grayscale image and N sub-region images in the other grayscale images; If the similarity is greater than the second preset threshold, it is determined that the zero-loss peak of the cryo-electron microscopy has shifted. If the similarity is less than or equal to the second preset threshold, it is determined that the zero-loss peak of the cryo-electron microscope has not drifted.
4. The detection method according to claim 1, characterized in that, Also includes: The drift state of the zero-loss peak of the cryo-electron microscope is stored in a preset location; wherein the drift state includes drifting and no drifting.
5. The detection method according to claim 4, characterized in that, Also includes: Whether to perform a centering operation is determined based on the drift state.
6. A cryo-electron microscopy zero-loss peak shift detection device, characterized in that, include: An acquisition module is configured to acquire a data collection script for cryo-electron microscopy; wherein the data collection script includes the data acquired by the cryo-electron microscopy. The first determining module is configured to determine the target file based on the data collection script; The process of determining the target file based on the data collection script includes: The data in the data collection script is used to generate candidate files; each candidate file corresponds to a generation time. Find the target generation time with the shortest time interval to the current time; The candidate file corresponding to the target generation time is used as the target file; The second determining module is configured to determine a target grayscale image based on the target file; The third determining module is configured to determine whether the zero-loss peak of the cryo-electron microscope has shifted based on the target grayscale image; The step of determining whether the zero-loss peak of the cryo-electron microscope has shifted based on the target grayscale image includes: N sub-region images surrounding the central region of the target grayscale image are selected according to preset rules, where N is a natural number. Calculate the average grayscale value of each of the N sub-region images; If at least one of the grayscale average values is less than a first preset threshold, other files adjacent to the target file are obtained from the data collection script; wherein, the other generation times of the other files are all earlier than the target generation time; Other grayscale images are determined based on the other files; Based on the target grayscale image and the other grayscale images, determine whether the zero-loss peak of the cryo-electron microscope has shifted.
7. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, performs the following steps: Obtain a data collection script for cryo-electron microscopy; wherein the data collection script includes the data acquired by the cryo-electron microscope; The target file is determined based on the data collection script; The process of determining the target file based on the data collection script includes: The data in the data collection script is used to generate candidate files; each candidate file corresponds to a generation time. Find the target generation time with the shortest time interval to the current time; The candidate file corresponding to the target generation time is used as the target file; Determine the target grayscale image based on the target file; Based on the target grayscale image, determine whether the zero-loss peak of the cryo-electron microscope has shifted; The step of determining whether the zero-loss peak of the cryo-electron microscope has shifted based on the target grayscale image includes: N sub-region images surrounding the central region of the target grayscale image are selected according to preset rules, where N is a natural number. Calculate the average grayscale value of each of the N sub-region images; If at least one of the grayscale average values is less than a first preset threshold, other files adjacent to the target file are obtained from the data collection script; wherein, the other generation times of the other files are all earlier than the target generation time; Other grayscale images are determined based on the other files; Based on the target grayscale image and the other grayscale images, determine whether the zero-loss peak of the cryo-electron microscope has shifted.
8. An electronic device, characterized in that, include: The electronic device includes a processor and a memory, the memory storing machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via a bus, and when the machine-readable instructions are executed by the processor, the following steps are performed: Obtain a data collection script for cryo-electron microscopy; wherein the data collection script includes the data acquired by the cryo-electron microscope; The target file is determined based on the data collection script; The process of determining the target file based on the data collection script includes: The data in the data collection script is used to generate candidate files; each candidate file corresponds to a generation time. Find the target generation time with the shortest time interval to the current time; The candidate file corresponding to the target generation time is used as the target file; Determine the target grayscale image based on the target file; Based on the target grayscale image, determine whether the zero-loss peak of the cryo-electron microscope has shifted; The step of determining whether the zero-loss peak of the cryo-electron microscope has shifted based on the target grayscale image includes: N sub-region images surrounding the central region of the target grayscale image are selected according to preset rules, where N is a natural number. Calculate the average grayscale value of each of the N sub-region images; If at least one of the grayscale average values is less than a first preset threshold, other files adjacent to the target file are obtained from the data collection script; wherein, the other generation times of the other files are all earlier than the target generation time; Other grayscale images are determined based on the other files; Based on the target grayscale image and the other grayscale images, determine whether the zero-loss peak of the cryo-electron microscope has shifted.