OSCR

Positive selection on brain cis-regulatory elements in the human lineage drives changes in gene expression and susceptibility to neuropsychiatric disorders.

Code ↔ Paper

10 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 10 matches · 2 of them tie a paragraph to a whole file, not to given lines: weak matches, whose lines are not tinted
  1. [1] § Material and methods › b-CRE target gene expression across primates ↔ 4-Differential_Expression/WGCNA.py, lines 39–159 · score 0.67 · logistic linear regression, WGCNA, FDR, modules, enrichment, gene
  2. [2] § Material and methods › Phylogenetic analysis ↔ 2-Neutral_MSAs/Extract_Neutral_Bases.py, lines 206–304 · score 0.65 · phyloP track, PhyloP scores, retrieved, neutral
  3. [3] § Material and methods › b-CRE target gene expression across primates ↔ 4-Differential_Expression/breakpoint.py, lines 184–301 · score 0.62 · Wilcoxon rank sum, breakpoint, scores, macaque, genes, human
  4. [4] § Material and methods › Primate genome alignment ↔ 1-b-CREs_MSAs/fa_extractor_ucsc30.py, lines 99–198 · score 0.57 · cons30way, Browser, Python, UCSC, tracks, MSAs
  5. [5] § Material and methods › Multiple sequence alignment processing ↔ 1-b-CREs_MSAs/clipkit.sh, the whole file · a weak match · score 0.57 · kpic gappy mode, ClipKIT
  6. [6] § Material and methods › Multiple sequence alignment processing ↔ 2-Neutral_MSAs/clipkit.sh, the whole file · a weak match · score 0.56 · gappy mode, ClipKIT, kpic, gapped, thresholds
  7. [7] § Material and methods › Phylogenetic analysis ↔ 3-Positive_Selection_Test/adaptiphy.py, lines 101–141 · score 0.55 · HyPhy, positive selection, fitted, adaptiPhy, model
  8. [8] § Material and methods › b-CRE target gene expression across primates ↔ 4-Differential_Expression/Delta_Differential_Adult.py, lines 92–117 · score 0.53 · Wilcoxon rank sum, genes
  9. [9] § Material and methods › Phylogenetic analysis ↔ 4-Differential_Expression/WGCNA.py, lines 39–159 · score 0.53 · likelihood ratio, Bonferroni, fitted
  10. [10] § Results › Gene overrepresentation analysis ↔ 5-Gene Functional Enrichment/Random_Enrichmenet_permutation.R, lines 111–189 · score 0.52 · Functional enrichment, shared HPS, S7, permutation, adult, genes

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

