Labii electronic lab notebook (ELN) and laboratory information management system (LIMS)

Saturday, May 23, 2020

Why do I move away from zappa serverless?

There has been a lot of discussion on the use of serverless, especially with Zappa serverless. Based on my own personal experiences, I am here to summarize why I completedly shifted away from Zappa serverless after two years of use.

It is slow

Generally, with the lambda size of 1024MB, the API provided with Zappa is at least 10 times slower than some very basic EC2, for example, t3a.large. Even the t3a.small is faster than the Zappa.

It is difficult to work with SSO

If you want to integrate with SSO in Zappa, you are out of luck.  There are a lot of tedious configurations and it can not guarantee it is going to work. However, if you are using an EC2, the SSO works out of the box.

Here are some of the process I used to configure the Zappa to work with SSO:

  1. build a binary build from AMI
  2. copy `xmlsec1`, `libxmlsec1.so.1`, `libxmlsec1.so.1.2.20` to `/site-packages/lib`
  3. install libxmlsec1-openssl and copy `lbixmlsec1-openssl.so`, `lbixmlsec1-openssl.so.1`, `lbixmlsec1-openssl.so.1.20` to `/site-packages/lib`
  4. set `xmlsec_binary` in accounts/views.py to `"/var/task/lib/xmlsec1"`
  5. add `if modname != "saml2.extension.__pycache__":` to line 90 of the /site-packages/saml2/mdstore.py
  6. if metadata can not download, remove `public subnet` from zappa_settings
  7. if use slim_handler=true, add this code to zappa/core.py at line 408 to copy the `lib`. This need to be done whenever zappa is updated.
# code for step 5
def load_extensions():
    from saml2 import extension
    import pkgutil
    package = extension
    prefix = package.__name__ + "."
    ext_map = {}
    for importer, modname, ispkg in pkgutil.iter_modules(package.__path__,
                                                         prefix):
        module = __import__(modname, fromlist="dummy")
        if modname != "saml2.extension.__pycache__":
            ext_map[module.NAMESPACE] = module
# code for step 7
copytree(os.path.join(current_site_packages_dir, "lib"), os.path.join(venv_site_packages_dir, "lib"))

def create_handler_venv(self):
    """
    Takes the installed zappa and brings it into a fresh virtualenv-like folder. All dependencies are then downloaded.
    """
    import subprocess
    # We will need the currenv venv to pull Zappa from
    current_venv = self.get_current_venv()
    # Make a new folder for the handler packages
    ve_path = os.path.join(os.getcwd(), 'handler_venv')
    if os.sys.platform == 'win32':
        current_site_packages_dir = os.path.join(current_venv, 'Lib', 'site-packages')
        venv_site_packages_dir = os.path.join(ve_path, 'Lib', 'site-packages')
    else:
        current_site_packages_dir = os.path.join(current_venv, 'lib', get_venv_from_python_version(), 'site-packages')
        venv_site_packages_dir = os.path.join(ve_path, 'lib', get_venv_from_python_version(), 'site-packages')
        copytree(os.path.join(current_site_packages_dir, "lib"), os.path.join(venv_site_packages_dir, "lib"))

It could not load big sized data

There is a limit on the size of json the API can return with the Zappa serverless. This size might related to the lambda memory size you defined, but I have not tested. If you want your API to be 100% working even when querying a lot data, Zappa serverless is not for you.

It is difficult to debug

Recently I have problem to read the SSM with Zappa. It works well when you just deployed, but it will failed after 4 minutes, when a new session started. It looks like there are some consistancy problem for different sessions.

It is not cheap

Based on my calculation, the pricing of Zappa at the 1024M is similar to the a EC2 instance of t3a.large running 24 hours, at the pricing of RI. Almost no momey is saved.

Yonggan Wu

Friday, February 7, 2020

Labii ELN & LIMS facilitates infectious disease research

Labii ELN & LIMS facilitates infectious disease research
Scientist working on the BSL-4 Lab


