Getting Started

FSH alone

from seminal import azoospermia_fsh

azoospermia_fsh(20)
# 0.439  -> a 43.9% probability of azoospermia

The published curve is U-shaped: 10.1% at undetectable FSH, a minimum of about 8.4% at FSH 3.6 IU/L, and 100% from about 30 IU/L.

Full logistic model

from seminal import azoospermia_lr

azoospermia_lr(age=36, fsh=5.7, lh=4.5, testosterone=429, testis_volume=15)
# 0.086

This is the median man from the paper’s Table 1. Pass explain=True to also get the linear predictor and each input’s contribution to the log-odds.

Semen parameters against the WHO reference distribution

from seminal import semen_percentile, below_reference

semen_percentile("concentration", 36)   # 25.0, the 25th centile of fertile men
below_reference("progressive_motility", 28)   # True, limit is 30

See WHO 2021 Semen Reference Distributions for the full table and the who2010 option.

Score a cohort

from seminal import add_azoospermia_risk_cols

scored = add_azoospermia_risk_cols(df)   # adds "azoo_fsh" and "azoo_lr"

See seminal quickstart for a worked example with output, Usage Guide for column mapping, and Input Requirements and Common Pitfalls for the expected units.

Library overview

import seminal
help(seminal)   # prints the logo and a summary of the library

Table of Contents

Getting Started

Documentation

About seminal