Python · 213 lines · 7.9 KB · no license · 2 matches

  1. import pandas as pd
  2. import numpy as np
  3. from scipy import stats
  4. import warnings
  5. warnings.filterwarnings('ignore')
  6. # Install sklearn if not available
  7. try:
  8. from sklearn.linear_model import LogisticRegression
  9. except ImportError:
  10. import subprocess
  11. import sys
  12. print("Installing scikit-learn...")
  13. subprocess.check_call([sys.executable, "-m", "pip", "install", "scikit-learn"])
  14. from sklearn.linear_model import LogisticRegression
  15. def benjamini_hochberg_fdr(p_values, alpha=0.05):
  16. """Apply Benjamini-Hochberg FDR correction"""
  17. p_values = np.array(p_values)
  18. n = len(p_values)
  19. # Sort p-values and keep track of original indices
  20. sorted_indices = np.argsort(p_values)
  21. sorted_p = p_values[sorted_indices]
  22. # Calculate adjusted p-values
  23. adjusted_p = np.zeros(n)
  24. for i in range(n-1, -1, -1):
  25. if i == n-1:
  26. adjusted_p[sorted_indices[i]] = sorted_p[i]
  27. else:
  28. adjusted_p[sorted_indices[i]] = min(
  29. sorted_p[i] * n / (i + 1),
  30. adjusted_p[sorted_indices[i+1]]
  31. )
  32. return np.clip(adjusted_p, 0, 1)
  33. def run_wgcna_enrichment(df, gene_list, gene_type_name):
  34. """Run WGCNA enrichment analysis for a specific gene list"""
  35. print(f"\n{'='*70}")
  36. print(f"ANALYZING {gene_type_name.upper()} GENES")
  37. print(f"{'='*70}")
  38. # Create HAR status for all genes in WGCNA background
  39. df['HAR_status'] = df['ID'].isin(gene_list).astype(int)
  40. genes_in_wgcna = df['HAR_status'].sum()
  41. print(f"Total {gene_type_name} genes in list: {len(gene_list)}")
  42. print(f"{gene_type_name} genes found in WGCNA background: {genes_in_wgcna}")
  43. if genes_in_wgcna == 0:
  44. print(f"WARNING: No {gene_type_name} genes found in WGCNA background!")
  45. return None
  46. # Test enrichment for each module using logistic linear regression
  47. print(f"\nTesting enrichment using logistic linear regression across {df['Modules'].nunique()} modules...")
  48. modules = sorted(df['Modules'].unique())
  49. results = []
  50. for module in modules:
  51. # Create binary predictor: gene is in this module (1) or not (0)
  52. in_module = (df['Modules'] == module).astype(int)
  53. # Binary outcome: gene is HAR-associated (1) or not (0)
  54. har_status = df['HAR_status']
  55. # Skip modules with no genes or if no HAR genes exist
  56. if in_module.sum() == 0 or har_status.sum() == 0:
  57. continue
  58. # Logistic linear regression as described in the paper
  59. X = in_module.values.reshape(-1, 1)
  60. y = har_status.values
  61. try:
  62. # Fit logistic regression
  63. lr = LogisticRegression(fit_intercept=True, max_iter=1000)
  64. lr.fit(X, y)
  65. # Get coefficient (log odds ratio)
  66. coef = lr.coef_[0][0]
  67. # Calculate p-value using likelihood ratio test
  68. lr_null = LogisticRegression(fit_intercept=True, max_iter=1000)
  69. lr_null.fit(np.zeros((len(y), 1)), y)
  70. # Calculate log-likelihoods
  71. y_pred_full = lr.predict_proba(X)[:, 1]
  72. y_pred_null = lr_null.predict_proba(np.zeros((len(y), 1)))[:, 1]
  73. # Avoid numerical issues
  74. epsilon = 1e-15
  75. y_pred_full = np.clip(y_pred_full, epsilon, 1-epsilon)
  76. y_pred_null = np.clip(y_pred_null, epsilon, 1-epsilon)
  77. ll_full = np.sum(y * np.log(y_pred_full) + (1-y) * np.log(1-y_pred_full))
  78. ll_null = np.sum(y * np.log(y_pred_null) + (1-y) * np.log(1-y_pred_null))
  79. # Likelihood ratio test statistic
  80. lr_stat = 2 * (ll_full - ll_null)
  81. p_value = 1 - stats.chi2.cdf(lr_stat, df=1)
  82. except Exception as e:
  83. print(f"Logistic regression failed for module {module}: {e}")
  84. continue
  85. # Calculate descriptive statistics
  86. har_in_module = ((har_status == 1) & (in_module == 1)).sum()
  87. total_in_module = in_module.sum()
  88. total_har = har_status.sum()
  89. # Expected number of HAR genes in module under null hypothesis
  90. expected_har_in_module = (total_har * total_in_module) / len(df)
  91. fold_enrichment = har_in_module / max(expected_har_in_module, 1)
  92. # Odds ratio
  93. odds_ratio = np.exp(coef)
  94. results.append({
  95. 'Module': module,
  96. 'Total_genes_in_module': total_in_module,
  97. 'HAR_genes_in_module': har_in_module,
  98. 'Total_HAR_genes': total_har,
  99. 'Expected_HAR_in_module': expected_har_in_module,
  100. 'Fold_enrichment': fold_enrichment,
  101. 'Log_odds_ratio': coef,
  102. 'Odds_ratio': odds_ratio,
  103. 'P_value': p_value
  104. })
  105. # Convert results to DataFrame
  106. results_df = pd.DataFrame(results)
  107. # Multiple testing correction
  108. results_df['P_value_bonferroni'] = results_df['P_value'] * len(results_df)
  109. results_df['P_value_bonferroni'] = results_df['P_value_bonferroni'].clip(upper=1.0)
  110. # FDR correction
  111. results_df['P_value_fdr'] = benjamini_hochberg_fdr(results_df['P_value'], alpha=0.05)
  112. # Sort by p-value
  113. results_df = results_df.sort_values('P_value')
  114. # Display summary
  115. print(f"\nLogistic linear regression analysis complete!")
  116. print(f"Modules tested: {len(results_df)}")
  117. print(f"Significant modules (p < 0.05): {(results_df['P_value'] < 0.05).sum()}")
  118. print(f"Significant modules (Bonferroni p < 0.05): {(results_df['P_value_bonferroni'] < 0.05).sum()}")
  119. print(f"Significant modules (FDR p < 0.05): {(results_df['P_value_fdr'] < 0.05).sum()}")
  120. # Show top enriched modules
  121. print(f"\nTop 10 most significantly enriched modules:")
  122. display_cols = ['Module', 'HAR_genes_in_module', 'Total_genes_in_module',
  123. 'Fold_enrichment', 'Odds_ratio', 'P_value', 'P_value_bonferroni', 'P_value_fdr']
  124. print(results_df[display_cols].head(10))
  125. return results_df
  126. # Read the Excel file with WGCNA modules
  127. print("Reading WGCNA modules data...")
  128. df = pd.read_excel('Gene Modules.xlsx', header=2)
  129. # Clean the data
  130. df = df.dropna(subset=['ID'])
  131. df['ID'] = df['ID'].astype(str).str.strip()
  132. # Handle merged cells - forward fill module numbers
  133. df['Modules'] = df['Modules'].fillna(method='ffill')
  134. df['Modules'] = df['Modules'].astype(int)
  135. print(f"Total genes in WGCNA: {len(df)}")
  136. print(f"Total modules: {df['Modules'].nunique()}")
  137. # Define gene list files and their names
  138. gene_lists = {
  139. 'shared': 'shared_HPS-bCREs.txt',
  140. 'fetal': 'fetal_HPS-bCREs.txt',
  141. 'adult': 'adult_all_HPS-bCREs.txt'
  142. }
  143. # Process each gene list
  144. for gene_type, filename in gene_lists.items():
  145. try:
  146. # Read gene list
  147. print(f"\n\nReading {gene_type} genes list from {filename}...")
  148. with open(filename, 'r') as f:
  149. gene_list = [line.strip() for line in f if line.strip()]
  150. # Run enrichment analysis
  151. results_df = run_wgcna_enrichment(df.copy(), gene_list, gene_type)
  152. if results_df is not None:
  153. # Save results
  154. output_filename = f'HAR_WGCNA_enrichment_results_{gene_type}.csv'
  155. results_df.to_csv(output_filename, index=False)
  156. print(f"\nResults saved to '{output_filename}'")
  157. except FileNotFoundError:
  158. print(f"\nWARNING: Could not find file '{filename}' - skipping {gene_type} analysis")
  159. except Exception as e:
  160. print(f"\nERROR processing {gene_type} genes: {e}")
  161. print(f"\n\n{'='*70}")
  162. print("ALL ANALYSES COMPLETE")
  163. print(f"{'='*70}")
  164. print("\nMethod used (as per paper):")
  165. print("- Logistic linear regression")
  166. print(f"- Background: {len(df)} genes included in WGCNA analysis")
  167. print("- No regression of exome or gene length (promoter-based interactions)")
  168. print("- Multiple testing: Bonferroni and FDR corrections applied")

