Functions:
|
Compose BEDPE, Pairs track automatically based on type of file extension.(.bedpe, .pairs) |
|
Compose DotHic or Cool track automatically based on tpye of file extension (.cool, .mcool, .hic) |
|
Compose BigWig, BedGraph, SNP, BAMCov track automatically based on type of file extension.(.bw, .bigwig, .snp, .vcf, .bedgraph, .bam, .sam) |
Classes:
|
Arcs(link) track. |
|
BAM alignment track for plotting reads. |
|
Alignment reads coverage track. |
|
Bed Track for plotting 1d intervals data from .bed file. |
|
Arcs track from .bedpe file. |
|
BED Base track. |
|
BedGraph track. |
|
BigWig track |
|
Track for show chromosome name. |
|
Cool track from .cool, .mcool file. |
|
Directionnality index track. |
|
HicMat track from .hic file. |
|
GTF gene annotation track. |
|
Horizontal line track. |
|
Track for express the comparison between two HiC Track. |
|
Hi-C Peaks(Loops) from .bedpe file. |
|
HicMatBase class for all track plotting matrix-like data. |
|
HistBase track class |
|
The chromosome ideograme track. |
|
Insulation score track. |
|
Arcs track from .pairs file. |
|
Track for show SNPs Manhattan plot. |
|
Differential chromatin interaction. |
|
The spacer track Does not have any real content, just used to split two tracks. |
|
Tad tack from bed file |
|
Track base class. |
|
Track for view virtual 4C related to a certain genome position, and a HiC Track (include Cool and DotHiC). |
|
The x axis track. |
Compose BEDPE, Pairs track automatically based on type of file extension.(.bedpe, .pairs)
Arcs(link) track.
Style of arcs plot: ‘arcs’, ‘hicpeaks’, default ‘arcs’
Mapping function of score to width, default: ‘0.5 + math.sqrt(score)’
Width of arc line.
If specified to True, will fetch the contacts on side in the region, default True
Mapping function of arc diameter(interval end - start) to height. You can specify to ‘max_diameter’ let all arcs has same height. default ‘max_height * diameter / max_diameter’.
Track orientation, use ‘inverted’ for inverted track plot. default None
Border line style, default ‘solid’
Fill center or not, default False.
Fill color, use ‘rgb’ for specify color in file, default ‘rgb’.
Alpha value of fill region. default 0.2
Plot peak in which side of the matrix. NOTE: This parameters is useful only if the Cool track in matrix format.
Alpha value of track, default 0.8.
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
Color of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Methods:
|
|
|
Plot arc connecting two positions on a linear scale representing interactions between bins. |
Other optional parameters including gr2, resolution for some tracks.
Can be two types: 1: with columns: [‘pos1’, ‘pos2’, ‘score’] ‘score’ is optional 2: with columns: [‘start1’, ‘end1’, ‘start2’, ‘end2’, ‘score’] ‘score’ is optional
Plot arc connecting two positions on a linear scale representing interactions between bins.
Other optional parameters including gr2, resolution for some tracks.
BAM alignment track for plotting reads.
Path to .bam .sam file.
Length ratio threshold of show alignments. (Default 0.01)
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
Color of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Methods:
|
|
|
Plot figure based on data returned by fetch_plot_data. |
Other optional parameters including gr2, resolution for some tracks.
Sam interval table. The DataFrame table should has columns like:
“rnext”, “pnext”, “tlen”, “seq”, “qual”, “options”]
Plot figure based on data returned by fetch_plot_data.
Other optional parameters including gr2, resolution for some tracks.
Alignment reads coverage track.
File path of bam file.
Number of bins to plot hist fig.
Track graph type, format {‘line’, ‘fill’, ‘heatmap’, ‘scatter’}
Line styles used when the plot style is line, will be passed as fmt parameter in matplotlib.pyplot.plot
Value used when the plot style is line, will be passed as linewidth parameter in matplotlib.pyplot.plot
Value used when the plot style is scatter, will be passed as s parameter in matplotlib.pyplot.scatter
Main color
Track’s color for values greater than specified threshold.
Threshold used when the plot style is line or scatter, values greater than this thresh will be plotted with color = threshold_color
Cmap used when the plot type is heatmap, will be passed as cmap paramerter in matplotlib.pyplot.matshow
Alpha value of plot, default 1.0
Track orientation, use ‘inverted’ for inverted track plot.
Show_data_range or not, default True.
Max value of track. ‘auto’ for specify max value automatically, default ‘auto’.
Min value of track. ‘auto’ for specify max value automatically, default ‘auto’.
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Methods:
|
Fetch the raw data for the given GenomeRange. |
Fetch the raw data for the given GenomeRange.
Other optional parameters including gr2, resolution for some tracks.
Bed Track for plotting 1d intervals data from .bed file. The input bed file can be bed3/bed6/bed9/bed12
Display mode. (Default: ‘stacked’)
Font size. (Default: BED.DEFAULT_FONTSIZE)
Draw bed name or not. ‘auto’ for automate decision according to density. (Default: ‘auto’)
The height of the interval. (Default: 100)
Set the max interval rows. (Default: unlimited interval rows)
Height of a row. default 0.5
The file path of .bed file.
Track color, ‘rgb’ for auto specify color according to bed record. (Default: ‘rgb’)
Border_color of gene. (Default: ‘black’)
Max score. (Default: inf)
Min score. (Default: -inf)
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Methods:
|
Plot figure based on data returned by fetch_plot_data. |
Plot figure based on data returned by fetch_plot_data.
Other optional parameters including gr2, resolution for some tracks.
Arcs track from .bedpe file.
Path of .bedpe file
Method for choosing arch anchor for bedpe data: ‘start’, ‘end’, ‘mid’, default ‘mid’
Style of arcs plot: ‘arcs’, ‘hicpeaks’, default ‘arcs’
Mapping function of score to width, default: ‘0.5 + math.sqrt(score)’
Width of arc line.
If specified to True, will fetch the contacts on side in the region, default True
Mapping function of arc diameter(interval end - start) to height. You can specify to ‘max_diameter’ let all arcs has same height. default ‘max_height * diameter / max_diameter’.
Track orientation, use ‘inverted’ for inverted track plot. default None
Border line style, default ‘solid’
Fill center or not, default False.
Fill color, use ‘rgb’ for specify color in file, default ‘rgb’.
Alpha value of fill region. default 0.2
Plot peak in which side of the matrix. NOTE: This parameters is useful only if the Cool track in matrix format.
Alpha value of track, default 0.8.
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
Color of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Methods:
|
Fetch the plot data for the given GenomeRange. |
Fetch the plot data for the given GenomeRange. The returned data would be used in plot function, the default implementation directly return fetch_data.
GenomeRange is an object with properties of [chrom, start, end].
Other optional parameters including gr2, resolution for some tracks.
BED Base track.
The file path of .bed file.
Track color, ‘rgb’ for auto specify color according to bed record. (Default: ‘rgb’)
Border_color of gene. (Default: ‘black’)
Max score. (Default: inf)
Min score. (Default: -inf)
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Methods:
|
|
|
Fetch intervals within input chromosome range. |
|
As min_score and max_score change every plot, we compute them for every plot |
Other optional parameters including gr2, resolution for some tracks.
BED interval table. The table should be in format like:
bed_fields = ['chromosome', 'start', 'end',
'name', 'score', 'strand',
'thick_start', 'thick_end',
'rgb', 'block_count',
'block_sizes', 'block_starts']
The table can be in bed6/bed9/bed12 format and the trailing columns can be omited.
Fetch intervals within input chromosome range.
As min_score and max_score change every plot, we compute them for every plot
BedGraph track.
File path of bedgraph file.
Track graph type, format {‘line’, ‘fill’, ‘heatmap’, ‘scatter’}
Line styles used when the plot style is line, will be passed as fmt parameter in matplotlib.pyplot.plot
Value used when the plot style is line, will be passed as linewidth parameter in matplotlib.pyplot.plot
Value used when the plot style is scatter, will be passed as s parameter in matplotlib.pyplot.scatter
Main color
Track’s color for values greater than specified threshold.
Threshold used when the plot style is line or scatter, values greater than this thresh will be plotted with color = threshold_color
Cmap used when the plot type is heatmap, will be passed as cmap paramerter in matplotlib.pyplot.matshow
Alpha value of plot, default 1.0
Track orientation, use ‘inverted’ for inverted track plot.
Show_data_range or not, default True.
Max value of track. ‘auto’ for specify max value automatically, default ‘auto’.
Min value of track. ‘auto’ for specify max value automatically, default ‘auto’.
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Methods:
|
Fetch the raw data for the given GenomeRange. |
|
Fetch the raw data for the given GenomeRange.
Other optional parameters including gr2, resolution for some tracks.
GenomeRange is an object with properties of [chrom, start, end].
Other optional parameters including gr2, resolution for some tracks.
data used for plotting.
BigWig track
File path of bigwig file.
Number of bins to plot the hist in current range, default 700.
Track graph type, format {‘line’, ‘fill’, ‘heatmap’, ‘scatter’}
Line styles used when the plot style is line, will be passed as fmt parameter in matplotlib.pyplot.plot
Value used when the plot style is line, will be passed as linewidth parameter in matplotlib.pyplot.plot
Value used when the plot style is scatter, will be passed as s parameter in matplotlib.pyplot.scatter
Main color
Track’s color for values greater than specified threshold.
Threshold used when the plot style is line or scatter, values greater than this thresh will be plotted with color = threshold_color
Cmap used when the plot type is heatmap, will be passed as cmap paramerter in matplotlib.pyplot.matshow
Alpha value of plot, default 1.0
Track orientation, use ‘inverted’ for inverted track plot.
Show_data_range or not, default True.
Max value of track. ‘auto’ for specify max value automatically, default ‘auto’.
Min value of track. ‘auto’ for specify max value automatically, default ‘auto’.
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Methods:
|
|
|
Other optional parameters including gr2, resolution for some tracks.
BigWig interval table.
GenomeRange is an object with properties of [chrom, start, end].
Other optional parameters including gr2, resolution for some tracks.
data used for plotting.
Track for show chromosome name.
Font name to show.
Offset ratio to the start position.
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
Color of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Methods:
|
Fetch the raw data for the given GenomeRange. |
|
Plot figure based on data returned by fetch_plot_data. |
Fetch the raw data for the given GenomeRange.
Other optional parameters including gr2, resolution for some tracks.
Plot figure based on data returned by fetch_plot_data.
Other optional parameters including gr2, resolution for some tracks.
Cool track from .cool, .mcool file.
The file path of .cool, .mcool file
If use the balanced contact matrix.
Matrix style, default ‘window’.
Color map of hic matrix, default “JuiceBoxLike”.
Color bar style. default ‘vertical’.
Depth ratio of triangular matrix, use ‘full’ for full depth. default ‘full’.
Max value of hic matrix, use ‘auto’ for specify max value automatically, default ‘auto’.
Min value of hic matrix, use ‘auto’ for specify min value automatically, default ‘auto’.
Track orientation, use ‘inverted’ for inverted track plot.
Matrix resolution, default ‘auto’.
Transform for matrix, like ‘log2’, ‘log10’, default False.
Normalization method, default False.
Method used when normalizing. default ‘no’
Do gaussian filter(with sigma, for example 1.0) on matrix if specified. default False.
Process matrix with a user-defined function(receive a matrix, return a processed matrix). default False.
When set to ‘equal’, it ensures that matrix pixels are actually squares. When set to ‘auto’, it allows matrix pixels to be stretched to completely fill the subplot. Ignored when height parameter is provided. default ‘equal’.
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
Color of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Methods:
|
Fetch the raw matrix should be plotted. |
|
Fetch the pixels table of upper triangle of the original contact matrix(not processed). |
Fetch the raw matrix should be plotted. Normally it’s a matrix with raw contacts
Other optional parameters including gr2, resolution for some tracks.
Hi-C raw contact matrix.
Fetch the pixels table of upper triangle of the original contact matrix(not processed).
balance matrix or not, default self.is_balance.
resolution of the data. for example 5000. ‘auto’ for calculate resolution automatically. default ‘auto’
whether to expand the bin ID columns into (chrom, start, end). default True
Hi-C pixels table. The pixel table contains the non-zero upper triangle entries of the contact map.
Directionnality index track.
The input hicmat file or HicMatBase object used to calculate di score.
Width of the diamond region along the matrix used to calculate di. default: 40
Method used for calculating di. default: ‘adaptive’
Key words arguments used to create Cool/DotHic tack when the input hicmat is a file path
Track graph type, format {‘line’, ‘fill’, ‘heatmap’, ‘scatter’}
Line styles used when the plot style is line, will be passed as fmt parameter in matplotlib.pyplot.plot
Value used when the plot style is line, will be passed as linewidth parameter in matplotlib.pyplot.plot
Value used when the plot style is scatter, will be passed as s parameter in matplotlib.pyplot.scatter
Main color
Track’s color for values greater than specified threshold.
Threshold used when the plot style is line or scatter, values greater than this thresh will be plotted with color = threshold_color
Cmap used when the plot type is heatmap, will be passed as cmap paramerter in matplotlib.pyplot.matshow
Alpha value of plot, default 1.0
Track orientation, use ‘inverted’ for inverted track plot.
Show_data_range or not, default True.
Max value of track. ‘auto’ for specify max value automatically, default ‘auto’.
Min value of track. ‘auto’ for specify max value automatically, default ‘auto’.
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Methods:
|
Fetch the raw data for the given GenomeRange. |
Fetch the raw data for the given GenomeRange.
Other optional parameters including gr2, resolution for some tracks.
HicMat track from .hic file.
The file path of .hic file.
Matrix balance method, default True(‘KR’ balance)
Matrix style, default ‘window’.
Color map of hic matrix, default “JuiceBoxLike”.
Color bar style. default ‘vertical’.
Depth ratio of triangular matrix, use ‘full’ for full depth. default ‘full’.
Max value of hic matrix, use ‘auto’ for specify max value automatically, default ‘auto’.
Min value of hic matrix, use ‘auto’ for specify min value automatically, default ‘auto’.
Track orientation, use ‘inverted’ for inverted track plot.
Matrix resolution, default ‘auto’.
Transform for matrix, like ‘log2’, ‘log10’, default False.
Normalization method, default False.
Method used when normalizing. default ‘no’
Do gaussian filter(with sigma, for example 1.0) on matrix if specified. default False.
Process matrix with a user-defined function(receive a matrix, return a processed matrix). default False.
When set to ‘equal’, it ensures that matrix pixels are actually squares. When set to ‘auto’, it allows matrix pixels to be stretched to completely fill the subplot. Ignored when height parameter is provided. default ‘equal’.
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
Color of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Methods:
|
Fetch the raw matrix should be plotted. |
|
Fetch the raw matrix should be plotted. Normally it’s a matrix with raw contacts
Other optional parameters including gr2, resolution for some tracks.
Hi-C raw contact matrix.
Intervals within input chromosome range.
Intervals within input chromsome range2.
matrix balance method, default self.balance.
resolution of the data. for example 5000. ‘auto’ for calculate resolution automatically. default ‘auto’
Hi-C pixels table. The pixel table contains the non-zero upper triangle entries of the contact map.
GTF gene annotation track.
Path to .gtf(or .gtf.bgz) file.
Row filter expression, only keep the rows for draw. (Default ‘type == “gene”’)
Length ratio threshold of features, (Default 0.01)
When the color is random, color for each gene will be randomly selected.
Use which attribute to show feature’s name. Default use ‘auto’(try ‘gene_name’ -> ‘gene_id’ -> ‘position_string’)
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Methods:
|
|
|
|
|
Plot figure based on data returned by fetch_plot_data. |
Other optional parameters including gr2, resolution for some tracks.
should be with the format like:
‘score’, ‘strand’, ‘frame’, ‘attributes’, ‘feature_name’]
Annotation interval table.
Plot figure based on data returned by fetch_plot_data.
Other optional parameters including gr2, resolution for some tracks.
Horizontal line track. Used for add a horizontal line between two tracks.
(Default: HLine.DEFAULT_LINE_WIDTH)
(Default: HLine.DEFAULT_LINE_STYLE)
(Default: HLine.DEFAULT_COLOR)
(Default: HLine.DEFAULT_ALPHA)
The height of Spacer track. (Default: HLine.DEFAULT_HEIGHT)
Track’s name.
The properties(features) of this track. For example ‘height’, ‘color’…
Title of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Methods:
|
Fetch the raw data for the given GenomeRange. |
|
Plot figure based on data returned by fetch_plot_data. |
Fetch the raw data for the given GenomeRange.
Other optional parameters including gr2, resolution for some tracks.
Plot figure based on data returned by fetch_plot_data.
Other optional parameters including gr2, resolution for some tracks.
Track for express the comparison between two HiC Track.
First HiC Track or hic file path(.cool, .mcool, .hic).
Second HiC Track or hic file path(.cool, .mcool, .hic).
Key word arguments send to create Cool/DoctHic instance if the input hic1/hic2 is file.
Difference method (‘diff’, ‘log2fc’), default ‘diff’
Matrix style, default ‘window’.
Color map of hic matrix, default “JuiceBoxLike”.
Color bar style. default ‘vertical’.
Depth ratio of triangular matrix, use ‘full’ for full depth. default ‘full’.
Max value of hic matrix, use ‘auto’ for specify max value automatically, default ‘auto’.
Min value of hic matrix, use ‘auto’ for specify min value automatically, default ‘auto’.
Track orientation, use ‘inverted’ for inverted track plot.
Matrix resolution, default ‘auto’.
Transform for matrix, like ‘log2’, ‘log10’, default False.
Normalization method, default False.
Method used when normalizing. default ‘no’
Do gaussian filter(with sigma, for example 1.0) on matrix if specified. default False.
Process matrix with a user-defined function(receive a matrix, return a processed matrix). default False.
When set to ‘equal’, it ensures that matrix pixels are actually squares. When set to ‘auto’, it allows matrix pixels to be stretched to completely fill the subplot. Ignored when height parameter is provided. default ‘equal’.
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
Color of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Methods:
|
Fetch the raw matrix should be plotted. |
Fetch the raw matrix should be plotted. Normally it’s a matrix with raw contacts
Other optional parameters including gr2, resolution for some tracks.
Hi-C raw contact matrix.
Compose DotHic or Cool track automatically based on tpye of file extension (.cool, .mcool, .hic)
Hi-C Peaks(Loops) from .bedpe file. Used to show the peaks on the Hi-C interaction map.
Path of .bedpe file
Method for choosing arch anchor for bedpe data: ‘start’, ‘end’, ‘mid’, default ‘mid’
Style of arcs plot: ‘arcs’, ‘hicpeaks’, default ‘arcs’
Mapping function of score to width, default: ‘0.5 + math.sqrt(score)’
Width of arc line.
If specified to True, will fetch the contacts on side in the region, default True
Mapping function of arc diameter(interval end - start) to height. You can specify to ‘max_diameter’ let all arcs has same height. default ‘max_height * diameter / max_diameter’.
Track orientation, use ‘inverted’ for inverted track plot. default None
Border line style, default ‘solid’
Fill center or not, default False.
Fill color, use ‘rgb’ for specify color in file, default ‘rgb’.
Alpha value of fill region. default 0.2
Plot peak in which side of the matrix. NOTE: This parameters is useful only if the Cool track in matrix format.
Alpha value of track, default 0.8.
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
Color of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
HicMatBase class for all track plotting matrix-like data.
Matrix style, default ‘window’.
Color map of hic matrix, default “JuiceBoxLike”.
Color bar style. default ‘vertical’.
Depth ratio of triangular matrix, use ‘full’ for full depth. default ‘full’.
Max value of hic matrix, use ‘auto’ for specify max value automatically, default ‘auto’.
Min value of hic matrix, use ‘auto’ for specify min value automatically, default ‘auto’.
Track orientation, use ‘inverted’ for inverted track plot.
Matrix resolution, default ‘auto’.
Transform for matrix, like ‘log2’, ‘log10’, default False.
Normalization method, default False.
Method used when normalizing. default ‘no’
Do gaussian filter(with sigma, for example 1.0) on matrix if specified. default False.
Process matrix with a user-defined function(receive a matrix, return a processed matrix). default False.
When set to ‘equal’, it ensures that matrix pixels are actually squares. When set to ‘auto’, it allows matrix pixels to be stretched to completely fill the subplot. Ignored when height parameter is provided. default ‘equal’.
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
Color of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Methods:
|
Fetch the raw matrix should be plotted. |
|
Fetch 2d contact matrix, the matrix may be processed in case 'transform', 'normalize', 'gaussian_sigma', 'process_func' exits in properties. |
|
Plot matrix |
Fetch the raw matrix should be plotted. Normally it’s a matrix with raw contacts
Other optional parameters including gr2, resolution for some tracks.
Hi-C raw contact matrix.
Fetch 2d contact matrix, the matrix may be processed in case ‘transform’, ‘normalize’, ‘gaussian_sigma’, ‘process_func’ exits in properties.
If the input GenomeRange has been updated. default False Default False means that the input gr will be expanded in window mode
GenomeRange is an object with properties of [chrom, start, end].
Other optional parameters including gr2, resolution for some tracks.
Processed hic matrix used for plotting.
Plot matrix
Other optional parameters including gr2, resolution for some tracks.
Compose BigWig, BedGraph, SNP, BAMCov track automatically based on type of file extension.(.bw, .bigwig, .snp, .vcf, .bedgraph, .bam, .sam)
HistBase track class
Track graph type, format {‘line’, ‘fill’, ‘heatmap’, ‘scatter’}
Line styles used when the plot style is line, will be passed as fmt parameter in matplotlib.pyplot.plot
Value used when the plot style is line, will be passed as linewidth parameter in matplotlib.pyplot.plot
Value used when the plot style is scatter, will be passed as s parameter in matplotlib.pyplot.scatter
Main color
Track’s color for values greater than specified threshold.
Threshold used when the plot style is line or scatter, values greater than this thresh will be plotted with color = threshold_color
Cmap used when the plot type is heatmap, will be passed as cmap paramerter in matplotlib.pyplot.matshow
Alpha value of plot, default 1.0
Track orientation, use ‘inverted’ for inverted track plot.
Show_data_range or not, default True.
Max value of track. ‘auto’ for specify max value automatically, default ‘auto’.
Min value of track. ‘auto’ for specify max value automatically, default ‘auto’.
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Methods:
|
Fetch the raw data for the given GenomeRange. |
|
|
|
Plot figure based on data returned by fetch_plot_data. |
Fetch the raw data for the given GenomeRange.
Other optional parameters including gr2, resolution for some tracks.
GenomeRange is an object with properties of [chrom, start, end].
Other optional parameters including gr2, resolution for some tracks.
data used for plotting.
Plot figure based on data returned by fetch_plot_data.
Other optional parameters including gr2, resolution for some tracks.
The chromosome ideograme track.
Path to chromosome ideogram txt file, ideogram file is download from the UCSC Table Browser CytoBandIdeo table (in “all table” group). see: http://genome.ucsc.edu/cgi-bin/hgTables?hgta_group=allTables&hgta_table=cytoBandIdeo
Color scheme of ideogram, default: Ideogram.DEFAULT_COLOR_SCHEME
Show band name or not. default True.
Band name font size.
Border color. default: ‘#000000’
Border width. default: 1.2
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
Color of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Methods:
|
Fetch the raw data for the given GenomeRange. |
|
Plot figure based on data returned by fetch_plot_data. |
Fetch the raw data for the given GenomeRange.
Other optional parameters including gr2, resolution for some tracks.
Plot figure based on data returned by fetch_plot_data.
Other optional parameters including gr2, resolution for some tracks.
Insulation score track.
The input hicmat file or HicMatBase object used to calculate di score.
Width of the diamond region along the matrix used to calculate di. default: 20 window_size can also be a str with format like “20-40” representing a range of window_sizes.
Weather to log-nomalize the insulation score array. default: true
Method used for calculating di. default: ‘adaptive’
Key words arguments used to create Cool/DotHic tack when the input hicmat is a file path
Track graph type, format {‘line’, ‘fill’, ‘heatmap’, ‘scatter’}
Line styles used when the plot style is line, will be passed as fmt parameter in matplotlib.pyplot.plot
Value used when the plot style is line, will be passed as linewidth parameter in matplotlib.pyplot.plot
Value used when the plot style is scatter, will be passed as s parameter in matplotlib.pyplot.scatter
Main color
Track’s color for values greater than specified threshold.
Threshold used when the plot style is line or scatter, values greater than this thresh will be plotted with color = threshold_color
Cmap used when the plot type is heatmap, will be passed as cmap paramerter in matplotlib.pyplot.matshow
Alpha value of plot, default 1.0
Track orientation, use ‘inverted’ for inverted track plot.
Show_data_range or not, default True.
Max value of track. ‘auto’ for specify max value automatically, default ‘auto’.
Min value of track. ‘auto’ for specify max value automatically, default ‘auto’.
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Methods:
|
Fetch the raw data for the given GenomeRange. |
Fetch the raw data for the given GenomeRange.
Other optional parameters including gr2, resolution for some tracks.
Arcs track from .pairs file.
Path of .pairs file
Style of arcs plot: ‘arcs’, ‘hicpeaks’, default ‘arcs’
Mapping function of score to width, default: ‘0.5 + math.sqrt(score)’
Width of arc line.
If specified to True, will fetch the contacts on side in the region, default True
Mapping function of arc diameter(interval end - start) to height. You can specify to ‘max_diameter’ let all arcs has same height. default ‘max_height * diameter / max_diameter’.
Track orientation, use ‘inverted’ for inverted track plot. default None
Border line style, default ‘solid’
Fill center or not, default False.
Fill color, use ‘rgb’ for specify color in file, default ‘rgb’.
Alpha value of fill region. default 0.2
Plot peak in which side of the matrix. NOTE: This parameters is useful only if the Cool track in matrix format.
Alpha value of track, default 0.8.
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
Color of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Track for show SNPs Manhattan plot.
Input file is a tab-split file contains SNP’s chrom, position, pvalue information. You should specify it’s column indexes by col_chrom, col_pos, col_pval arguments.
Path to input .snp/.vcf file.
Column index of seqname(chromosome).
Column index of snp position.
Column index of snp p-value.
Transform the p value. Default ‘-log10’.
Track graph type, format {‘line’, ‘fill’, ‘heatmap’, ‘scatter’}
Line styles used when the plot style is line, will be passed as fmt parameter in matplotlib.pyplot.plot
Value used when the plot style is line, will be passed as linewidth parameter in matplotlib.pyplot.plot
Value used when the plot style is scatter, will be passed as s parameter in matplotlib.pyplot.scatter
Main color
Track’s color for values greater than specified threshold.
Threshold used when the plot style is line or scatter, values greater than this thresh will be plotted with color = threshold_color
Cmap used when the plot type is heatmap, will be passed as cmap paramerter in matplotlib.pyplot.matshow
Alpha value of plot, default 1.0
Track orientation, use ‘inverted’ for inverted track plot.
Show_data_range or not, default True.
Max value of track. ‘auto’ for specify max value automatically, default ‘auto’.
Min value of track. ‘auto’ for specify max value automatically, default ‘auto’.
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Methods:
|
Fetch the raw data for the given GenomeRange. |
|
Fetch the raw data for the given GenomeRange.
Other optional parameters including gr2, resolution for some tracks.
GenomeRange is an object with properties of [chrom, start, end].
Other optional parameters including gr2, resolution for some tracks.
data used for plotting.
Differential chromatin interaction.
First HiC Track or hic file path(.cool, .mcool, .hic).
Second HiC Track or hic file path(.cool, .mcool, .hic).
Argument to create Hi-C instance, only in use when first or second argument is a path.
Initial sigma, parameter of SELFISH method. Default: 1.6
Iteration count parameter of SELFISH method. Default: 10
Matrix style, default ‘window’.
Color map of hic matrix, default “JuiceBoxLike”.
Color bar style. default ‘vertical’.
Depth ratio of triangular matrix, use ‘full’ for full depth. default ‘full’.
Max value of hic matrix, use ‘auto’ for specify max value automatically, default ‘auto’.
Min value of hic matrix, use ‘auto’ for specify min value automatically, default ‘auto’.
Track orientation, use ‘inverted’ for inverted track plot.
Matrix resolution, default ‘auto’.
Transform for matrix, like ‘log2’, ‘log10’, default False.
Normalization method, default False.
Method used when normalizing. default ‘no’
Do gaussian filter(with sigma, for example 1.0) on matrix if specified. default False.
Process matrix with a user-defined function(receive a matrix, return a processed matrix). default False.
When set to ‘equal’, it ensures that matrix pixels are actually squares. When set to ‘auto’, it allows matrix pixels to be stretched to completely fill the subplot. Ignored when height parameter is provided. default ‘equal’.
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
Color of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
References
Abbas Roayaei Ardakany, Ferhat Ay, Stefano Lonardi, Selfish: discovery of differential chromatin interactions via a self-similarity measure, Bioinformatics, Volume 35, Issue 14, July 2019, Pages i145–i153, https://doi.org/10.1093/bioinformatics/btz362
Methods:
|
Fetch the raw matrix should be plotted. |
Fetch the raw matrix should be plotted. Normally it’s a matrix with raw contacts
Other optional parameters including gr2, resolution for some tracks.
Hi-C raw contact matrix.
The spacer track Does not have any real content, just used to split two tracks.
The height of Spacer track. (Default: Spacer.DEFAULT_HEIGHT)
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Color of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Methods:
|
Fetch the raw data for the given GenomeRange. |
|
Plot figure based on data returned by fetch_plot_data. |
Fetch the raw data for the given GenomeRange.
Other optional parameters including gr2, resolution for some tracks.
Plot figure based on data returned by fetch_plot_data.
Other optional parameters including gr2, resolution for some tracks.
Tad tack from bed file
Border style of tad. (Default: ‘solid’)
Border width of tad. (Default: ‘2.0’)
Show bed score or not. default False.
Score text font size. default ‘auto’
Score text color. default ‘#000000’
(text tag height) / (TAD height). used for adjust the position of Score text. default 0.5
Only show border, default False
Depth ratio of triangular, use ‘full’ for full depth, use ‘auto’ for calculate depth by current genome_range. default ‘auto’.
Invert y-axis or not, default ‘normal’
The file path of .bed file.
Track color, ‘rgb’ for auto specify color according to bed record. (Default: ‘rgb’)
Border_color of gene. (Default: ‘black’)
Max score. (Default: inf)
Min score. (Default: -inf)
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Methods:
|
Plot figure based on data returned by fetch_plot_data. |
Plot figure based on data returned by fetch_plot_data.
Other optional parameters including gr2, resolution for some tracks.
Track base class.
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
Color of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Methods:
|
Append coverage to this track. |
|
Check if the chromosome name is valid. |
|
Fetch the raw data for the given GenomeRange. |
|
Fetch the plot data for the given GenomeRange. |
|
Pile a stack of coverages with self's coverages |
|
Plot figure based on data returned by fetch_plot_data. |
|
Plot all coverages on given axes. |
Append coverage to this track.
Coverage object to be piled.
Add coverages to top or bottom. (Default: ‘top’)
Check if the chromosome name is valid. If not, change the chromosome name to the valid name.
Fetch the raw data for the given GenomeRange.
Other optional parameters including gr2, resolution for some tracks.
Fetch the plot data for the given GenomeRange. The returned data would be used in plot function, the default implementation directly return fetch_data.
GenomeRange is an object with properties of [chrom, start, end].
Other optional parameters including gr2, resolution for some tracks.
Pile a stack of coverages with self’s coverages
Coverage objects to be piled.
Add coverages to top or bottom. (Default: ‘top’)
Plot figure based on data returned by fetch_plot_data.
Other optional parameters including gr2, resolution for some tracks.
Plot all coverages on given axes.
First genome range.
Second genome range.
Track for view virtual 4C related to a certain genome position, and a HiC Track (include Cool and DotHiC).
Related hic track or Hi-C file path.
related genome position, like: ‘chr1:2000000-2000000’
How many bin used for calculate the mean value. default 3
Argument for create hic track, needed only if first argument is a path.
The input hicmat file or HicMatBase object used to calculate di score.
Track graph type, format {‘line’, ‘fill’, ‘heatmap’, ‘scatter’}
Line styles used when the plot style is line, will be passed as fmt parameter in matplotlib.pyplot.plot
Value used when the plot style is line, will be passed as linewidth parameter in matplotlib.pyplot.plot
Value used when the plot style is scatter, will be passed as s parameter in matplotlib.pyplot.scatter
Main color
Track’s color for values greater than specified threshold.
Threshold used when the plot style is line or scatter, values greater than this thresh will be plotted with color = threshold_color
Cmap used when the plot type is heatmap, will be passed as cmap paramerter in matplotlib.pyplot.matshow
Alpha value of plot, default 1.0
Track orientation, use ‘inverted’ for inverted track plot.
Show_data_range or not, default True.
Max value of track. ‘auto’ for specify max value automatically, default ‘auto’.
Min value of track. ‘auto’ for specify max value automatically, default ‘auto’.
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Methods:
|
Fetch the raw data for the given GenomeRange. |
Fetch the raw data for the given GenomeRange.
Other optional parameters including gr2, resolution for some tracks.
The x axis track.
Height of Spacer track. (Default: XAxis.DEFAULT_HEIGHT)
Font size of XAxis. (Default: XAxis.DEFAULT_FONTSIZE)
The position of tick labels relative to the axis. (Default: ‘bottom’)
Track’s name.
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Color of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Methods:
|
Fetch the raw data for the given GenomeRange. |
|
Plot figure based on data returned by fetch_plot_data. |
Fetch the raw data for the given GenomeRange.
Other optional parameters including gr2, resolution for some tracks.
Plot figure based on data returned by fetch_plot_data.
Other optional parameters including gr2, resolution for some tracks.
Classes:
|
Compose BEDPE, Pairs track automatically based on type of file extension.(.bedpe, .pairs) |
|
Arcs track from .bedpe file. |
|
BedGraph track. |
|
BigWig track |
|
Horizontal line coverage, for show threshold. |
|
Hi-C Peaks(Loops) from .bedpe file. |
|
High light region. |
|
High light regions coverage, read the regions from the file. |
|
Compose BigWig, BedGraph, SNP, BAMCov track automatically based on type of file extension.(.bw, .bigwig, .snp, .vcf, .bedgraph, .bam, .sam) |
|
Arcs track from .pairs file. |
|
Tad tack from bed file |
|
Vertical lines. |
|
Vertical lines from the file. |
Compose BEDPE, Pairs track automatically based on type of file extension.(.bedpe, .pairs)
Arcs track from .bedpe file.
Path of .bedpe file
Method for choosing arch anchor for bedpe data: ‘start’, ‘end’, ‘mid’, default ‘mid’
Style of arcs plot: ‘arcs’, ‘hicpeaks’, default ‘arcs’
Mapping function of score to width, default: ‘0.5 + math.sqrt(score)’
Width of arc line.
If specified to True, will fetch the contacts on side in the region, default True
Mapping function of arc diameter(interval end - start) to height. You can specify to ‘max_diameter’ let all arcs has same height. default ‘max_height * diameter / max_diameter’.
Track orientation, use ‘inverted’ for inverted track plot. default None
Border line style, default ‘solid’
Fill center or not, default False.
Fill color, use ‘rgb’ for specify color in file, default ‘rgb’.
Alpha value of fill region. default 0.2
Plot peak in which side of the matrix. NOTE: This parameters is useful only if the Cool track in matrix format.
Alpha value of track, default 0.8.
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
Color of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
BedGraph track.
File path of bedgraph file.
Track graph type, format {‘line’, ‘fill’, ‘heatmap’, ‘scatter’}
Line styles used when the plot style is line, will be passed as fmt parameter in matplotlib.pyplot.plot
Value used when the plot style is line, will be passed as linewidth parameter in matplotlib.pyplot.plot
Value used when the plot style is scatter, will be passed as s parameter in matplotlib.pyplot.scatter
Main color
Track’s color for values greater than specified threshold.
Threshold used when the plot style is line or scatter, values greater than this thresh will be plotted with color = threshold_color
Cmap used when the plot type is heatmap, will be passed as cmap paramerter in matplotlib.pyplot.matshow
Alpha value of plot, default 1.0
Track orientation, use ‘inverted’ for inverted track plot.
Show_data_range or not, default True.
Max value of track. ‘auto’ for specify max value automatically, default ‘auto’.
Min value of track. ‘auto’ for specify max value automatically, default ‘auto’.
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
BigWig track
File path of bigwig file.
Number of bins to plot the hist in current range, default 700.
Track graph type, format {‘line’, ‘fill’, ‘heatmap’, ‘scatter’}
Line styles used when the plot style is line, will be passed as fmt parameter in matplotlib.pyplot.plot
Value used when the plot style is line, will be passed as linewidth parameter in matplotlib.pyplot.plot
Value used when the plot style is scatter, will be passed as s parameter in matplotlib.pyplot.scatter
Main color
Track’s color for values greater than specified threshold.
Threshold used when the plot style is line or scatter, values greater than this thresh will be plotted with color = threshold_color
Cmap used when the plot type is heatmap, will be passed as cmap paramerter in matplotlib.pyplot.matshow
Alpha value of plot, default 1.0
Track orientation, use ‘inverted’ for inverted track plot.
Show_data_range or not, default True.
Max value of track. ‘auto’ for specify max value automatically, default ‘auto’.
Min value of track. ‘auto’ for specify max value automatically, default ‘auto’.
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Horizontal line coverage, for show threshold.
Y position. A list of y value or a single value.
If in percent mode, y position will equal to ymin + (ymax - ymin) * val.
Line color, default ‘#1e1e1e’.
Line alpha value, default 0.8.
Line style, default ‘dashed’.
Line width, default 0.5.
The name of thr Coverage.
Hi-C Peaks(Loops) from .bedpe file. Used to show the peaks on the Hi-C interaction map.
Path of .bedpe file
Method for choosing arch anchor for bedpe data: ‘start’, ‘end’, ‘mid’, default ‘mid’
Style of arcs plot: ‘arcs’, ‘hicpeaks’, default ‘arcs’
Mapping function of score to width, default: ‘0.5 + math.sqrt(score)’
Width of arc line.
If specified to True, will fetch the contacts on side in the region, default True
Mapping function of arc diameter(interval end - start) to height. You can specify to ‘max_diameter’ let all arcs has same height. default ‘max_height * diameter / max_diameter’.
Track orientation, use ‘inverted’ for inverted track plot. default None
Border line style, default ‘solid’
Fill center or not, default False.
Fill color, use ‘rgb’ for specify color in file, default ‘rgb’.
Alpha value of fill region. default 0.2
Plot peak in which side of the matrix. NOTE: This parameters is useful only if the Cool track in matrix format.
Alpha value of track, default 0.8.
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
Color of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
High light region.
A list of regions for highlights, region can be expressed as a tuple or string. region tuple like: [(‘chr1’, 100000, 120000), (‘chr2’, 130000, 150000)] region string format: chr:start-end like: [‘chr1:100000-120000’, ‘chr2:130000-150000’].
High light region color, default HighLights.DEFAULT_COLOR.
High light region alpha value, default 0.5
Plot border line or not, default True.
Border line style, default ‘dashed’
Border line width, default 1.0
Border line color, default ‘#000000’
Border line alpha value, default 0.8
The name of thr Coverage.
High light regions coverage, read the regions from the file.
Path to the file. Contains columns: chrom, start, end, color
High light region color, use ‘rgb’ for specify color from the file, default ‘rgb’.
High light region alpha value, default 0.1.
Plot border line or not, default True.
Border line style, default ‘dashed’.
Border line width, default 1.0.
Border line color, default ‘#000000’
Border line alpha value, default 0.8
The name of thr Coverage.
Compose BigWig, BedGraph, SNP, BAMCov track automatically based on type of file extension.(.bw, .bigwig, .snp, .vcf, .bedgraph, .bam, .sam)
Arcs track from .pairs file.
Path of .pairs file
Style of arcs plot: ‘arcs’, ‘hicpeaks’, default ‘arcs’
Mapping function of score to width, default: ‘0.5 + math.sqrt(score)’
Width of arc line.
If specified to True, will fetch the contacts on side in the region, default True
Mapping function of arc diameter(interval end - start) to height. You can specify to ‘max_diameter’ let all arcs has same height. default ‘max_height * diameter / max_diameter’.
Track orientation, use ‘inverted’ for inverted track plot. default None
Border line style, default ‘solid’
Fill center or not, default False.
Fill color, use ‘rgb’ for specify color in file, default ‘rgb’.
Alpha value of fill region. default 0.2
Plot peak in which side of the matrix. NOTE: This parameters is useful only if the Cool track in matrix format.
Alpha value of track, default 0.8.
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
Color of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Tad tack from bed file
Border style of tad. (Default: ‘solid’)
Border width of tad. (Default: ‘2.0’)
Show bed score or not. default False.
Score text font size. default ‘auto’
Score text color. default ‘#000000’
(text tag height) / (TAD height). used for adjust the position of Score text. default 0.5
Only show border, default False
Depth ratio of triangular, use ‘full’ for full depth, use ‘auto’ for calculate depth by current genome_range. default ‘auto’.
Invert y-axis or not, default ‘normal’
The file path of .bed file.
Track color, ‘rgb’ for auto specify color according to bed record. (Default: ‘rgb’)
Border_color of gene. (Default: ‘black’)
Max score. (Default: inf)
Min score. (Default: -inf)
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track. (Default: “{self.__class__.__name__}.{self.__class__._counts}”)
Title of ax
Height of ax
The properties(features) of this track. For example ‘height’, ‘color’…
The name of Track.
Coverages on this Track.
Vertical lines.
A list of vline positions. position can be expressed as a tuple like: [(‘chr1’, 10000), (‘chr2’, 50000)] or a genome range string like: [‘chr1:10000-10000’, ‘chr2:50000-50000’]
Line color, default ‘#1e1e1e’.
Line alpha value, default 0.8.
Line style, default ‘dashed’.
Line width, default 0.5.
The name of thr Coverage.
Vertical lines from the file.
Path to file.
Line color, default ‘#1e1e1e’.
Line alpha value, default 0.8.
Line style, default ‘dashed’.
Line width, default 0.5.
The name of thr Coverage.
Classes:
|
Track color. |
|
Track color map. |
|
Control Cool track's style. |
|
Control Cool track's depth ratio. |
|
Feature base class. |
|
FrameFeature base class. |
|
Frame title. |
|
Style of BigWig or BedGraph. |
|
Invert the orientation of track. |
|
Max value of track. |
|
Min value of track. |
|
Show color bar or not. |
|
Show data range or not. |
|
Track title. |
|
Track height. |
Track color.
Track color map.
Control Cool track’s style.
Control Cool track’s depth ratio.
Feature base class.
FrameFeature base class.
Frame title.
Style of BigWig or BedGraph.
Invert the orientation of track.
Max value of track.
Min value of track.
Show color bar or not.
Show data range or not.
Track title.
Track height.
Classes:
|
Frame for arrange and group plots. |
Frame for arrange and group plots.
The init genome range.
Width of frame, the unit is in ‘cm’, 1cm = 2.54inch, default Frame.DEFAULT_WIDTH.
Width ratios of track and track title, like (0.9, 0.1). default Frame.DEFAULT_WIDTH_RATIOS.
Margins of frame, default Frame.DEFAULT_MARGINS.
The title of this frame, default ‘’.
Frame properties dict.
Container of all tracks.
Current frame range.
Examples
>>> frame_1 = Frame()
>>> frame_2 = Frame(gr="chr1:1000-2000")
>>> str(frame_2.current_range)
'chr1:1000-2000'
>>> frame_3 = Frame(gr=GenomeRange("chr1", 1000, 2000))
>>> str(frame_3.current_range)
'chr1:1000-2000'
Methods:
|
Add Track object to self. |
|
Get heights of all tracks. |
|
Plot all tracks. |
|
Display self's elements on screen. |
Add Track object to self.
The track need to be added to self.tracks
Add track to tail or head. default ‘tail’
Examples
>>> from coolbox.core.track import XAxis, BigWig
>>> frame = Frame()
>>> frame.add_track(XAxis())
>>> frame.add_track(BigWig("tests/test_data/bigwig_chrx_2e6_5e6.bw"))
>>> len(frame.tracks)
2
Get heights of all tracks.
heights of all tracks.
Plot all tracks.
>>> from coolbox.api import *
>>> frame = XAxis() + XAxis()
>>> frame.plot("chr1", 100000, 200000)
>>> frame.plot("chr1:100000-200000")
Display self’s elements on screen.
Classes:
|
Compose two track and a center matrix. |
Compose two track and a center matrix.
https://github.com/GangCaoLab/CoolBox/issues/12
Center track for show ‘contact map-like’ plot, should support for plotting images with 2d GenomeRanges.
Frame plot in the top of the center track.
The width of center track, unit in cm. default 20.
sub-frames(top right bottom left) use which genome range(first or second), default ‘1212’, which means: top -> 1, right -> 2, bottom -> 1, left -> 2
Space between frame and center, unit in cm. default 0.5
Methods:
|
|
|
First genome range
Second genome range
First genome range
Second genome range
Classes:
|
Browser base class. |
|
Widgets container. |
Browser base class.
Methods:
Clear the fig cache. |
|
|
Generate an initial range within a chromosome. |
|
Preloading images to self.fig_cache. |
|
Refresh the image display. |
|
Save current frame's image to file. |
|
Show widgets and frame. |
Clear the fig cache.
Generate an initial range within a chromosome.
chrom (str, optional): initial choromosome.
(GenomeRange)
Preloading images to self.fig_cache.
Can load image in one of 4 directions:
left, right, zoom-in, zoom-out
or load all directions.
Refresh the image display.
Save current frame’s image to file. The suffix of the path will changing the saving format. For example: bsr.save(“fig.png”) will save file to ‘png’ format.
Show widgets and frame.
Widgets container.
Widgets type ‘simple’ or ‘full’, default ‘simple’
Reference genome, built-in references:(‘hg19’, ‘hg38’, ‘mm9’, ‘mm10’) if you want use other genome, you can specify the “chromosome length file”, that is a tab splited file, first column is the chromosomes, and second column is the length of correspond chromosome. default ‘hg19’
Functions:
|
Search track by it's name. |
|
Convert bool value to 'yes' or 'no', for compatible with pyGenomeTracks Convert string to float if possible |
|
Generate the error message of error operand type. |
Search track by it’s name. For mark corresponding track in a element definition, allow pass track name to find related object in CLI mode.
Convert bool value to ‘yes’ or ‘no’, for compatible with pyGenomeTracks Convert string to float if possible
Generate the error message of error operand type.