Regions module¶
Module providing functions for working with files
revolving around GenomicRegion objects.
-
genomic_regions.files.write_bed(file_name, regions, mode='w', **kwargs)¶ Write
GenomicRegionobjects to BED file.- Parameters
file_name – Path to output BED file
regions –
listofGenomicRegionobjectsmode – File mode. Default: ‘w’
kwargs – Keyword arguments passed to GenomicRegion.as_bed_line
- Returns
Path to output BED file
-
genomic_regions.files.write_bigwig(file_name, regions, mode='w', score_field='score', chromosome_sizes=None)¶ Write
GenomicRegionobjects to BigWig file.- Parameters
file_name – Path to output BigWig file
regions –
listofGenomicRegionobjectsmode – File mode. Default: ‘w’
score_field – Attribute from each object to use as interval score.
chromosome_sizes – Dictionary of the form {chromosome: size}
- Returns
Path to output BigWig file
-
genomic_regions.files.write_gff(file_name, regions, mode='w', **kwargs)¶ Write
GenomicRegionobjects to GFF file.- Parameters
file_name – Path to output GFF file
regions –
listofGenomicRegionobjectsmode – File mode. Default: ‘w’
kwargs – Keyword arguments passed to GenomicRegion.as_gff_line
- Returns
Path to output GFF file