make_loci_bed
Create a BED file of candidate loci by tiling a genome into windows, needed when BAM/CRAM or gVCF data lacks a BED file for inspect_data and convert_data.
Instructions
Make a BED file of candidate loci by tiling a genome into windows (bpp-seqs windows).
Use when the user has BAM/CRAM or gVCF data but no BED file saying which
regions are the loci (inspect_data then lists a BED under missing).
input is anything holding chromosome names and lengths: the reference
FASTA, a BAM/CRAM or a VCF/gVCF. out is the BED file to write; pass it
to inspect_data and convert_data with the other files.
Ask the user for the locus size and spacing; do not choose them yourself. All options are passed to bpp-seqs unchanged:
window_size: locus length in bp.step: distance between window starts (default: window_size, so windows do not overlap).min_spacing: least distance in bp between kept loci on a chromosome.n_loci: sample this many windows at random (seedfixes the sample); omit to keep them all.include_chrom/exclude_chrom: chromosome names.autosomes_only: skip sex chromosomes, mitochondria and unplaced contigs (by name).skip_edges: drop this many bp at both ends of each chromosome.exclude_regions: a BED file of intervals to avoid.overwrite: an existing file is refused unless true. Ask the user.
Read in the report: n_windows_emitted (loci written) and the counts
before it, which show what each filter removed. Next: inspect_data.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| out | Yes | ||
| seed | No | ||
| step | No | ||
| input | Yes | ||
| n_loci | No | ||
| overwrite | No | ||
| skip_edges | No | ||
| min_spacing | No | ||
| window_size | Yes | ||
| exclude_chrom | No | ||
| include_chrom | No | ||
| autosomes_only | No | ||
| exclude_regions | No |