Agent skill · Audited from source
Duplicate Handling
skill · GPTomics/bioSkillsMIT licenceAudited 19 Oct 2026 · source c8c1fc3a2b13
Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit c8c1fc3a2b13 and found no filesystem, network or shell access and no hard-coded secrets. What it does: Mark and remove PCR/optical duplicates using samtools fixmate and markdup. Use when preparing alignments for variant calling or when duplicate reads would bias analysis.
Cite
Cite this page
ModelsAtlas. “Duplicate Handling (GPTomics/bioSkills)”. Retrieved 19 Oct 2026. https://modelsatlas.com/skills/gptomics/duplicate-handling
Trust audit
Audit 0.4.1 · source read 19 Oct 2026
SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 13,985 of 14,816 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | PASS | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 0 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (0)
No findings at any severity. We re-audit when the source changes.
Audit 0.4.1 · source sha c8c1fc3a2b13 · 19 Oct 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- PublisherGPTomics GitHub organizationOwner of the repository this skill is read from
- Source folderGPTomics/bioSkills/alignment-files/duplicate-handlingThe exact folder we audited
- LicenceMITAs the repository states it
- Commit pinned for this verdictc8c1fc3a2b13A new audit runs when the source changes
- Repository statusArchivedLast push 65 days ago
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: Mark and remove PCR/optical duplicates using samtools fixmate and markdup. Use when preparing alignments for variant calling or when duplicate reads would bias analysis.
--- name: bio-duplicate-handling description: Mark and remove PCR/optical duplicates using samtools fixmate and markdup. Use when preparing alignments for variant calling or when duplicate reads would bias analysis. tool_type: cli primary_tool: samtools --- ## Version Compatibility Reference examples tested with: picard 3.1+, pysam 0.22+, samtools 1.19+ 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. # Duplicate Handling **"Remove PCR duplicates from my BAM file"** -> Mark or remove duplicate reads using the fixmate-sort-markdup pipeline to prevent duplicate bias in variant calling. - CLI: `samtools fixmate`, `samtools markdup` (samtools) - Python: `pysam.fixmate()`, `pysam.markdup()` (pysam) Mark and remove PCR/optical duplicates using samtools. ## Why Remove Duplicates? PCR duplicates are identical copies of the same original molecule, created during library preparation. They inflate coverage, bias allele frequencies, and create false positive variant calls. Optical duplicates are flowcell-proximity artifacts: on unpatterned flowcells they arise when the imaging software splits one cluster into two adjacent calls; on patterned flowcells (NovaSeq, NovaSeq X, NextSeq 1000/2000, HiSeq X/4000) the dominant source is ExAmp (exclusion-amplification) "pad-hopping", where a library molecule re-seeds a nearby nanowell. ## When to Mark Duplicates -- and When NOT To Standard `samtools markdup` is the right tool for some assays and actively harmful for others. The decision is assay-driven: | Assay | Standard markdup? | Recommended approach | |-------|------------------|----------------------| | Germline WGS / WES (PCR or PCR-free) | YES | `samtools markdup` (PCR-free still has ~0.5% optical duplicates on patterned flowcells) | | Somatic tumor/normal (no UMI) | YES | Same | | Exome / target capture | YES (20-50% expected) | `samtools markdup` | | ChIP-seq | **MARK, do not remove** | Then use peak caller's auto-dup logic (`macs3 --keep-dup auto`) | | CUT&RUN / CUT&Tag | MARK, do not remove | Same | | ATAC-seq | YES, BEFORE Tn5 +4/-5 shift | Then shift coords for footprinting | | Bulk RNA-seq (no UMIs) | **NO** | Duplicates are biological at highly-expressed loci; removing them biases DE proportional to expression | | Bulk RNA-seq (with UMIs) | NO | umi_tools dedup | | scRNA (10x, STARsolo, drop-seq) | **NO** | umi_tools dedup with CB+UB tags, or rely on Cell Ranger UMI counts | | ctDNA / liquid biopsy / deep panel (UMI) | NO | fgbio GroupReadsByUmi -> CallDuplexConsensusReads | | Twist / IDT / Roche UMI capture | NO | fgbio or Picard UmiAwareMarkDuplicatesWithMateCigar | | Amplicon / hotspot panel (no UMI) | **NO** | Every read is a "duplicate" by coordinate; markdup erases the dataset. Use `samtools ampliconclip` instead -- see alignment-amplicon-clipping. | | Amplicon / hotspot panel (UMI) | NO | fgbio consensus | | Long-read native (ONT, PacBio HiFi unamplified) | NO | No PCR step; markdup is meaningless | | PacBio HiFi amplicon | YES (rare) | `pbmarkdup` | | Ancient DNA (aDNA) | YES + mapDamage | Run markdup, then mapDamage `--rescale` before variant calling | | Microbiome 16S/ITS | NO | Read counts encode community structure | If the BAM came from 10x Cell Ranger / STARsolo and `samtools markdup` produces a 50-95% duplicate rate, it is the wrong tool, not a bug. ## Tool Selection: markdup vs Picard vs UMI-aware | Tool | Speed | Threading | Optical | UMI | Notes | |------|-------|-----------|---------|-----|-------| | `samtools markdup` | Fast | Yes | Yes (`-d`) | Limited (`--barcode-tag` exact-match) | Fast production choice (nf-core/sarek defaults to GATK MarkDuplicates) | | `picard MarkDuplicates` | Slow | No | Yes | UmiAware variant (BETA, transcriptome bug) | GATK Best Practices reference | | `biobambam2 bammarkduplicates2` | Fastest | Yes | Yes | No | Sanger / 1KGP pipelines | | `samblaster` | Streaming, fast | No | Optional | No | Pipe directly from aligner; no name sort | | `sambamba markdup` | Fast | Yes | Yes | No | Less actively maintained | | `fgbio GroupReadsByUmi` + `CallMolecularConsensusReads` | Fast | Yes | n/a | **Best UMI tool** | Graph-based; supports duplex | | `umi_tools dedup` | Slow | No | n/a | Yes (mature) | Reference for scRNA / bulk UMI | | `pbmarkdup` | Fast | Yes | n/a | n/a | PacBio HiFi amplicons only | Picard `UmiAwareMarkDuplicatesWithMateCigar` is BETA and has known bugs on transcriptome-aligned BAMs (silently keeps duplicates). Avoid for RNA-seq UMIs. ## Optical Distance Is Platform-Specific `samtools markdup` default is `-d 0`, meaning **optical-duplicate detection is disabled by default**. Set explicitly per platform: | Platform | `-d` value | Rationale | |----------|-----------|-----------| | HiSeq 2000/2500 (random) | 100 | Picard historic default | | HiSeq 3000/4000/X (patterned) | 2500 | Patterned tile size larger | | NovaSeq 6000 (patterned) | 2500 | Same as HiSeq X | | NovaSeq X (10B) | 2500 | Patterned; same starting point as NovaSeq 6000 | | NextSeq 1000/2000 (patterned) | 2500 | ExAmp duplicates span larger pixel distances | | MiSeq, NextSeq 500/550 | 100 | Smaller / unpatterned | | Element AVITI, MGI / DNBseq | Custom regex | Different read-name format -- supply via `--read-coords` | ```bash samtools markdup -d 2500 -f stats.txt input.bam marked.bam # Count optical (SQ) vs library/PCR (LB) duplicates. The dt:Z:SQ/LB tag is # emitted automatically because -d is set (it is not produced by -t, which # instead adds a 'do' tag carrying the original read's name). samtools view -f 1024 marked.bam | grep -o 'dt:Z:[A-Z][A-Z]' | sort | uniq -c ``` Setting `-d 2500` on a HiSeq run does no harm. Forgetting `-
Excerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit c8c1fc3
pip install pysam
git clone https://github.com/GPTomics/bioSkills git -C bioSkills checkout c8c1fc3a2b13
Commands as the repository documents them: shown, never run by us. Our verdict covers commit c8c1fc3a2b13 only.
Works in
The author has not said which agents this skill supports, and we have not tested it in any.
Audit history
Every audit, every source change
- ✓SAFE B 89 / 100
first audit · source
c8c1fc3a2b13
README badge
For maintainers · shows the latest audit
[](https://modelsatlas.com/skills/gptomics/duplicate-handling/)
The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.
Similar skills
obra/superpowers
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions…
obra/superpowers
Use when you have a spec or requirements for a multi-step task, before touching code
obra/superpowers
Use when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions
Add this badge to your README
[](https://modelsatlas.com/skills/gptomics/duplicate-handling/)
<a href="https://modelsatlas.com/skills/gptomics/duplicate-handling/"><img src="https://modelsatlas.com/skills/gptomics/duplicate-handling/badge.svg" alt="ModelsAtlas: SAFE B"></a>
Questions about Duplicate Handling
What does the Duplicate Handling skill do?
Is Duplicate Handling safe to install?
What can Duplicate Handling access on my machine?
How current is this page?
Sources
- github.com/GPTomics/bioSkills/tree/main/alignment-files/duplicat — the audited source at commit c8c1fc3a2b13 and every finding aboveObserved · 19 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the Duplicate Handling skill do?
- Is Duplicate Handling safe to install?
- What can Duplicate Handling access on my machine?