Repository navigation
v1.23.0 - Sex determination features
-
Fixed
standardize()computing z-scores with the mean and SD ofRacross all samples indata, even whengenosheld only a subset of reference samples. The per-marker mean and SD now come only from the samples ingenosthat remain after filtering, and every sample is transformed against them, matching how BAF uses the reference samples. This changes z-score values whenevergenosis a subset ofdata. -
get_zscore()gains areference.samplesargument. Its default,NULL, uses all samples as before. -
filter_R = TRUEinstandardize()now limits z-scores to markers that passed all BAF filters (missing data and number of clusters). Previously it applied only the missing-data filter. -
karyotype_notation()andplot_karyotype()gainsex_system("none","XY","ZW","X0","haplodiploid") andsex_chr(a named list of chromosome IDs forX/Y/PARorZ/W/PAR) arguments. When set,karyotype_notation()addsSex,SexChr(e.g."XY","XXXY","ZW","X0"),SexChrConsistent,ChrType, andExpectedCNcolumns:- In XY, Y present means male. In ZW, W present means female.
- In X0, sex comes from X copy number relative to the ploidy. In haplodiploid systems, sex comes from the sample ploidy.
- When X-specific or Y-specific markers are missing, their copy number is derived from the PAR (Y = PAR − X). When all three groups are present, X + Y = PAR is checked.
- Sex chromosomes are excluded from the sample ploidy.
- Segments on sex chromosomes are flagged against the expected sex-chromosome complement instead of the ploidy.
plot_karyotype()uses the expected complement for ghost copies, labels sex-chromosome strips, and adds the sex to the subtitle. -
hmm_estimate_CN()andhmm_estimate_CN_nQuack()now report how many windowsmin_snps_per_windowremoves. If every window of a chromosome is removed, they warn and name the chromosome and its marker count. Previously, small chromosomes such as sex-specific contigs disappeared from the results silently. Whenmin_snps_per_windowis left at its default (NULL), the value chosen automatically is now printed. -
min_snps_per_windowinhmm_estimate_CN(),hmm_estimate_CN_nQuack(), andhmm_estimate_CN_multi()can now be set per chromosome with a vector named by chromosome ID, e.g.c(Chr01 = 300, Xspecific = 20). Chromosomes left out of the vector use the automatic default. The per-chromosome value applies both to the minimum segment length in z-score changepoint detection and to the window filter.add_changepoint_windows()accepts the same named form forminseglen. Theplot_cn_track()parameter panel shows a per-chromosome value in short form: the most common value plus up to two exceptions, or the range when more chromosomes differ.