alphagenome.data.track_data.concat#
- alphagenome.data.track_data.concat(track_datas, extra_metadata_name_and_keys=None)[source]#
Concatenates multiple
TrackData
objects along the track dimension.This function combines multiple
TrackData
objects into a single object by concatenating their values and metadata. The resultingTrackData
object will have the same resolution and interval as the input objects.- Parameters:
track_datas (
Sequence
[TrackData
]) – A sequence ofTrackData
objects to concatenate. All objects must have the same resolution, interval, and width.extra_metadata_name_and_keys (
Optional
[tuple
[str
,Sequence
[str
|int
|float
]]] (default:None
)) – An optional tuple specifying a new metadata column to add. The first element is the column name, and the second is a sequence of values to populate the column.
- Return type:
- Returns:
A new
TrackData
object containing the concatenated data.- Raises:
ValueError – If the input
TrackData
objects have different resolutions, intervals, or widths, or if the length ofextra_metadata_name_and_keys[1]
does not match the length oftrack_datas
.