Search bioRxiv⌕ Search

bioRxiv · 10.1101/2021.03.17.435781

phenopype: a phenotyping pipeline for Python

Abstract

O_LIDigital images are an intuitive way to capture, store and analyze organismal phenotypes. Many biologists are taking images to collect high-dimensional phenotypic information from specimens, which are key to investigating complex ecological, evolutionary and developmental phenomena, such as relationships between trait diversity and ecosystem function, multivariate natural selection, or developmental plasticity. As a consequence, images are being collected at ever increasing rates, but extraction of the contained phenotypic information still poses a veritable analytical bottleneck. C_LIO_LIphenopype is a high throughput phenotyping pipeline for the programming language Python that aims at alleviating this bottleneck. The package facilitates immediate extraction of high dimensional phenotypic data from laboratory grade digital images with low levels of background noise and complexity. At the core, phenopype provides functionality for rapid signal processing based image preprocessing and segmentation, followed by trait extraction, visualization and numerous options for data export. The functionality is provided by wrapping low-level Python computer vision libraries (e.g. OpenCV) into accessible functions, facilitating their incorporation into scientific image analysis workflows. In addition, phenopype provides a project management ecosystem to further simplify rapid data collection and to increase reproducibility. C_LIO_LIphenopype offers two different workflows that support users during different stages of scientific image analysis. The low-throughput workflow uses regular Python syntax and has greater flexibility at the cost of reproducibility, which is suitable for prototyping during the initial stage of a research project. The high-throughput workflow allows users to specify and store image-specific settings for analysis in human-readable YAML format, and then execute all functions in one step by means of an interactive parser. This approach facilitates rapid program-user interactions during batch processing, and greatly increases scientific reproducibility. C_LIO_LIOverall, phenopype intends to make the features of powerful but technically involved low-level CV libraries available to biologists with little or no Python coding experience. Therefore, phenopype is aiming to augment, rather than replace the utility of existing Python CV libraries, allowing biologists to focus on rapid and reproducible data collection. Furthermore, image annotations produced by phenopype can be used as training data, thus presenting a stepping stone towards the application of deep learning architectures. C_LI

Source connections

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Luerig, M. D.. 2021-03-17. phenopype: a phenotyping pipeline for Python. https://doi.org/10.1101/2021.03.17.435781

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related preprints

Cohabiting microbes can impact one another's mutation rates creating a mutational eco-evo feedback loop

Eco-evolutionary feedbacks are typically thought to require an ecological change driving Darwinian selection. However, ecology can drive other evolutionary mechanisms too. In many microbial species mutation rates are elevated at low population density, mediated by nutrient availability and reactive oxygen species (ROS). These findings from monoculture populations led us to hypothesise that the presence and density of a cohabiting species will also affect mutation rates. Using Escherichia coli as a focal species we explore the mutational effects on both parties of co-culture with either Enterococcus faecalis or Pseudomonas aeruginosa. These species co-occur in multiple clinical settings and have different abilities to degrade ROS. In both co-culture systems we find evidence that the presence of a stronger ROS degrader reduces mutation rates in the weaker ROS degrading species. At the same time increasing population density of the weaker ROS degrader increases mutation rates in the stronger ROS degrading species. Simultaneous mutation rate estimation in co-cultured species raises multiple experimental challenges addressed here. Despite these challenges, we find evidence for a novel form of eco-evo feedback in which the environment shapes the supply of mutational variation to the population. This in turn feeds back to alter the chance of evolutionary rescue for one species or another during a subsequent environmental change. Such effects potentially matter not only for our fundamental understanding of the interplay between ecology and evolution, but for the treatment of polymicrobial infections in which rates of resistance evolution may be altered by the cross-species mutational effects of cohabiting species.

evolutionary biology↗

All Together Now: Joint Codon Alignment, Ohmic Networks, and Error-Controlled Selection Inference in HyPhy 3

Codon-based maximum likelihood models are the workhorse of molecular selection analysis, yet standard workflows assume that the input sequence alignment and phylogenetic tree are known without error. In practice, heuristic aligners ignore the genetic code and phylogeny, which packs non-homologous codons into shared columns across insertion-deletion loops and inflates gene-wide false-positive rates above 80%. This sequential division of labor is statistically suboptimal and computationally wasteful. Here, we present WALRUS (Wheatstone Alignment and Likelihood Rate Unification for Selection), a unified engine in HyPhy 3 (https://github.com/veg/hyphy-3) that maps unaligned coding sequences to a coordinate-consistent selection atlas in one run. From a single Inside-Outside likelihood table, the pipeline repairs reading frames, co-estimates a codon alignment and Ohmic reticulate network, models directional base-composition drift, and evaluates eight selection tests (BUSTED-E, aBSREL, RELAX, FEL, dFEL, MEME, Contrast-FEL, and PRIME). Across 10,020 simulated alignments, WALRUS recovers 94.6% of true columns on the 800 INDELible replicates and cuts indel-driven false positives from 44.7%-58.1% to 4.4% under BUSTED (21.1%-21.4% to 1.4% under BUSTED-E). Under Zipfian indel saturation, false positives drop four-fold (33.3%-83.3% to 17.0%-20.5%), while 11,190 avian orthogroup runs execute 6.6-35.8-fold faster and cut housekeeping false positives 13-fold (28-fold on ultraconserved genes) proteome-wide.

evolutionary biology↗

Temporally Dynamic Waves of Selection on Archaic Variation in Peruvians

Introgression introduced deeply diverged archaic variation into modern human populations and contributed to local adaptation. In Indigenous American populations, however, the landscape of adaptive introgression remains poorly resolved. Genome-wide scans have reported numerous candidate loci, but complex demographic histories and recent admixture make genuine signals difficult to distinguish from false positives. Here, we systematically re-evaluated previously reported candidates of adaptive introgression in Peruvians using a multilayered framework and refined more than 150 putative signals to 25 high-confidence candidate loci with concordant evidence of Neanderthal- or Denisovan-like ancestry and positive selection. Using ancestral recombination graph (ARG) approaches, we inferred selection onset windows for 21 loci. These onsets were non-uniformly distributed across Peruvian population history, revealing temporally dynamic selection without robust evidence for a fixed number of discrete waves. Together with pre-Columbian ancient DNA evidence, the inferred histories support the inheritance of the candidate adaptive archaic haplotypes through ancestral Native American populations rather than first introduction through post-Columbian admixture. Functional analyses identified network-level signals consistent with polygenic selection in lipid metabolic and immune-related pathways, elevated regulatory effects predicted across archaic haplotypes, and occasional coding variation of potential functional relevance, including a missense variant at the immune-related gene CXCR4. Our results show that archaic introgressed variation remained evolutionarily important and available to selection long after introgression, providing a reservoir of genetic variation that could be repeatedly recruited by selection at different points in American population history.

evolutionary biology↗