scalex.data.concat_data

scalex.data.concat_data(data_list, batch_categories=None, join='inner', batch_key='batch', index_unique=None, save=None)

Concatenate multiple datasets along the observations axis with name batch_key.

Parameters:
  • data_list – A path list of AnnData matrices to concatenate with. Each matrix is referred to as a “batch”.

  • batch_categories – Categories for the batch annotation. By default, use increasing numbers.

  • join – Use intersection (‘inner’) or union (‘outer’) of variables of different batches. Default: ‘inner’.

  • batch_key – Add the batch annotation to obs using this key. Default: ‘batch’.

  • index_unique – Make the index unique by joining the existing index names with the batch category, using index_unique=’-’, for instance. Provide None to keep existing indices.

  • save – Path to save the new merged AnnData. Default: None.

Return type:

New merged AnnData.