bio-rna-structure-structure-probing
Analyzes experimental RNA structure probing data from SHAPE-MaP and DMS-MaPseq experiments using ShapeMapper2. Converts mutation rates to per-nucleotide reactivity profiles that constrain structure prediction. Use when processing SHAPE-MaP or DMS-MaPseq sequencing data to obtain experimental RNA structure information.
What this skill does
## Version Compatibility
Reference examples tested with: STAR 2.7.11+, eggNOG-mapper 2.1+, matplotlib 3.8+, numpy 1.26+, pandas 2.2+
Before using code patterns, verify installed versions match. If versions differ:
- Python: `pip show <package>` then `help(module.function)` to check signatures
- CLI: `<tool> --version` then `<tool> --help` to confirm flags
If code throws ImportError, AttributeError, or TypeError, introspect the installed
package and adapt the example to match the actual API rather than retrying.
# Structure Probing
**"Process my SHAPE-MaP experiment to get RNA reactivity profiles"** -> Convert mutation rates from SHAPE-MaP or DMS-MaPseq sequencing data into per-nucleotide reactivity profiles, then use reactivities as constraints for thermodynamic structure prediction.
- CLI: `shapemapper` (ShapeMapper2) for end-to-end SHAPE-MaP processing
- CLI: `RNAfold --shape` (ViennaRNA) for SHAPE-constrained folding
Analyze experimental RNA structure probing data (SHAPE-MaP, DMS-MaPseq) to obtain per-nucleotide reactivity profiles. High reactivity indicates flexible/single-stranded nucleotides; low reactivity indicates base-paired/structured positions. Reactivities constrain thermodynamic folding for more accurate structure prediction.
## Platform Note
ShapeMapper2 is Linux-only. On macOS, use Docker or Singularity:
```bash
# Docker
docker pull shapemapper2/shapemapper2
docker run -v $(pwd):/data shapemapper2/shapemapper2 shapemapper \
--target /data/target.fa --modified --R1 /data/mod_R1.fq.gz --R2 /data/mod_R2.fq.gz \
--untreated --R1 /data/unmod_R1.fq.gz --R2 /data/unmod_R2.fq.gz \
--out /data/results
# Singularity
singularity pull shapemapper2.sif docker://shapemapper2/shapemapper2
singularity exec -B $(pwd):/data shapemapper2.sif shapemapper \
--target /data/target.fa --modified --R1 /data/mod_R1.fq.gz ...
```
## ShapeMapper2 Pipeline
### Basic SHAPE-MaP Analysis
```bash
shapemapper \
--target target_rna.fa \
--name my_rna \
--modified --R1 modified_R1.fastq.gz --R2 modified_R2.fastq.gz \
--untreated --R1 untreated_R1.fastq.gz --R2 untreated_R2.fastq.gz \
--out results/ \
--nproc 8 \
--min-depth 5000
```
### With Denatured Control
A denatured control normalizes for sequence-dependent mutation biases.
```bash
shapemapper \
--target target_rna.fa \
--name my_rna \
--modified --R1 modified_R1.fastq.gz --R2 modified_R2.fastq.gz \
--untreated --R1 untreated_R1.fastq.gz --R2 untreated_R2.fastq.gz \
--denatured --R1 denatured_R1.fastq.gz --R2 denatured_R2.fastq.gz \
--out results/ \
--nproc 8
```
### Amplicon Mode (Targeted)
```bash
# For PCR-amplified targets
shapemapper \
--target target_rna.fa \
--name my_rna \
--amplicon \
--modified --R1 modified_R1.fastq.gz --R2 modified_R2.fastq.gz \
--untreated --R1 untreated_R1.fastq.gz --R2 untreated_R2.fastq.gz \
--out results/ \
--nproc 8
```
### Key ShapeMapper2 Options
| Option | Description |
|--------|-------------|
| `--target` | FASTA file with target RNA sequence(s) |
| `--name` | Name for output files |
| `--modified` | Modified sample FASTQ files |
| `--untreated` | Untreated control FASTQ files |
| `--denatured` | Denatured control FASTQ files |
| `--amplicon` | Amplicon sequencing mode |
| `--nproc` | Number of processors |
| `--min-depth` | Minimum read depth per nucleotide (default: 5000) |
| `--min-qual-to-count` | Minimum base quality (default: 20) |
| `--overwrite` | Overwrite existing output |
| `--star-aligner` | Use STAR instead of Bowtie2 for alignment |
### ShapeMapper2 Output Files
```
results/
├── my_rna_profile.txt # Per-nucleotide reactivity profile
├── my_rna_shapemapper_log.txt # Run log and QC metrics
├── my_rna_histograms/ # Mutation rate histograms
├── my_rna_profile.pdf # Reactivity bar plot
└── my_rna_map.shape # SHAPE reactivities for RNAfold
```
## Reactivity Interpretation
### SHAPE Reactivity Scale
| Value | Interpretation |
|-------|---------------|
| < 0.3 | Low reactivity, likely base-paired |
| 0.3 - 0.7 | Moderate, partially flexible or dynamic |
| > 0.7 | High reactivity, likely single-stranded |
| -999 | No data (insufficient read depth) |
### Quality Filters
| Metric | Threshold | Rationale |
|--------|-----------|-----------|
| Read depth | >= 5,000 | Minimum for reliable mutation rate estimation |
| Effective depth | >= 1,000 | After quality filtering |
| Modification rate (untreated) | < 0.5% | High background suggests RNA damage or mapping artifact |
| Modification rate (modified) | 1-10% | Too low = undermodified; too high = degraded |
## Structure-Guided Folding with SHAPE Data
### RNAfold with SHAPE Constraints
```bash
# Use ShapeMapper2 .shape output directly with RNAfold
RNAfold --shape=results/my_rna_map.shape < target_rna.fa
# Adjust SHAPE slope/intercept for different reagents
# Default (1NAI/NMIA): m=1.8, b=-0.6
RNAfold --shape=results/my_rna_map.shape --shapeMethod="Dm1.8b-0.6" < target_rna.fa
# Convert to hard constraints at extreme positions
# Reactivity > 0.7 forced unpaired, < 0.3 allowed to pair
RNAfold --shape=results/my_rna_map.shape --shapeConversion="S" < target_rna.fa
```
### Python: SHAPE-Constrained Folding
```python
import RNA
import pandas as pd
def load_shape_profile(profile_file):
'''Load ShapeMapper2 reactivity profile.'''
df = pd.read_csv(profile_file, sep='\t')
reactivities = df['Reactivity_profile'].tolist()
sequence = ''.join(df['Nucleotide'].tolist())
return sequence, reactivities
def fold_with_shape(sequence, reactivities, m=1.8, b=-0.6):
'''
Fold RNA constrained by SHAPE reactivities.
m, b: Deigan et al. (2009) parameters.
m=1.8, b=-0.6: standard for SHAPE (1M7, NMIA, NAI).
m=1.1, b=-0.3: suggested for DMS-MaPseq (A/C only).
'''
fc = RNA.fold_compound(sequence)
# Prepend -999 for 0-indexed padding (ViennaRNA expects 1-indexed)
shape_data = [-999.0] + [r if r != -999 else -999.0 for r in reactivities]
fc.sc_add_SHAPE_deigan(shape_data, m, b)
structure, mfe = fc.mfe()
# Also compute partition function for confidence
fc2 = RNA.fold_compound(sequence)
fc2.sc_add_SHAPE_deigan(shape_data, m, b)
_, pf_energy = fc2.pf()
centroid, _ = fc2.centroid()
return {
'mfe_structure': structure,
'mfe_energy': mfe,
'centroid_structure': centroid,
'ensemble_energy': pf_energy
}
def shape_agreement(structure, reactivities, low_threshold=0.3, high_threshold=0.7):
'''
Assess agreement between SHAPE data and predicted structure.
Returns fraction of nucleotides where reactivity agrees with structure
(low reactivity = paired, high reactivity = unpaired).
'''
agree, total = 0, 0
for i, (char, react) in enumerate(zip(structure, reactivities)):
if react == -999:
continue
total += 1
paired = char in '()'
if paired and react < low_threshold:
agree += 1
elif not paired and react > high_threshold:
agree += 1
return agree / total if total > 0 else 0.0
```
## DMS-MaPseq Analysis
DMS methylates unpaired A and C residues. SEISMIC-RNA (successor to DREEM) or rf-count process DMS-MaPseq data.
### SEISMIC-RNA
```bash
# Install
pip install seismic-rna
# Align reads to target
seismic align target.fa reads_R1.fq.gz reads_R2.fq.gz --out-dir seismic_out
# Relate mutations to reference
seismic relate seismic_out/align --out-dir seismic_out
# Compute mutation rates per position
seismic mask seismic_out/relate --out-dir seismic_out
# Cluster structural conformations (if RNA adopts multiple states)
seismic cluster seismic_out/mask --out-dir seismic_out --max-clusters 3
```
### rf-count (RNAframework)
```bash
# Count mutations with rf-count
rf-count -t target.fa -r modified.bam -rc untreated.bam -o rf_results/
# Normalize reactivities with rf-norm
rf-Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.