Gallery
Base coverage
Plot the base coverage of a single row of your dataframe.
DOCSTRING: base_coverage
- seismic_graph.study.Study.base_coverage(*args, **kwargs)
Plot the base coverage of a single row of your dataframe.
- Parameters:
sample (
str, optional
) – Selects this sample. Defaults to None.reference (
str, optional
) – Selects this reference. Defaults to None.section (
str, optional
) – Selects this section. Defaults tofull
.cluster (
str, optional
) – Selects this cluster. Defaults topop_avg
.base_index (
list, int, str, optional
) – Filter per-base attributes (sub_rate, sequence, etc) by base index, using 1-indexing. Can be a unique sequence in the row’s sequence, a list of indexes or a single index. Gives a Defaults to None.base_type (
list, str, optional
) – Filter per-base attributes (sub_rate, sequence, etc) by base type. Defaults to['A','C','G','T']
.base_pairing (
bool, optional
) – Filter per-base attributes (sub_rate, sequence, etc) by expected base pairing. True will keep only base pairs, False will keep only non-base pairs. Defaults to None.**kwargs – Additional arguments to pass to filter rows by. Ex:
flank='flank_1'
will keep only rows withflank==flank_1
.
- Returns:
{
'fig'
: a plotly figure,'data'
: a pandas dataframe}- Return type:
to_html (str, optional): File name or ‘return’ to save the figure as HTML or return HTML as bytes.
to_png (str, optional): File name or ‘return’ to save the figure as PNG or return PNG as bytes.
to_svg (str, optional): File name or ‘return’ to save the figure as SVG or return SVG as bytes.
Compare mutation profiles
Plot the mutation fraction of multiple mutation profiles.
DOCSTRING: compare_mutation_profiles
- seismic_graph.study.Study.compare_mutation_profiles(*args, **kwargs)
Plot the mutation fraction of multiple mutation profiles.
- Parameters:
max_plots – maximum number of plots to show.
max_axis – maximum value of the x and y axis. If None, the maximum value of the data will be used if above 0.15, otherwise 0.15.
sample (
list, str, optional
) – Filter rows by sample (a list of samples or just a sample). Defaults to None.reference (
list, str, optional
) – Filter rows by reference (a list of references or just a reference). Defaults to None.section (
list, str, optional
) – Filter rows by section (a list of sections or just a section). Defaults to None.cluster (
list, str, optional
) – Filter rows by cluster (a list of clusters or just a cluster). Defaults to None.normalize (
bool, optional
) – Fit one sample to the other to normalize the mutation fractions. Defaults to False.base_index (
list, int, str, optional
) – Filter per-base attributes (sub_rate, sequence, etc) by base index, using 1-indexing. Can be a unique sequence in the row’s sequence, a list of indexes or a single index. Gives a Defaults to None.base_type (
list, str, optional
) – Filter per-base attributes (sub_rate, sequence, etc) by base type. Defaults to['A','C','G','T']
.base_pairing (
bool, optional
) – Filter per-base attributes (sub_rate, sequence, etc) by expected base pairing. True will keep only base pairs, False will keep only non-base pairs. Defaults to None.**kwargs – Additional arguments to pass to filter rows by. Ex:
flank='flank_1'
will keep only rows withflank==flank_1
.
- Returns:
{
'fig'
: a plotly figure,'data'
: a pandas dataframe}- Return type:
to_html (str, optional): File name or ‘return’ to save the figure as HTML or return HTML as bytes.
to_png (str, optional): File name or ‘return’ to save the figure as PNG or return PNG as bytes.
to_svg (str, optional): File name or ‘return’ to save the figure as SVG or return SVG as bytes.
Correlation by refs between samples
Plot the correlation between mutation profiles of multiple samples, for each reference.
DOCSTRING: correlation_by_refs_between_samples
- seismic_graph.study.Study.correlation_by_refs_between_samples(*args, **kwargs)
Plot the correlation between mutation profiles of multiple samples, for each reference.
- Parameters:
sample (
list, str, optional
) – Filter rows by sample (use exactly two samples). Defaults to None.reference (
list, str, optional
) – Filter rows by reference (a list of references or just a reference). Defaults to None.section (
list, str, optional
) – Filter rows by section (a list of sections or just a section). Defaults to None.cluster (
list, str, optional
) – Filter rows by cluster (a list of clusters or just a cluster). Defaults to None.normalize (
bool, optional
) – Fit one sample to the other to normalize the mutation fractions. Defaults to False.base_index (
list, int, str, optional
) – Filter per-base attributes (sub_rate, sequence, etc) by base index, using 1-indexing. Can be a unique sequence in the row’s sequence, a list of indexes or a single index. Gives a Defaults to None.base_type (
list, str, optional
) – Filter per-base attributes (sub_rate, sequence, etc) by base type. Defaults to['A','C','G','T']
.base_pairing (
bool, optional
) – Filter per-base attributes (sub_rate, sequence, etc) by expected base pairing. True will keep only base pairs, False will keep only non-base pairs. Defaults to None.**kwargs – Additional arguments to pass to filter rows by. Ex:
flank='flank_1'
will keep only rows withflank==flank_1
.
- Returns:
{
'fig'
: a plotly figure,'data'
: a pandas dataframe}- Return type:
to_html (str, optional): File name or ‘return’ to save the figure as HTML or return HTML as bytes.
to_png (str, optional): File name or ‘return’ to save the figure as PNG or return PNG as bytes.
to_svg (str, optional): File name or ‘return’ to save the figure as SVG or return SVG as bytes.
Experimental variable across samples
Plot a given experimental variable vs Mutation fraction across samples for a given reference and section.
DOCSTRING: experimental_variable_across_samples
- seismic_graph.study.Study.experimental_variable_across_samples(*args, **kwargs)
Plot a given experimental variable vs Mutation fraction across samples for a given reference and section.
- Parameters:
experimental_variable (
str
) – Name of the experimental variable to plot.models (
List[str], optional
) – Models to fit on the data using scipy.optimize.curve_fit. Under the form'lambda x, a, b: a*x+b'
wherex
is the variable. Defaults to [].sample (
list, str, optional
) – Filter rows by sample (a list of samples or just a sample). Defaults to None.reference (
list, str, optional
) – Filter rows by reference (a list of references or just a reference). Defaults to None.section (
list, str, optional
) – Filter rows by section (a list of sections or just a section). Defaults to None.cluster (
list, str, optional
) – Filter rows by cluster (a list of clusters or just a cluster). Defaults to None.normalize (
bool, optional
) – Fit one sample to the other to normalize the mutation fractions. Defaults to False.base_index (
list, int, str, optional
) – Filter per-base attributes (sub_rate, sequence, etc) by base index, using 1-indexing. Can be a unique sequence in the row’s sequence, a list of indexes or a single index. Gives a Defaults to None.base_type (
list, str, optional
) – Filter per-base attributes (sub_rate, sequence, etc) by base type. Defaults to['A','C','G','T']
.base_pairing (
bool, optional
) – Filter per-base attributes (sub_rate, sequence, etc) by expected base pairing. True will keep only base pairs, False will keep only non-base pairs. Defaults to None.**kwargs – Additional arguments to pass to filter rows by. Ex:
flank='flank_1'
will keep only rows withflank==flank_1
.
- Returns:
{
'fig'
: a plotly figure,'data'
: a pandas dataframe}- Return type:
to_html (str, optional): File name or ‘return’ to save the figure as HTML or return HTML as bytes.
to_png (str, optional): File name or ‘return’ to save the figure as PNG or return PNG as bytes.
to_svg (str, optional): File name or ‘return’ to save the figure as SVG or return SVG as bytes.
Mutation fraction
Plot the mutation rates as histograms.
DOCSTRING: mutation_fraction
- seismic_graph.study.Study.mutation_fraction(*args, **kwargs)
Plot the mutation rates as histograms.
- Parameters:
show_ci (
bool, optional
) – Show confidence intervals. Defaults to True.sample (
str, optional
) – Selects this sample. Defaults to None.reference (
str, optional
) – Selects this reference. Defaults to None.section (
str, optional
) – Selects this section. Defaults tofull
.cluster (
str, optional
) – Selects this cluster. Defaults topop_avg
.base_index (
list, int, str, optional
) – Filter per-base attributes (sub_rate, sequence, etc) by base index, using 1-indexing. Can be a unique sequence in the row’s sequence, a list of indexes or a single index. Gives a Defaults to None.base_type (
list, str, optional
) – Filter per-base attributes (sub_rate, sequence, etc) by base type. Defaults to['A','C','G','T']
.base_pairing (
bool, optional
) – Filter per-base attributes (sub_rate, sequence, etc) by expected base pairing. True will keep only base pairs, False will keep only non-base pairs. Defaults to None.**kwargs – Additional arguments to pass to filter rows by. Ex:
flank='flank_1'
will keep only rows withflank==flank_1
.
- Returns:
{
'fig'
: a plotly figure,'data'
: a pandas dataframe}- Return type:
to_html (str, optional): File name or ‘return’ to save the figure as HTML or return HTML as bytes.
to_png (str, optional): File name or ‘return’ to save the figure as PNG or return PNG as bytes.
to_svg (str, optional): File name or ‘return’ to save the figure as SVG or return SVG as bytes.
Mutation fraction delta
Plot the Mutation fraction difference between two mutation profiles.
DOCSTRING: mutation_fraction_delta
- seismic_graph.study.Study.mutation_fraction_delta(*args, **kwargs)
Plot the Mutation fraction difference between two mutation profiles.
- Returns:
{‘fig’: a plotly figure, ‘data’: a pandas dataframe}
- Return type:
to_html (str, optional): File name or ‘return’ to save the figure as HTML or return HTML as bytes.
to_png (str, optional): File name or ‘return’ to save the figure as PNG or return PNG as bytes.
to_svg (str, optional): File name or ‘return’ to save the figure as SVG or return SVG as bytes.
Mutation fraction identity
Plot the mutation rates as histograms.
DOCSTRING: mutation_fraction_identity
- seismic_graph.study.Study.mutation_fraction_identity(*args, **kwargs)
Plot the mutation rates as histograms.
- Parameters:
show_ci (
bool, optional
) – Show confidence intervals. Defaults to True.sample (
str, optional
) – Selects this sample. Defaults to None.reference (
str, optional
) – Selects this reference. Defaults to None.section (
str, optional
) – Selects this section. Defaults tofull
.cluster (
str, optional
) – Selects this cluster. Defaults topop_avg
.base_index (
list, int, str, optional
) – Filter per-base attributes (sub_rate, sequence, etc) by base index, using 1-indexing. Can be a unique sequence in the row’s sequence, a list of indexes or a single index. Gives a Defaults to None.base_type (
list, str, optional
) – Filter per-base attributes (sub_rate, sequence, etc) by base type. Defaults to['A','C','G','T']
.base_pairing (
bool, optional
) – Filter per-base attributes (sub_rate, sequence, etc) by expected base pairing. True will keep only base pairs, False will keep only non-base pairs. Defaults to None.**kwargs – Additional arguments to pass to filter rows by. Ex:
flank='flank_1'
will keep only rows withflank==flank_1
.
- Returns:
{
'fig'
: a plotly figure,'data'
: a pandas dataframe}- Return type:
to_html (str, optional): File name or ‘return’ to save the figure as HTML or return HTML as bytes.
to_png (str, optional): File name or ‘return’ to save the figure as PNG or return PNG as bytes.
to_svg (str, optional): File name or ‘return’ to save the figure as SVG or return SVG as bytes.
Mutation per read per reference
Plot the number of mutations per read per reference as an histogram.
DOCSTRING: mutation_per_read_per_reference
- seismic_graph.study.Study.mutation_per_read_per_reference(*args, **kwargs)
Plot the number of mutations per read per reference as an histogram.
- Parameters:
sample (
str, optional
) – Selects this sample. Defaults to None.reference (
str, optional
) – Selects this reference. Defaults to None.section (
str, optional
) – Selects this section. Defaults tofull
.cluster (
str, optional
) – Selects this cluster. Defaults topop_avg
.base_index (
list, int, str, optional
) – Filter per-base attributes (sub_rate, sequence, etc) by base index, using 1-indexing. Can be a unique sequence in the row’s sequence, a list of indexes or a single index. Gives a Defaults to None.base_type (
list, str, optional
) – Filter per-base attributes (sub_rate, sequence, etc) by base type. Defaults to['A','C','G','T']
.base_pairing (
bool, optional
) – Filter per-base attributes (sub_rate, sequence, etc) by expected base pairing. True will keep only base pairs, False will keep only non-base pairs. Defaults to None.**kwargs – Additional arguments to pass to filter rows by. Ex:
flank='flank_1'
will keep only rows withflank==flank_1
.
- Returns:
{
'fig'
: a plotly figure,'data'
: a pandas dataframe}- Return type:
to_html (str, optional): File name or ‘return’ to save the figure as HTML or return HTML as bytes.
to_png (str, optional): File name or ‘return’ to save the figure as PNG or return PNG as bytes.
to_svg (str, optional): File name or ‘return’ to save the figure as SVG or return SVG as bytes.
Mutations per read per sample
Plot the number of mutations per read per sample as an histogram.
DOCSTRING: mutations_per_read_per_sample
- seismic_graph.study.Study.mutations_per_read_per_sample(*args, **kwargs)
Plot the number of mutations per read per sample as an histogram.
- Parameters:
sample (
list, str, optional
) – Filter rows by sample (a list of samples or just a sample). Defaults to None.reference (
list, str, optional
) – Filter rows by reference (a list of references or just a reference). Defaults to None.section (
list, str, optional
) – Filter rows by section (a list of sections or just a section). Defaults to None.cluster (
list, str, optional
) – Filter rows by cluster (a list of clusters or just a cluster). Defaults to None.normalize (
bool, optional
) – Fit one sample to the other to normalize the mutation fractions. Defaults to False.base_index (
list, int, str, optional
) – Filter per-base attributes (sub_rate, sequence, etc) by base index, using 1-indexing. Can be a unique sequence in the row’s sequence, a list of indexes or a single index. Gives a Defaults to None.base_type (
list, str, optional
) – Filter per-base attributes (sub_rate, sequence, etc) by base type. Defaults to['A','C','G','T']
.base_pairing (
bool, optional
) – Filter per-base attributes (sub_rate, sequence, etc) by expected base pairing. True will keep only base pairs, False will keep only non-base pairs. Defaults to None.**kwargs – Additional arguments to pass to filter rows by. Ex:
flank='flank_1'
will keep only rows withflank==flank_1
.
- Returns:
{
'fig'
: a plotly figure,'data'
: a pandas dataframe}- Return type:
to_html (str, optional): File name or ‘return’ to save the figure as HTML or return HTML as bytes.
to_png (str, optional): File name or ‘return’ to save the figure as PNG or return PNG as bytes.
to_svg (str, optional): File name or ‘return’ to save the figure as SVG or return SVG as bytes.
Num aligned reads per reference frequency distribution
Plot the number of aligned reads per reference as a frequency distribution. x axis is the number of aligned reads per reference, y axis is the count of reference that have this number of aligned reads.
DOCSTRING: num_aligned_reads_per_reference_frequency_distribution
- seismic_graph.study.Study.num_aligned_reads_per_reference_frequency_distribution(*args, **kwargs)
Plot the number of aligned reads per reference as a frequency distribution. x axis is the number of aligned reads per reference, y axis is the count of reference that have this number of aligned reads.
- Parameters:
sample (
list, str, optional
) – Filter rows by sample (a list of samples or just a sample). Defaults to None.reference (
list, str, optional
) – Filter rows by reference (a list of references or just a reference). Defaults to None.section (
list, str, optional
) – Filter rows by section (a list of sections or just a section). Defaults to None.cluster (
list, str, optional
) – Filter rows by cluster (a list of clusters or just a cluster). Defaults to None.normalize (
bool, optional
) – Fit one sample to the other to normalize the mutation fractions. Defaults to False.base_index (
list, int, str, optional
) – Filter per-base attributes (sub_rate, sequence, etc) by base index, using 1-indexing. Can be a unique sequence in the row’s sequence, a list of indexes or a single index. Gives a Defaults to None.base_type (
list, str, optional
) – Filter per-base attributes (sub_rate, sequence, etc) by base type. Defaults to['A','C','G','T']
.base_pairing (
bool, optional
) – Filter per-base attributes (sub_rate, sequence, etc) by expected base pairing. True will keep only base pairs, False will keep only non-base pairs. Defaults to None.**kwargs – Additional arguments to pass to filter rows by. Ex:
flank='flank_1'
will keep only rows withflank==flank_1
.
- Returns:
{
'fig'
: a plotly figure,'data'
: a pandas dataframe}- Return type:
to_html (str, optional): File name or ‘return’ to save the figure as HTML or return HTML as bytes.
to_png (str, optional): File name or ‘return’ to save the figure as PNG or return PNG as bytes.
to_svg (str, optional): File name or ‘return’ to save the figure as SVG or return SVG as bytes.