concat#
- alphagenome.data.gene_expression_data.concat(gene_expression_datas, extra_metadata_name_and_keys=None)[source]#
Concatenates multiple
GeneExpressionDataobjects along the track dimension.This function combines multiple
GeneExpressionDataobjects into a single object by concatenating their values (along the track dimension) and track_metadata. The resultingGeneExpressionDataobject will have the same interval and gene_metadata as the input objects.- Parameters:
gene_expression_datas (
Sequence[GeneExpressionData]) – A sequence ofGeneExpressionDataobjects to concatenate. All objects must have the same interval and gene_metadata.extra_metadata_name_and_keys (
tuple[str,Sequence[str|int|float]] |None(default:None)) – An optional tuple specifying a new metadata column to add to track_metadata. The first element is the column name, and the second is a sequence of values to populate the column.
- Return type:
- Returns:
A new
GeneExpressionDataobject containing the concatenated data.- Raises:
ValueError – If
gene_expression_datasis empty, or if inputGeneExpressionDataobjects have different intervals or gene_metadatas, or if the length ofextra_metadata_name_and_keys[1]does not match the length ofgene_expression_datas.