A computational workflow for prioritising previously uncharacterised candidate regions that may encode transmembrane β-barrel domains. The pipeline combines protein-domain co-occurrence, inter-domain gap extraction, topology prediction, sequence clustering, profile-HMM comparison with OMPdb, and whole-protein structural annotation using AlphaFold DB, TED/CATH and Foldseek.
Scope of the repository
This repository supports candidate discovery, annotation and prioritisation. A computational label such asNOVEL_CANDIDATE,UNCHARACTERIZEDorTRULY_NOVELmust not be interpreted as experimental proof of a new protein family. The strongest defensible conclusion is that a cluster is a putative novel candidate with no detectable relationship under the searches applied.
- Scientific rationale
- Workflow overview
- Repository structure
- Software and databases
- Installation
- Input data
- Pipeline stages
- Structural validation
- Corrected OMPdb evidence table
- Archived result summary
- Interpretation of the evidence
- Reproducibility
- Limitations
- Citation
Known bacterial outer-membrane β-barrel proteins are frequently found in recurring multidomain architectures. The working hypothesis of this project is that Pfam domains that significantly co-occur with curated OMPdb β-barrel domains may act as contextual markers for related outer-membrane proteins. Long unannotated regions within proteins carrying those contextual domains can therefore be prioritised as candidate β-barrel regions.
The workflow does not rely on a single predictor. Candidate regions are assessed through several complementary evidence layers:
- Domain context: Pfam–OMPdb co-occurrence.
- Unannotated sequence: inter-domain regions longer than 80 amino acids.
- Topology: PRED-TMBB2 β-barrel prediction.
- Family support: CD-HIT clustering and cluster-level enrichment.
- Known-family sensitivity: OMPdb profile-HMM rescanning with a permissive domain i-Evalue threshold.
- Structural context: AlphaFold DB model availability, TED/CATH assignments and Foldseek/PDB100 similarity.
The co-occurrence tables are calculated only from proteins retained after the domain-annotation stage because they contain at least one unannotated region longer than 80 amino acids. They must therefore not be described as contingency tables over all proteins in all source proteomes.
flowchart TD
A[Pfam-A HMM library] --> C[Remove profiles already represented in OMPdb]
B[OMPdb HMM library] --> C
C --> D[HMMER annotation of proteomes]
B --> D
D --> E[Retain proteins with unannotated regions >80 aa]
E --> F[Pfam–OMPdb co-occurrence tables]
F --> G[Statistical association testing]
G --> H[Extract candidate gap sequences]
H --> I[PRED-TMBB2 topology prediction]
I --> J[CD-HIT clustering at 40% identity]
J --> K[Select clusters with >=5 members and >=70% predicted positives]
K --> L[OMPdb profile-HMM rescan; domain i-Evalue <0.1]
L --> M[AlphaFold DB and ESM Atlas lookup]
M --> N[TED/CATH domain annotation]
N --> O[Foldseek search against PDB100]
O --> P[Cluster evidence table and conservative prioritisation]
novel-beta-barrel-domain-discovery/
├── README.md
├── requirements.txt
├── scripts/
│ ├── 01_database_preparation/
│ │ └── 01_filter_pfam_ompdb_redundancy.py
│ ├── 02_domain_annotation/
│ │ ├── 02_annotate_proteomes_and_detect_gaps.py
│ │ └── 03_extract_unique_pfam_domains.py
│ ├── 03_cooccurrence_analysis/
│ │ ├── 04_calculate_domain_cooccurrence.py
│ │ ├── 05_merge_cooccurrence_partitions.py
│ │ └── 06_test_domain_associations.py
│ ├── 04_candidate_extraction/
│ │ └── 07_extract_candidate_gap_sequences.py
│ ├── 05_topology_prediction/
│ │ └── 08_parse_pred_tmbb2_results.py
│ ├── 06_sequence_clustering/
│ │ ├── 09_number_fasta_headers_for_cdhit.py
│ │ ├── 10_restore_cdhit_cluster_headers.py
│ │ └── 11_select_beta_barrel_enriched_clusters.py
│ └── 07_candidate_validation/
│ ├── 12_rescan_clusters_against_ompdb.py
│ ├── 13_annotate_clusters_structurally.py
│ ├── 14_classify_candidate_clusters.py
│ ├── 15_build_cluster_summary_table.py
│ └── 16_build_final_evidence_table.py
├── results/
│ ├── summary/
│ ├── final/
│ └── structure_validation/
└── tests/
└── test_build_final_evidence_table.py
The repository contains compact result files from the archived analysis. Raw proteomes, Pfam-A, the OMPdb HMM library, PRED-TMBB2 installations and large downloaded structural databases are not redistributed.
The Python dependencies recorded in requirements.txt are:
pandas
numpy
scipy
tqdm
requests
beautifulsoup4
The full workflow additionally requires:
- Python 3.10 or newer;
- HMMER 3 (
hmmscan,hmmpress); - CD-HIT (
cd-hit); - PRED-TMBB2;
- Git.
The workflow uses locally downloaded or remotely queried data from:
- Pfam-A profile HMMs;
- OMPdb profile HMMs, with the archived analysis using
OMPdb_2022_11_17.hmm; - AlphaFold Protein Structure Database;
- TED/CATH;
- Foldseek/PDB100;
- ESM Metagenomic Atlas as a fallback when supported.
Database snapshots and retrieval dates should be reported in any manuscript because these resources evolve over time.
git clone https://github.com/programmereua/novel-beta-barrel-domain-discovery.git
cd novel-beta-barrel-domain-discoveryOn Git Bash for Windows:
python -m venv .venv
source .venv/Scripts/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txtOn Linux or macOS:
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txthmmscan -h | head
hmmpress -h | head
cd-hit -h | headPRED-TMBB2 must be installed and executed according to its own distribution instructions.
The full analysis expects the following user-supplied resources:
Pfam-A.hmm
OMPdb_2022_11_17.hmm
ompdb_domain_names.csv
fasta_files/ # input proteome FASTA files
The original compute-intensive annotation was divided into four mutually exclusive proteome partitions. Each protein should belong to exactly one partition to prevent double counting when partition-level results are merged.
Several scripts use fixed relative filenames rather than command-line arguments. Run each script in a working directory containing the filenames documented in its module docstring, or edit those filename variables deliberately and record the changes.
Script: scripts/01_database_preparation/01_filter_pfam_ompdb_redundancy.py
Purpose: avoid counting the same curated OMP family through both the Pfam and OMPdb libraries.
Expected files in the current working directory:
Pfam-A.hmm
OMPdb_2022_11_17.hmm
Run:
python scripts/01_database_preparation/01_filter_pfam_ompdb_redundancy.py
hmmpress filtered_PFAM.hmm
hmmpress OMPdb_2022_11_17.hmmOutput:
filtered_PFAM.hmm
Script: scripts/02_domain_annotation/02_annotate_proteomes_and_detect_gaps.py
For each proteome, the script:
- runs
hmmscanagainst filtered Pfam and OMPdb profiles; - retains hits passing the profile trusted cutoff where available;
- combines Pfam and OMPdb annotations per protein;
- detects unannotated regions longer than 80 amino acids;
- retains proteins with at least one such region.
Because the original workload was distributed, run the stage once per proteome partition and rename the generated files with partition suffixes 1–4.
Principal outputs per partition:
filtered_pfam_outputN.csv
ompdb_outputN.csv
filtered_combined_outputN.csv
combined_outputN.csv
filtered_combined_outputN.csv is the downstream input used for co-occurrence and candidate extraction.
Script: scripts/02_domain_annotation/03_extract_unique_pfam_domains.py
Edit the input and output suffix in the script for each partition, then run:
python scripts/02_domain_annotation/03_extract_unique_pfam_domains.pyOutputs:
unique_pfam_domains_part_01.csv
unique_pfam_domains_part_02.csv
unique_pfam_domains_part_03.csv
unique_pfam_domains_part_04.csv
Script: scripts/03_cooccurrence_analysis/04_calculate_domain_cooccurrence.py
For each Pfam domain in a partition, the script constructs a 2×2 table:
| OMPdb present | OMPdb absent | |
|---|---|---|
| Pfam present | Pfam_and_Barrel |
Only_Domain |
| Pfam absent | Only_Barrel |
No_Domain_No_Barrel |
Edit the partition suffix and run once for each partition:
python scripts/03_cooccurrence_analysis/04_calculate_domain_cooccurrence.pyOutputs:
pfam_ompdb_cooccurrence_part_01.csv
pfam_ompdb_cooccurrence_part_02.csv
pfam_ompdb_cooccurrence_part_03.csv
pfam_ompdb_cooccurrence_part_04.csv
Script: scripts/03_cooccurrence_analysis/05_merge_cooccurrence_partitions.py
python scripts/03_cooccurrence_analysis/05_merge_cooccurrence_partitions.pyOutput:
pfam_ompdb_cooccurrence_aggregated.csv
Script: scripts/03_cooccurrence_analysis/06_test_domain_associations.py
The archived script calculates:
- sample odds ratio;
- a normal-approximation two-sided p-value for the log odds ratio;
- Fisher's exact p-value;
- Pearson chi-square p-value with continuity correction.
The archived selection rule is:
odds ratio > 1 and unadjusted normal-approximation p-value < 0.05
Run:
python scripts/03_cooccurrence_analysis/06_test_domain_associations.pyOutputs:
pfam_ompdb_cooccurrence_aggregated.csv
significant_pfam_ompdb_associations.csv
pfam_domains_with_ompdb_cooccurrence.csv
For manuscript reporting, state the implemented rule exactly. The archived implementation does not apply a multiple-testing correction.
Script: scripts/04_candidate_extraction/07_extract_candidate_gap_sequences.py
A protein is retained when it:
- carries at least one Pfam domain from
significant_pfam_ompdb_associations.csv; - lacks a known OMPdb domain annotation;
- contains one or more previously detected gap regions.
Run:
python scripts/04_candidate_extraction/07_extract_candidate_gap_sequences.pyOutputs:
final_filtered_results.fasta
candidate_gap_sequences.fasta
candidate_gap_sequences.fasta merges all matching contextual Pfam domains for the same protein-gap pair and is the input to PRED-TMBB2.
Run PRED-TMBB2 on:
candidate_gap_sequences.fasta
Save the raw predictor output as:
pred_tmbb2_raw_output.txt
Parse it with:
python scripts/05_topology_prediction/08_parse_pred_tmbb2_results.pyOutput:
pred_tmbb2_candidate_probabilities.csv
A positive PRED-TMBB2 call is treated as a predicted β-barrel candidate, not as confirmation of a new domain or family.
Number the FASTA headers:
python scripts/06_sequence_clustering/09_number_fasta_headers_for_cdhit.py \
candidate_gap_sequences.fasta \
candidate_gap_sequences_numbered.fastaCluster at 40% sequence identity:
cd-hit \
-i candidate_gap_sequences_numbered.fasta \
-o candidate_gap_sequences_cdhit40.fasta \
-c 0.40 \
-n 2 \
-d 0The CD-HIT cluster file is expected as:
candidate_gap_sequences_cdhit40_clusters.clstr
Restore original headers when required:
python scripts/06_sequence_clustering/10_restore_cdhit_cluster_headers.pyScript: scripts/06_sequence_clustering/11_select_beta_barrel_enriched_clusters.py
The archived high-confidence cluster rule is:
cluster size >= 5 members
and
70%–100% of members called positive by PRED-TMBB2
Run:
python scripts/06_sequence_clustering/11_select_beta_barrel_enriched_clusters.pyOutputs:
cdhit40_clusters_with_pred_tmbb2_predictions.txt
high_confidence_clusters_70pct.txt
high_confidence_clusters_70pct_summary.txt
high_confidence_clusters_70pct_with_sequences.txt
Script: scripts/07_candidate_validation/12_rescan_clusters_against_ompdb.py
Each selected candidate region is scanned against the OMPdb profile-HMM library. The archived inclusion criterion is:
domain i-Evalue < 0.1
Run in a directory containing high_confidence_clusters_70pct_with_sequences.txt and the OMPdb HMM library:
python scripts/07_candidate_validation/12_rescan_clusters_against_ompdb.pyOutput:
high_confidence_clusters_with_ompdb_hits.txt
This is a sensitive screen for possible weak or remote relationships. A permissive hit is not by itself a definitive family assignment.
Script: scripts/07_candidate_validation/13_annotate_clusters_structurally.py
The script retrieves or queries:
- AlphaFold DB models;
- ESM Atlas fallback models where supported;
- TED/CATH domain annotations;
- Foldseek matches against PDB100.
Example:
python scripts/07_candidate_validation/13_annotate_clusters_structurally.py \
--input results/final/high_confidence_clusters_with_ompdb_hits.txt \
--outdir structural_annotation_runFor a local TED/CATH domain-summary table:
python scripts/07_candidate_validation/13_annotate_clusters_structurally.py \
--input results/final/high_confidence_clusters_with_ompdb_hits.txt \
--outdir structural_annotation_run \
--ted-tsv /path/to/ted_365m.domain_summary.cath.globularity.taxid.tsv.gzTo skip Foldseek temporarily:
python scripts/07_candidate_validation/13_annotate_clusters_structurally.py \
--input results/final/high_confidence_clusters_with_ompdb_hits.txt \
--outdir structural_annotation_run \
--skip-foldseekThe annotation script caches results, allowing interrupted runs to resume.
Interpretation boundary: structural searches are performed using complete proteins that contain candidate regions. A whole-protein Foldseek or CATH match may arise from another domain in the same protein. Therefore, this stage provides cluster-level structural context and prioritisation; it does not prove that the extracted candidate coordinates themselves form the matched fold.
python scripts/07_candidate_validation/15_build_cluster_summary_table.py \
results/structure_validation/annotated_high_confidence_clusters.txt \
results/structure_validation/cluster_summary_table.tsvpython scripts/07_candidate_validation/14_classify_candidate_clusters.py \
results/structure_validation/cluster_summary_table.tsv \
results/structure_validation/cluster_classification.tsvThe classifier combines Foldseek descriptions, CATH assignments, Pfam context and structure availability. Its labels are heuristic prioritisation labels, not experimental family definitions.
The final publication-style table is rebuilt using the member-level OMPdb results rather than assigning OMPdb_hit=YES to every cluster.
Script: scripts/07_candidate_validation/16_build_final_evidence_table.py
python scripts/07_candidate_validation/16_build_final_evidence_table.py \
--simple-table results/structure_validation/cluster_evidence_summary.tsv \
--ompdb-clusters results/final/high_confidence_clusters_with_ompdb_hits.txt \
--output results/structure_validation/cluster_evidence_summary.tsv \
--detailed-output results/structure_validation/cluster_evidence_summary_detailed.tsv \
--allow-missingYES: at least one PRED-TMBB2-positive member has an OMPdb profile-HMM hit with domaini-Evalue < 0.1;NO: the cluster is represented in the OMPdb result file, but none of its PRED-TMBB2-positive members has such a hit;UNKNOWN: the cluster is absent from the available OMPdb-annotated cluster file.
The detailed table additionally reports:
OMPdb_any_member_hit
OMPdb_PRED_YES_members
OMPdb_PRED_YES_members_with_hit
OMPdb_hit_fraction_of_PRED_YES
OMPdb_all_members_with_hit
OMPdb_best_profile
OMPdb_best_iEvalue
OMPdb_profile_member_counts
OMPdb_header_reported_hit_members
OMPdb_count_consistent
Run the included test with:
python -m unittest discover \
-s tests \
-p "test_build_final_evidence_table.py" \
-vThe compact repository contains the following archived outputs:
| Stage | Archived count |
|---|---|
| Pfam domains in the aggregated co-occurrence table | 14,462 |
| Pfam domains retained by the archived association rule | 159 |
| Candidate regions evaluated by PRED-TMBB2 | 174,840 |
| PRED-TMBB2-positive candidate regions | 19,191 |
| Clusters represented in the OMPdb-annotated final cluster file | 306 |
| Clusters in the structurally evaluated subset | 152 |
| Protein-region members in the structural subset | 1,998 |
| Unique UniProt accessions in the structural subset | 1,850 |
| AlphaFold DB models available | 1,626 / 1,850 |
| Accessions without an AlphaFold DB model | 224 / 1,850 |
| Foldseek/PDB100 results available | 1,626 / 1,850 |
OMPdb_hit |
Clusters |
|---|---|
YES |
108 |
NO |
42 |
UNKNOWN |
2 |
The two UNKNOWN clusters are absent from the available OMPdb-annotated cluster file and are therefore not assigned an inferred binary result.
| Category | Clusters |
|---|---|
KNOWN_PDB |
105 |
KNOWN_CATH |
38 |
KNOWN_PFAM_AF |
2 |
MULTI_DOMAIN_with_barrel |
1 |
UNCHARACTERIZED |
6 |
AMBIGUOUS |
0 |
TRULY_NOVEL |
0 |
Collapsed publication table:
| Category | Clusters |
|---|---|
KNOWN |
146 |
UNCHARACTERIZED |
6 |
NOVEL |
0 |
The six structurally unresolved clusters are:
216, 161, 181, 314, 215, 6867
They lack available structural models in the archived lookup and therefore require additional modelling or other follow-up analysis before a structural novelty conclusion can be made.
The repository can support statements such as:
- candidate β-barrel regions were prioritised through domain context and topology prediction;
- clusters were enriched for PRED-TMBB2-positive members;
- OMPdb profile-HMM hits identified possible known or remote sequence relationships;
- whole-protein AlphaFold/TED/CATH/Foldseek evidence provided structural context;
- clusters lacking sufficient evidence were retained as unresolved candidates for follow-up.
The repository does not by itself establish:
- experimental membrane localisation;
- a confirmed transmembrane β-barrel fold;
- absolute absence of evolutionary homology;
- a newly established protein family;
- biological function.
Use:
“putative transmembrane β-barrel candidate”
or:
“candidate cluster with no detectable sequence- or structure-level relationship under the searches applied.”
Avoid:
“proved novel,” “truly novel,” or “confirmed new family”
unless supported by additional domain-coordinate-specific structural analysis, broader homology searches and experimental evidence.
For a reproducible run, record:
- Git commit hash;
- Python version and
pip freezeoutput; - HMMER, CD-HIT and PRED-TMBB2 versions;
- Pfam and OMPdb database releases;
- proteome source and download date;
- the four partition definitions;
- all thresholds and command lines;
- AlphaFold DB, TED/CATH and Foldseek query dates;
- any interrupted or resumed API calls;
- checksums for large input and result files.
Useful commands:
git rev-parse HEAD
python --version
python -m pip freeze > environment_freeze.txt
hmmscan -h | head -n 3
cd-hit -h | head -n 3
sha256sum results/structure_validation/cluster_evidence_summary.tsvOnline resources are versioned independently of this repository. Re-running structural annotation later may therefore produce updated results.
- Predictive evidence: PRED-TMBB2 positives are computational candidates, not experimentally confirmed barrels.
- Permissive OMPdb screen:
i-Evalue < 0.1is designed to retain weak relationships and must be interpreted together with recurrence, alignment coverage and biological context. - Whole-protein structural searches: Foldseek and CATH evidence may correspond to a domain outside the extracted candidate coordinates.
- Database dependence: absence of a hit means no detectable hit in the database snapshot and search configuration used, not absence of homology.
- Archived statistical rule: the included association output uses an unadjusted p-value criterion and does not include a multiple-testing correction.
- Heuristic cluster categories: classifier labels are prioritisation aids and should not replace manual inspection or domain-specific validation.
- Raw data availability: the compact repository does not redistribute the original proteome collection or large HMM/structure databases.
A manuscript citation should be added here when available.
Suggested temporary repository citation:
Kourtzelli, E. Novel β-Barrel Domain Discovery: a domain-context, topology-prediction and structural-annotation workflow. GitHub repository, accessed YYYY-MM-DD.
When using external tools and databases, also cite their original publications and the specific releases used in the analysis.
For questions, reproducibility reports or proposed improvements, open an issue in this repository.