Genomic Coverages
Genomic Coverages Modules
These modules contain functions and classes for working with genomic coverages. It provides utilities for handling and extracting genomic coverages from BigWig or BAM files.
- class genomkit.coverages.gcoverages.GCoverages(bin_size: int = 1, load: str = '', windows=None)
GCoverages module
This module contains functions and classes for working with a collection of genomic coverages. It provides utilities for handling and analyzing the interactions of many genomic coverages.
- calculate_coverage_GRegions(scores, windows=None, strandness: bool = False)
Calculate the coverage from two GRegions. windows defines the loci for the coverage scores contains the scores loaded into the coverage.
- calculate_coverage_GRegions2(scores, windows=None, strandness: bool = False)
Calculate the coverage from two GRegions. windows defines the loci for the coverage scores contains the scores loaded into the coverage.
- filter_regions_coverage(regions)
Filter regions for their coverages.
- flip_negative_regions()
Flip the coverage arrays which are on the negative strands. If the coverage arrays are calculated by the whole chromosomes, it won’t work.
- get_coverage(gregion: str)
Get coverage data for a specific sequence by name. This sequence can be a chromosome or a genomic region.
- Parameters:
seq_name (str) – sequence name.
- Returns:
Coverage data for the specified sequence.
- Return type:
numpy array
- get_dataframe()
Return a pandas dataframe concatenating all coverage arrays.
- class genomkit.coverages.gcoverages_set.GCoveragesSet(name: str = '', load_dict=None, windows=None)
GCoveragesSet module
This module contains functions and classes for working with multiple collections of genomic coverages. It provides utilities for handling and analyzing the interactions of many genomic coverages.
- add(name, gcov)
Add a GCoverages into GCoveragesSet.
- Parameters:
name (str) – name of a GCoverages
gcov (GCoverages) – A GCoverages
- flip_negative_regions()
Flip the coverage arrays which are on the negative strands. If the coverage arrays are calculated by the whole chromosomes, it won’t work.