WGCNA.py at commit 5a3e90a, no license · at the source

Overview

Authors: Youness Touissi1, Eric J Vallender1,2
ORCID iDs: Eric J Vallender
  1. Program in Neuroscience, Department of Psychiatry and Human Behavior, University of Mississippi Medical Center, Jackson, MS, USA
  2. Population Health Program, Southwest National Primate Research Center, Texas Biomedical Research Institute, San Antonio, TX, USA
Journal: HGG advances, volume 7, issue 3, article 100629
Dates: received 18 March 2026; accepted 15 May 2026; published online 21 May 2026; in print July 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1016/j.xhgg.2026.100629 · PMID 42169411 · PMCID PMC13266179 · OpenAlex W7161945124
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: human (organism), cellular / molecular (subfield)
Methods: Statistics
Keywords: brain evolution, comparative genomics, cis-regulatory elements, HARs, positive selection, psychiatric disorders
MeSH: Brain*, Gene Expression Regulation*, Genetic Predisposition to Disease*, Mental Disorders*, Regulatory Elements, Transcriptional*, Regulatory Sequences, Nucleic Acid*, Selection, Genetic*, Animals, Evolution, Molecular, Humans (* major topic)
Topic: Genetics and Neurodevelopmental Disorders (Genetics, Biochemistry, Genetics and Molecular Biology), according to OpenAlex
Funding: National Institutes of Health Office of the Director (P51OD011104, P51OD011133, R24OD021324); NIMH NIH HHS (T32 MH135841); NIH HHS (P51 OD011104, P51 OD011133); National Institutes of Health
Citations: not cited yet (Europe PMC); 107 references in the paper