Since it’s initial emergence in December 2019, the new coronavirus (2019-nCOV) has killed more than 600 people in China and infected over 30,000 people across Asia. The virus has now been confirmed in more than 24 countries, spreading from person to person through coughing and sneezing. The global effects of the coronavirus outbreak have spurred agencies like the World Health Organization to accelerate their research. Access to appropriate, safe lab space to study viruses like 2019-nCOV is imperative to understanding emerging health threats and developing effective vaccines and treatments. These spaces are called biosafety labs.

Most infectious disease research occurs in a biosafety lab to protect lab personnel, the environment, and other people from agents being studied. There are four levels of biosafety labs: BSL-1, BSL-2, BSL-3, and BSL-4. The Center for Disease Control and National Institutes of Health provide guidance for appropriate procedures and equipment based on the agent being studied. BSL-1 is the lowest safety level and applies to agents that pose a low risk to healthy adults. BSL-2 labs work with agents that pose a moderate risk to humans.

BSL-3 and BSL-4 labs work with agents that pose a much greater threat to humans, such as West Nile virus or the Ebola virus. At these biosafety levels, labs must take additional precautions to prevent microorganisms from entering or exiting the lab, such as non-recirculating air or high-efficiency particulate air filters. Even waste and water must be treated before exiting a biosafety lab at this level. As you can imagine, such strict policies can hinder a scientist’s ability to record their methods or results. Scientists in these labs wear a significant amount of protective gear, so traditional, physical lab notebooks are not an option.

Labii ELN & LIMS is an ideal solution for scientists working in a BSL-3 or BSL-4 lab. Research notes can be easily recorded on a computer inside the lab, ensuring methods and results are consistently and accurately documented. In addition, maintaining electronic records allows scientists to immediately share their findings, enhancing their ability to collaborate. Lab inventories can also be managed directly in Labii ELN & LIMS, allowing the user to track reagent and equipment use from outside the lab.

Want to learn more? Schedule a demo today at https://schedule.labii.com.

Natalie Burger

Saturday, February 1, 2020

Labii supports Chemical Drawing with Marvin JS

Labii widget - Marvin JS
Labii widget - Marvin JS


Since 2016, the FDA has approved 40-50 new drugs every year; this number represents just a fraction of the drugs that were actually discovered and tested. Drug discovery and development is driven by the knowledge of molecular chemistry and biological processes and facilitated by technological advances. Labii ELN & LIMS is accelerating research in this field by developing chemistry widgets that extend the functionality of our existing software. 

Chemistry plays a crucial role in the development of drugs. Before new methods for discovering molecules were available, new drugs were primarily discovered by modifying molecules from natural products. Development of new technologies such as high-throughput screening accelerated drug discovery. Regardless of the era, chemists are responsible for selecting and synthesizing compounds to address a wide range of diseases, and understanding chemical biology is important in every stage of drug discovery and development, from initial discovery to clinical trials and, finally, FDA approval. Chemical editors facilitate the process by allowing scientists to visualize and manipulate chemical compounds. Labii ELN & LIMS is pleased to support chemical editors like Marvin JS directly in our software.

Marvin JS is ChemAxon's novel chemical editor designed specifically for chemistry professionals. This revolutionary application provides a clean, user-oriented tool to efficiently draw and modify chemical structures, reactions, and electron transfers. Users can rotate or mirror whole or partial molecules and have access to several tools that facilitate complex structure creation. In addition, Marvin JS is easily integrated with web-based applications like Labii ELN & LIMS.

Marvin JS is one of many widgets supported in Labii ELN & LIMS. These widgets are stand-alone functions that allow users to edit or process specific pieces of data. Including widgets in Labii ELN & LIMS ensures our software meets every lab’s specific needs and extends the functionality of your existing ELN & LIMS.

Marvin JS integrates seamlessly into Labii ELN & LIMS as a Chemical Drawing widget, allowing you to draw and modify chemical compounds, reactions, and Markush structures. Users can create molecular structures and save the structure for later use. In the future, Labii ELN & LIMS will be integrating other similar packages, such as PerkinElmer’s ChemDraw. ChemDraw originated as a chemical drawing tool and has evolved to become one of the leading products for chemical drawing and research publications. 

Want to learn more? Schedule a demo today at https://schedule.labii.com.

Natalie Burger