Skip to content

MergeCelltype

Georgia Goddard edited this page Jul 1, 2026 · 1 revision

Here we discuss the use of the MergeCelltype command, which follows the SplitTSV command and pseudobulks a cohort's entire set of data by cell type.

Usage

cell_type_list=('name_1' 'name_2')
excluded_samples=()

MergeCelltype \
    cell_type_list \
    '$sample_sheet' \
    '$sample_directory' \
    '$output_directory' \
    excluded_samples \
    'group_name'

Input Format

All arguments are required:
cell_type_list     # List of target cell types to merge (e.g., 'Gonadotrophs')
sample_sheet       # Output file from the SplitTSV function, provided in the sample_directory
sample_directory   # Directory of dataset folders containing fragment files split by cell type (e.g., ~/atac_seq_data/mouse_split)
output_directory   # Directory that will contain the resulting pseudo-bulked cell type files from the cohort 
                     Note: Make sure that the directory in the output path exists. (e.g., ~/atac_seq_data/mouse_merged)
excluded_samples   # List of datasets to be excluded from merging in the case of known KO datasets.
                     Note: This list can be empty, but must still be provided as input in the function. 
group_name         # Name of choice for the named samples if required (e.g., GATA2_KO) if merging datasets with specific conditions.
                     Note: This name can also be empty but must be provided as '' within the function.

Output Format

Datasets will be output in the output_directory folder, with the following named format:

~/atac_seq_data/mouse_merged/{cell_type}_merged_sorted.tsv.gz
# If a group_name was provided, it will look like the following:
~/atac_seq_data/mouse_merged/{cell_type}_{group_name}_merged_sorted.tsv.gz

Clone this wiki locally