Abstract

The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.

Repositories

Its files are read in the Code ↔ Paper reader above, with 10 matches between paragraphs and lines of code.

ytouissi/b-CREs_Evolution

License: none: the authors keep all their rights
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: 5a3e90a3d6c3076dc6bc332220ae4f6106f51dff, 15 May 2026
Languages: Python (16), Shell (4), R (1)
Size: 56 files, 21 scripts
Software Heritage: not archived
Found in: “Data and code availability”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: pandas (8 files), Biopython (5 files), SciPy (5 files), NumPy (4 files), Matplotlib (3 files), seaborn (3 files), statsmodels (3 files), ggplot2 (1 file), scikit-learn (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
22 files

wodanaz/adaptiPhy

License: none: the authors keep all their rights
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: 10c2137160c798f76cb6ffdd3ac01449d7392a6e, 23 September 2026
Languages: Python (13), Shell (3), R (1)
Size: 51 files, 17 scripts
Software Heritage: not archived
Found in: the text, “Web resources”
Holds: README, environment (deprecated/Dockerfile)
Not found: license file, CITATION.cff, tests, continuous integration, documentation
Tools: Biopython (6 files), NumPy (2 files), Snakemake (2 files), pandas (1 file), SciPy (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
18 files

The paper's code and data availability statement is in the Data section.

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 38 scripts, each with its path and the digest of its content;
  • 10 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

No dataset and no data link were found in the paper.

Code and data availability statement

The paper has a code and data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

Read it in the paper: doi.org/10.1016/j.xhgg.2026.100629.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 28 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 2 authors, 6 keywords, 10 MeSH terms, 4 funders, 100 references.

Cite

This paper

Touissi, Y., & Vallender, E. J. (2026). Positive selection on brain cis-regulatory elements in the human lineage drives changes in gene expression and susceptibility to neuropsychiatric disorders. HGG advances, 7(3), 100629. https://doi.org/10.1016/j.xhgg.2026.100629

BibTeX

@article{touissi2026positive,
author = {Touissi, Youness and Vallender, Eric J},
title = {{Positive selection on brain cis-regulatory elements in the human lineage drives changes in gene expression and susceptibility to neuropsychiatric disorders}},
journal = {HGG advances},
year = {2026},
month = may,
volume = {7},
number = {3},
pages = {100629},
publisher = {Elsevier},
issn = {2666-2477},
doi = {10.1016/j.xhgg.2026.100629},
url = {https://doi.org/10.1016/j.xhgg.2026.100629},
pmid = {42169411},
pmcid = {PMC13266179}
}

RIS

TY - JOUR
AU - Touissi, Youness
AU - Vallender, Eric J
TI - Positive selection on brain cis-regulatory elements in the human lineage drives changes in gene expression and susceptibility to neuropsychiatric disorders
T2 - HGG advances
J2 - HGG Adv
PY - 2026
DA - 2026/05/21
VL - 7
IS - 3
SP - 100629
SN - 2666-2477
PB - Elsevier
DO - 10.1016/j.xhgg.2026.100629
UR - https://doi.org/10.1016/j.xhgg.2026.100629
LA - en
ER -

CSL-JSON

{
"id": "10.1016/j.xhgg.2026.100629",
"type": "article-journal",
"title": "Positive selection on brain cis-regulatory elements in the human lineage drives changes in gene expression and susceptibility to neuropsychiatric disorders",
"container-title": "HGG advances",
"author": [
{
"family": "Touissi",
"given": "Youness"
},
{
"family": "Vallender",
"given": "Eric J"
}
],
"container-title-short": "HGG Adv",
"volume": "7",
"issue": "3",
"page": "100629",
"DOI": "10.1016/j.xhgg.2026.100629",
"PMID": "42169411",
"PMCID": "PMC13266179",
"ISSN": "2666-2477",
"publisher": "Elsevier",
"URL": "https://doi.org/10.1016/j.xhgg.2026.100629",
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
21
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1186/s13059-026-04177-w [code]
Genomic sequence evolution underlying human neocortical interareal diversification.
Journal: Genome biology
In common: Snakemake, ggplot2, seaborn, 5 other tools, cellular / molecular, 3 references
[2] doi:10.1038/s41467-026-75700-7 [code]
Gene regulatory innovations from transposable elements in primate cerebellum development.
Journal: Nature communications
In common: Biopython, statsmodels, seaborn, 5 other tools, cellular / molecular, 3 references
[3] doi:10.1186/s13059-026-04098-8 [code]
A LINE-1 insertion upstream of FOXP2 promotes neuronal differentiation during primate evolution.
Journal: Genome biology
In common: statsmodels, seaborn, pandas, 3 other tools, 5 references
[4] doi:10.1126/sciadv.aea3316
Charting the human-specific properties of gene expression networks in the infant prefrontal cortex.
Journal: Science advances
In common: 7 references
[5] doi:10.1038/s44400-026-00094-8 [code]
Haplotype-resolved DNA methylation at the &lt;i&gt;APOE&lt;/i&gt; locus identifies allele-specific epigenetic signatures relevant to Alzheimer's disease risk.
Journal: NPJ dementia
In common: Snakemake, statsmodels, seaborn, 5 other tools, cellular / molecular, 2 references
[6] doi:10.1093/nargab/lqag050 [code]
TSProm: deep learning framework to predict tissue-specific regulatory logic.
Journal: NAR genomics and bioinformatics
In common: Biopython, statsmodels, ggplot2, 6 other tools, 1 reference
[7] doi:10.7554/elife.89001 [code]
Human-specific lncRNAs contributed critically to human evolution by distinctly regulating gene expression.
Journal: eLife
In common: pandas, SciPy, NumPy, cellular / molecular, 5 references
[8] doi:10.1038/s41467-026-73996-z [code]
Genetic architecture of white matter microstructure captured by unsupervised deep representation learning of fractional anisotropy maps.
Journal: Nature communications
In common: statsmodels, ggplot2, seaborn, 5 other tools, cellular / molecular, 2 references
[9] doi:10.1038/s42003-026-10957-8 [code]
Brain defence by the extracellular matrix protein Cochlin.
Journal: Communications biology
In common: Biopython, statsmodels, ggplot2, 6 other tools, cellular / molecular
[10] doi:10.1016/j.celrep.2026.117073 [code]
Single-cell epigenomics uncovers heterochromatin instability and transcription factor dysfunction during mouse brain aging.
Journal: Cell reports
In common: Snakemake, ggplot2, seaborn, 4 other tools, cellular / molecular, 1 reference

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.