eugene.preprocess.train_test_chrom_split¶
- eugene.preprocess.train_test_chrom_split(sdata, test_chroms, train_var='train_val')¶
Add a variable labeling sequences as part of the train or test split based on chromosome.
- Parameters:
sdata (xr.Dataset) – SeqData object.
test_chroms (list[str]) – List of chromosomes to put into test split.
train_var (str, optional) – Name of the variable holding the labels such that True = train and False = test, by default “train_val”