Positive selection on brain cis-regulatory elements in the human lineage drives changes in gene expression and susceptibility to neuropsychiatric disorders.
9 blocks of code here have a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.
The 10 matches · 2 of them tie a paragraph to a whole file without given lines: weak matches, whose lines are not tinted
- [1] § Material and methods › b-CRE target gene expression across primates ↔ 4-Differential_Expression/WGCNA.py, lines 39 to 159 · score 0.67 · logistic linear regression, WGCNA, FDR, modules, enrichment, gene · block
oscr:b:QY7AWYQEE6RDV-4· Report a mismatch - [2] § Material and methods › Phylogenetic analysis ↔ 2-Neutral_MSAs/Extract_Neutral_Bases.py, lines 206 to 304 · score 0.65 · phyloP track, PhyloP scores, retrieved, neutral · block
oscr:b:GPFT6NSC48ZHY-P· Report a mismatch - [3] § Material and methods › b-CRE target gene expression across primates ↔ 4-Differential_Expression/breakpoint.py, lines 184 to 301 · score 0.62 · Wilcoxon rank sum, breakpoint, scores, macaque, genes, human · block
oscr:b:SC4XVY7TX9A18-S· Report a mismatch - [4] § Material and methods › Primate genome alignment ↔ 1-b-CREs_MSAs/fa_extractor_ucsc30.py, lines 99 to 198 · score 0.57 · cons30way, Browser, Python, UCSC, tracks, MSAs · block
oscr:b:99ZA81WXHRETQ-U· Report a mismatch - [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 · block
oscr:b:FG2Z4537CPN8D-B· Report a mismatch - [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 · block
oscr:b:SFZD47HFA1AM5-X· Report a mismatch - [7] § Material and methods › Phylogenetic analysis ↔ 3-Positive_Selection_Test/adaptiphy.py, lines 101 to 141 · score 0.55 · HyPhy, positive selection, fitted, adaptiPhy, model · block
oscr:b:0BRCPYXG5BP2Y-Q· Report a mismatch - [8] § Material and methods › b-CRE target gene expression across primates ↔ 4-Differential_Expression/Delta_Differential_Adult.py, lines 92 to 117 · score 0.53 · Wilcoxon rank sum, genes · block
oscr:b:0DMJ1ZP2DNSPF-Q· Report a mismatch - [9] § Material and methods › Phylogenetic analysis ↔ 4-Differential_Expression/WGCNA.py, lines 39 to 159 · score 0.53 · likelihood ratio, Bonferroni, fitted · block
oscr:b:QY7AWYQEE6RDV-4· Report a mismatch - [10] § Results › Gene overrepresentation analysis ↔ 5-Gene Functional Enrichment/Random_Enrichmenet_permutation.R, lines 111 to 189 · score 0.52 · Functional enrichment, shared HPS, S7, permutation, adult, genes · block
oscr:b:K3DT5QPMESENB-9· Report a mismatch
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: 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
- import pandas as pd
- import numpy as np
- from scipy import stats
- import warnings
- warnings.filterwarnings('ignore')
- # Install sklearn if not available
- try:
- from sklearn.linear_model import LogisticRegression
- except ImportError:
- import subprocess
- import sys
- print("Installing scikit-learn...")
- subprocess.check_call([sys.executable, "-m", "pip", "install", "scikit-learn"])
- from sklearn.linear_model import LogisticRegression
- def benjamini_hochberg_fdr(p_values, alpha=0.05):
- """Apply Benjamini-Hochberg FDR correction"""
- p_values = np.array(p_values)
- n = len(p_values)
- # Sort p-values and keep track of original indices
- sorted_indices = np.argsort(p_values)
- sorted_p = p_values[sorted_indices]
- # Calculate adjusted p-values
- adjusted_p = np.zeros(n)
- for i in range(n-1, -1, -1):
- if i == n-1:
- adjusted_p[sorted_indices[i]] = sorted_p[i]
- else:
- adjusted_p[sorted_indices[i]] = min(
- sorted_p[i] * n / (i + 1),
- adjusted_p[sorted_indices[i+1]]
- )
- return np.clip(adjusted_p, 0, 1)
- def run_wgcna_enrichment(df, gene_list, gene_type_name):
- """Run WGCNA enrichment analysis for a specific gene list"""
- print(f"\n{'='*70}")
- print(f"ANALYZING {gene_type_name.upper()} GENES")
- print(f"{'='*70}")
- # Create HAR status for all genes in WGCNA background
- df['HAR_status'] = df['ID'].isin(gene_list).astype(int)
- genes_in_wgcna = df['HAR_status'].sum()
- print(f"Total {gene_type_name} genes in list: {len(gene_list)}")
- print(f"{gene_type_name} genes found in WGCNA background: {genes_in_wgcna}")
- if genes_in_wgcna == 0:
- print(f"WARNING: No {gene_type_name} genes found in WGCNA background!")
- return None
- # Test enrichment for each module using logistic linear regression
- print(f"\nTesting enrichment using logistic linear regression across {df['Modules'].nunique()} modules...")
- modules = sorted(df['Modules'].unique())
- results = []
- for module in modules:
- # Create binary predictor: gene is in this module (1) or not (0)
- in_module = (df['Modules'] == module).astype(int)
- # Binary outcome: gene is HAR-associated (1) or not (0)
- har_status = df['HAR_status']
- # Skip modules with no genes or if no HAR genes exist
- if in_module.sum() == 0 or har_status.sum() == 0:
- continue
- # Logistic linear regression as described in the paper
- X = in_module.values.reshape(-1, 1)
- y = har_status.values
- try:
- # Fit logistic regression
- lr = LogisticRegression(fit_intercept=True, max_iter=1000)
- lr.fit(X, y)
- # Get coefficient (log odds ratio)
- coef = lr.coef_[0][0]
- # Calculate p-value using likelihood ratio test
- lr_null = LogisticRegression(fit_intercept=True, max_iter=1000)
- lr_null.fit(np.zeros((len(y), 1)), y)
- # Calculate log-likelihoods
- y_pred_full = lr.predict_proba(X)[:, 1]
- y_pred_null = lr_null.predict_proba(np.zeros((len(y), 1)))[:, 1]
- # Avoid numerical issues
- epsilon = 1e-15
- y_pred_full = np.clip(y_pred_full, epsilon, 1-epsilon)
- y_pred_null = np.clip(y_pred_null, epsilon, 1-epsilon)
- ll_full = np.sum(y * np.log(y_pred_full) + (1-y) * np.log(1-y_pred_full))
- ll_null = np.sum(y * np.log(y_pred_null) + (1-y) * np.log(1-y_pred_null))
- # Likelihood ratio test statistic
- lr_stat = 2 * (ll_full - ll_null)
- p_value = 1 - stats.chi2.cdf(lr_stat, df=1)
- except Exception as e:
- print(f"Logistic regression failed for module {module}: {e}")
- continue
- # Calculate descriptive statistics
- har_in_module = ((har_status == 1) & (in_module == 1)).sum()
- total_in_module = in_module.sum()
- total_har = har_status.sum()
- # Expected number of HAR genes in module under null hypothesis
- expected_har_in_module = (total_har * total_in_module) / len(df)
- fold_enrichment = har_in_module / max(expected_har_in_module, 1)
- # Odds ratio
- odds_ratio = np.exp(coef)
- results.append({
- 'Module': module,
- 'Total_genes_in_module': total_in_module,
- 'HAR_genes_in_module': har_in_module,
- 'Total_HAR_genes': total_har,
- 'Expected_HAR_in_module': expected_har_in_module,
- 'Fold_enrichment': fold_enrichment,
- 'Log_odds_ratio': coef,
- 'Odds_ratio': odds_ratio,
- 'P_value': p_value
- })
- # Convert results to DataFrame
- results_df = pd.DataFrame(results)
- # Multiple testing correction
- results_df['P_value_bonferroni'] = results_df['P_value'] * len(results_df)
- results_df['P_value_bonferroni'] = results_df['P_value_bonferroni'].clip(upper=1.0)
- # FDR correction
- results_df['P_value_fdr'] = benjamini_hochberg_fdr(results_df['P_value'], alpha=0.05)
- # Sort by p-value
- results_df = results_df.sort_values('P_value')
- # Display summary
- print(f"\nLogistic linear regression analysis complete!")
- print(f"Modules tested: {len(results_df)}")
- print(f"Significant modules (p < 0.05): {(results_df['P_value'] < 0.05).sum()}")
- print(f"Significant modules (Bonferroni p < 0.05): {(results_df['P_value_bonferroni'] < 0.05).sum()}")
- print(f"Significant modules (FDR p < 0.05): {(results_df['P_value_fdr'] < 0.05).sum()}")
- # Show top enriched modules
- print(f"\nTop 10 most significantly enriched modules:")
- display_cols = ['Module', 'HAR_genes_in_module', 'Total_genes_in_module',
- 'Fold_enrichment', 'Odds_ratio', 'P_value', 'P_value_bonferroni', 'P_value_fdr']
- print(results_df[display_cols].head(10))
- return results_df
- # Read the Excel file with WGCNA modules
- print("Reading WGCNA modules data...")
- df = pd.read_excel('Gene Modules.xlsx', header=2)
- # Clean the data
- df = df.dropna(subset=['ID'])
- df['ID'] = df['ID'].astype(str).str.strip()
- # Handle merged cells - forward fill module numbers
- df['Modules'] = df['Modules'].fillna(method='ffill')
- df['Modules'] = df['Modules'].astype(int)
- print(f"Total genes in WGCNA: {len(df)}")
- print(f"Total modules: {df['Modules'].nunique()}")
- # Define gene list files and their names
- gene_lists = {
- 'shared': 'shared_HPS-bCREs.txt',
- 'fetal': 'fetal_HPS-bCREs.txt',
- 'adult': 'adult_all_HPS-bCREs.txt'
- }
- # Process each gene list
- for gene_type, filename in gene_lists.items():
- try:
- # Read gene list
- print(f"\n\nReading {gene_type} genes list from {filename}...")
- with open(filename, 'r') as f:
- gene_list = [line.strip() for line in f if line.strip()]
- # Run enrichment analysis
- results_df = run_wgcna_enrichment(df.copy(), gene_list, gene_type)
- if results_df is not None:
- # Save results
- output_filename = f'HAR_WGCNA_enrichment_results_{gene_type}.csv'
- results_df.to_csv(output_filename, index=False)
- print(f"\nResults saved to '{output_filename}'")
- except FileNotFoundError:
- print(f"\nWARNING: Could not find file '{filename}' - skipping {gene_type} analysis")
- except Exception as e:
- print(f"\nERROR processing {gene_type} genes: {e}")
- print(f"\n\n{'='*70}")
- print("ALL ANALYSES COMPLETE")
- print(f"{'='*70}")
- print("\nMethod used (as per paper):")
- print("- Logistic linear regression")
- print(f"- Background: {len(df)} genes included in WGCNA analysis")
- print("- No regression of exome or gene length (promoter-based interactions)")
- print("- Multiple testing: Bonferroni and FDR corrections applied")
WGCNA.py at commit 5a3e90a, no license · at the source
Overview
- Program in Neuroscience, Department of Psychiatry and Human Behavior, University of Mississippi Medical Center, Jackson, MS, USA
- Population Health Program, Southwest National Primate Research Center, Texas Biomedical Research Institute, San Antonio, TX, USA
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
5a3e90a3d6c3076dc6bc332220ae4f6106f51dff, 15 May 2026Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
22 files
- 1-b-CREs_MSAs/
CountSeqs.py , Python, 92 lines - 1-b-CREs_MSAs/
GetMSAs.sh , Shell, 148 lines - 1-b-CREs_MSAs/
SelectBestMSA.py , Python, 103 lines - 1-b-CREs_MSAs/
cleaning_fa.py , Python, 110 lines - 1-b-CREs_MSAs/
clipkit.sh , Shell, 66 lines, 1 match - 1-b-CREs_MSAs/
fa_extractor_cactus447.p , Python, 419 linesy - 1-b-CREs_MSAs/
fa_extractor_multiz470.p , Python, 573 linesy - 1-b-CREs_MSAs/
fa_extractor_ucsc30.py , Python, 425 lines, 1 match - 2-Neutral_MSAs/
Extract_Neutral_Bases.py , Python, 632 lines, 1 match - 2-Neutral_MSAs/
Files_Stats.py , Python, 64 lines - 2-Neutral_MSAs/
Generate_References.py , Python, 342 lines - 2-Neutral_MSAs/
Neutral_MSAs.sh , Shell, 53 lines - 2-Neutral_MSAs/
cleaning_fa.py , Python, 76 lines - 2-Neutral_MSAs/
clipkit.sh , Shell, 37 lines, 1 match - 3-Positive_Selection_Tes
t/ , Python, 339 lines, 1 matchadaptiphy.py - 4-Differential_Expressio
n/ , Python, 224 lines, 1 matchDelta_Differential_Adult .py - 4-Differential_Expressio
n/ , Python, 500 linesDelta_Expression.py - 4-Differential_Expressio
n/ , Python, 213 lines, 2 matchesWGCNA.py - 4-Differential_Expressio
n/ , Python, 497 lines, 1 matchbreakpoint.py - 4-Differential_Expressio
n/ , Python, 78 linesprocess_expression_data. py - 5-Gene Functional Enrichment/
Random_Enrichmenet_permu , R, 457 lines, 1 matchtation.R - README.md, Text, 47 lines
wodanaz/adaptiPhy
10c2137160c798f76cb6ffdd3ac01449d7392a6e, 23 September 2026Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
18 files
- adaptiphy-launch-slurm.s
h , Shell, 18 lines - deprecated/
DictGen.py , Python, 71 lines - deprecated/
GC_content.py , Python, 44 lines - deprecated/
LRT.R , R, 5 lines - deprecated/
bfgenerator_global.py , Python, 36 lines - deprecated/
domodel.sh , Shell, 9 lines - deprecated/
filtering.py , Python, 79 lines - deprecated/
prunning.py , Python, 62 lines - deprecated/
shgenerator.py , Python, 30 lines - neutral_smk/
scripts/ , Python, 262 linesparse_neutral.py - neutral_smk/
scripts/ , Python, 61 linesselect_and_filter_neutra l.py - neutral_smk/
slurm-launch-neutral-smk , Shell, 20 lines.sh - scripts/
DictGen.py , Python, 164 lines - scripts/
bf_generator.py , Python, 85 lines - scripts/
calculate_zeta.py , Python, 210 lines - scripts/
extract_res.py , Python, 65 lines - scripts/
select_and_filter.py , Python, 74 lines - README.md, Text, 427 lines
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:
- it points to the authors' code: ytouissi/
b-CREs_Evolution
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://
BibTeX
@article{touissi2026posi
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/
url = {https://
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/
VL - 7
IS - 3
SP - 100629
SN - 2666-2477
PB - Elsevier
DO - 10.1016/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1016/
"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":
"volume": "7",
"issue": "3",
"page": "100629",
"DOI": "10.1016/
"PMID": "42169411",
"PMCID": "PMC13266179",
"ISSN": "2666-2477",
"publisher": "Elsevier",
"URL": "https://
"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.1093/gbe/evac108 [code]
- Differentially Active and Conserved Neural Enhancers Define Two Forms of Adaptive Noncoding Evolution in Humans.Journal: Genome biology and evolutionIn common: cellular / molecular, 11 references
- [2] doi:10.1186/s12864-022-08450-7 [code]
- Inferring mammalian tissue-specific regulatory conservation by predicting tissue-specific differences in open chromatin.Journal: BMC genomicsIn common: Biopython, seaborn, scikit-learn, 3 other tools, cellular / molecular, 8 references
- [3] doi:10.7554/elife.89594 [code]
- Cell-type-specific <i>cis</
i>-regulatory divergence in gene expression and chromatin accessibility revealed by human-chimpanzee hybrid cells. Journal: eLifeIn common: Snakemake, statsmodels, ggplot2, 5 other tools, cellular / molecular, 6 references - [4] doi:10.1093/molbev/msae001
- Deciphering the Role of Rapidly Evolving Conserved Elements in Primate Brain Development and Exploring Their Potential Involvement in Alzheimer's Disease.Journal: Molecular biology and evolutionIn common: 10 references
- [5] doi:10.1126/sciadv.adc9507
- Lineage-specific accelerated sequences underlying primate evolution.Journal: Science advancesIn common: cellular / molecular, 9 references
- [6] doi:10.1038/s41467-025-60665-w [code]
- Decoding DNA sequence-driven evolution of the human brain epigenome at cellular resolution.Journal: Nature communicationsIn common: ggplot2, cellular / molecular, 8 references
- [7] doi:10.1093/molbev/msae186
- The Human Accelerated Region HAR202 Controls NPAS3 Expression in the Developing Forebrain Displaying Differential Enhancer Activity Between Modern and Archaic Human Sequences.Journal: Molecular biology and evolutionIn common: cellular / molecular, 8 references
- [8] doi:10.1126/sciadv.adt0534
- An ancient enhancer rapidly evolving in the human lineage promotes neural development and cognitive flexibility.Journal: Science advancesIn common: 8 references
- [9] doi:10.1186/s13073-021-00980-1 [code]
- Comprehensive multi-omics integration identifies differentially active enhancers during human brain development with clinical relevance.Journal: Genome medicineIn common: ggplot2, seaborn, pandas, 3 other tools, 5 references
- [10] doi:10.1126/sciadv.adj4452 [code]
- Using a comprehensive atlas and predictive models to reveal the complexity and evolution of brain-active regulatory elements.Journal: Science advancesIn common: statsmodels, pandas, SciPy, 2 other tools, 6 references
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.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 2 repositories of the authors' code, each at its verified commit and with its license, 38 scripts, and 10 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:b272012016778e79…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.1016/j.xhgg.2026.100629)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1016/j.xhgg.2026.100629.svg
:target: https://openscicode.org/badge/doi/10.1016/j.xhgg.2026.100629
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1016/j.xhgg.2026.100629"><img src="https://openscicode.org/badge/doi/10.1016/j.xhgg.2026.100629.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge 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: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
