verkkofillet.pl.n50Plot#
- verkkofillet.pl.n50Plot(obj, width=8, height=5, save=True, figName=None, nprint=None, colName='ref_chr', dpi=300, force=False)[source]#
Generates a line plot showing the distribution of contig lengths. The N50 value is indicated by a red dashed line.
- Parameters:
obj – An object that contains a
.statsattribute, which should be a pandas DataFrame.width – Width of the plot. Default is 8.
height – Height of the plot. Default is 5.
save – If True, the plot is saved as a PDF file. Default is True.
figName – Name of the saved plot. Default is None. If None, the plot is saved as “figs/N50.pdf”. You can set the path and format to save the plot. For example, “figs/N50.pdf”.
nprint – Number of contigs to display. Default is None. If None, all contigs are displayed.
colName – Column name to group by in obj.stats. Default is “ref_chr”.
dpi – Resolution of the saved plot. Default is 300.