subset_loci
Create a smaller BPP seqfile by selecting loci from an existing one for trial runs or dropping specific loci. Keeps originals unchanged while copying imap and loci metadata.
Instructions
Write a new BPP seqfile holding a subset of the loci of an existing one (bpp-seqs extract).
Use to make a small data set for a trial run, or to drop or keep
particular loci. seqfile is a PREFIX.txt from convert_data. Writes
out_prefix.txt, plus .imap and .loci.tsv when the input has them next to
it. The original files are not changed.
Selection (at least one; passed to bpp-seqs unchanged):
first/last: the first or last N loci.range: 1-based positions such as "1-50" or "1-10,41-50". These three add together.loci: locus names.chrom: loci from this chromosome (needs the .loci.tsv).min_sites/max_sites: by alignment length.Different kinds of selection combine with AND.
invert: keep the loci that do NOT match.imap: use this Imap instead of the one next to the seqfile.overwrite: existing outputs are refused unless true. Ask the user.
Read in the report: n_loci_input, n_loci_kept (also server.nloci:
the nloci value for make_control_file with the new seqfile) and
output_files. Next: make_control_file with the new seqfile, or
set_keyword for seqfile and nloci on an existing control file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| imap | No | ||
| last | No | ||
| loci | No | ||
| chrom | No | ||
| first | No | ||
| range | No | ||
| invert | No | ||
| seqfile | Yes | ||
| max_sites | No | ||
| min_sites | No | ||
| overwrite | No | ||
| out_prefix | Yes |