Claude-skill-registry track-generation
This skill generates normalized BigWig (.bw) tracks (and/or fold-change tracks) from BAM files for ATAC-seq and ChIP-seq visualization. It handles normalization (RPM or fold-change) and Tn5 offset correction automatically. What's more, this skill can help user visualize the signal profiles around TSS or target regions. Use this skill when you have filtered and generated the clean BAM file (e.g. `*.filtered.bam`).
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/6-track-generation" ~/.claude/skills/majiayu000-claude-skill-registry-track-generation && rm -rf "$T"
skills/data/6-track-generation/SKILL.mdOverview
This skill converts filtered BAM files into normalized signal tracks (BigWig) for genome browser visualization.
It supports both ATAC-seq and ChIP-seq datasets, automatically detecting genome assembly and chromosome size files.
Main steps include:
- Refer to the Inputs & Outputs section to check inputs and build the output architecture. All the output file should located in
in Step 0.${proj_dir} - Always use filtered BAM file (
) if available.*.filtered.bam - Normalize all tracks to 1 million mapped reads (RPM normalization).
- Generate the chrom.size file.
- For ATAC-seq, apply Tn5 offset correction (+4/−5) and generate normalized BigWig (RPM).
- For ChIP-seq, generat RPM-normalized track without applying Tn5 offset correction
- Always prompt user for whether need to visualize the signal profiles around TSS or target regions.
- Visualize the signal profiles around TSS or target regions if users require.
Decision Tree
Step 0: Initialize Project
Call:
mcp__project-init-tools__project_init
with:
: allsample
: track_generationtask
The tool will:
- Create
directory.${sample}_track_generation - Return the full path of the
directory, which will be used as${sample}_track_generation
.${proj_dir}
Step 1: Generate Chromosome size file
Call:
with:mcp__bw-tools__generate_chrom_sizes
: Path for the BAM file for generating bigWig Tracksbam_file
: ${proj_dir}/temp/${sample}.chrom.sizesoutput_path
Step 2: Calculate Scaling Factor
Call:
with:mcp__bw_tools__calculate_scaling_factor
: Path for the BAM file for generating bigWig Tracksbam_file
This step will store result as variable ${scale_factor}
Step 3: Create RPM-normalized BigWig scaled to 1M mapped reads.
- (Option 1) For ATAC-seq data: Apply the standard Tn5 shift (+4/-5bp)
Call:
-
with:mcp__bw_tools__bam_to_bigwig
: ${bam_file}bam_file
: ${proj_dir}/temp/${sample}.chrom.sizes (from Step 2)chrom_sizes
: ${proj_dir}/tracks/${sample_name}.RPM.bwoutput_bw
: ${scale_factor}scale_factor
: Trueshift_tn5
: ${proj_dir}/temptemp_dir -
(Option 2) For ChIP-seq data: Do Not Apply the standard Tn5 shift by setting
as Falseshift_tn5
Step 3: Visualize the signal profiles around TSS or target region (Optional)
Call:
with:mcp__bw_tools__visualize_signal_profile
: GTF (for gene tss) or BED file (for target regions), always query user for this file if not provided.regions_bed
: Input BigWig signal files.signal_files
: Output prefix for matrix/plots.output_prefix
: usereference_point
for genes, andTSS
for target regions.center
: Upstream distance (bp).upstream
: Downstream distance (bp).downstream