bio-consensus-sequences
Generate consensus FASTA sequences by applying VCF variants to a reference using bcftools consensus. Use when creating sample-specific reference sequences or reconstructing haplotypes.
npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-consensus-sequences --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
## Version Compatibility Reference examples tested with: BioPython 1.83+, bcftools 1.19+, bedtools 2.31+, minimap2 2.26+, 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. # Consensus Sequences **"Generate a consensus sequence from my VCF"** → Apply called variants to a reference FASTA, producing a sample-specific genome with optional haplotype selection and low-coverage masking. - CLI: `bcftools consensus -f reference.fa input.vcf.gz` - Python: `cyvcf2` + `Bio.SeqIO` for simple SNP-only cases ## Basic Usage ### Generate Consensus ```bash bcftools consensus -f reference.fa input.vcf.gz > consensus.fa ``` ### Specify Sample ```bash bcftools consensus -f reference.fa -s sample1 input.vcf.gz > sample1.fa ``` ### Output to File ```bash bcftools consensus -f reference.fa -o consensus.fa input.vcf.gz ``` ## Haplotype Selection ### First Haplotyp
- Version Compatibility
- Basic Usage
- Generate Consensus
- Specify Sample
- Output to File
- Haplotype Selection
- First Haplotype Only
- Second Haplotype Only
- Haplotype Options
- IUPAC Codes for Heterozygous Sites
- Missing Data Handling
- Mark Missing as N
- Mark Low Coverage as N
- Mask Options
bcftools consensus -f reference.fa input.vcf.gz > consensus.fa
bcftools consensus -f reference.fa -s sample1 input.vcf.gz > sample1.fa
bcftools consensus -f reference.fa -o consensus.fa input.vcf.gz
bcftools consensus -f reference.fa -H 1 input.vcf.gz > haplotype1.fa
bcftools consensus -f reference.fa -H 2 input.vcf.gz > haplotype2.fa
bcftools consensus -f reference.fa -I input.vcf.gz > consensus_iupac.fa
bcftools consensus -f reference.fa -M N input.vcf.gz > consensus.fa
Create mask from depth
samtools depth input.bam | awk '$3<10 {print $1"\t"$2-1"\t"$2}' > low_coverage.bed
Apply maskWhat does the bio-consensus-sequences skill do?
Generate consensus FASTA sequences by applying VCF variants to a reference using bcftools consensus. Use when creating sample-specific reference sequences or reconstructing haplotypes.
How do I install it?
Run `npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-consensus-sequences --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From FreedomIntelligence/OpenClaw-Medical-Skills, a repository with 2,909 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
