xchrom.pp.process_train_test_single
- xchrom.pp.process_train_test_single(ad_atac: str | Path | AnnData, input_fasta: str, output_path: str = './train_data/')[source]
Generate XChrom training and test inputs from a single dataset.
- Parameters:
ad_atac (str or Path) – scATAC anndata file path, need to be processed by scanpy’s filter_genes and filter_cells functions, get .obs[‘n_genes’]
input_fasta (str or Path) – genome fasta file path
output_path (str or Path, optional) – output path, default is ‘./train_data/’
- Returns:
dict
A dictionary containing the following keys – ‘anndata’: The original atac anndata object, ‘trainval_cell_index’: The indices of cells in the train/val set ‘test_cell_index’: The indices of cells in the test set, ‘trainval_peak_index’: The indices of peaks in the train/val set, ‘test_peak_index’: The indices of peaks in the test set,