gdata.GenomeDataLoader.intersection#

GenomeDataLoader.intersection(regions)#

Creating a new genomic data loader in which the regions intersect with the specified ones.

This method allows you to subset the genomic data by intersecting it with specified regions. The dataset will be updated to only include the regions that intersect with the provided ones.

Parameters:

regions (list[str]) – A list of genomic ranges in string format (e.g., ‘chr1:1000-2000’).

See also

difference

For creating a loader with differing regions.

Returns:

A new instance of GenomeDataLoader that contains only the data for the specified regions.

Return type:

GenomeDataLoader