How to use the multiqc.plots.linegraph function in multiqc

To help you get started, we’ve selected a few multiqc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ewels / MultiQC / multiqc / modules / mirtrace / mirtrace.py View on Github external
if len(data) == 0:
            log.debug('No valid data for miRNA complexity')
            return None

        config = {
            'id': 'mirtrace_complexity_plot',
            'title': 'miRTrace: miRNA Complexity Plot',
            'ylab': 'Distinct miRNA Count',
            'xlab': 'Number of Sequencing Reads',
            'ymin': 0,
            'xmin': 1,
            'xDecimals': False,
            'tt_label': '<b>Number of Sequencing Reads {point.x}</b>: {point.y} Distinct miRNA Count',
        }

        return linegraph.plot(data, config)
github ewels / MultiQC / multiqc / modules / qualimap / QM_RNASeq.py View on Github external
transcript. To enable meaningful comparison between transcripts, base positions
        are rescaled to relative positions expressed as percentage distance along each
        transcript (*0%, 1%, …, 99%*). For the set of transcripts with at least
        one mapped read, QualiMap plots the cumulative mapped-read depth (y-axis) at
        each relative transcript position (x-axis). This plot shows the gene coverage
        profile across all mapped transcripts for each read dataset. It provides a
        visual way to assess positional biases, such as an accumulation of mapped reads
        at the 3′ end of transcripts, which may indicate poor RNA quality in the
        original sample (<a href="https://doi.org/10.1186/s13059-016-0881-8">Conesa et al. 2016</a>).'''
        self.add_section (
            name = 'Gene Coverage Profile',
            anchor = 'qualimap-genome-fraction-coverage',
            description = 'Mean distribution of coverage depth across the length of all mapped transcripts.',
            helptext = coverage_profile_helptext,
            plot = linegraph.plot(self.qualimap_rnaseq_cov_hist, {
                'id': 'qualimap_gene_coverage_profile',
                'title': 'Qualimap RNAseq: Coverage Profile Along Genes (total)',
                'ylab': 'Coverage',
                'xlab': 'Transcript Position (%)',
                'ymin': 0,
                'xmin': 0,
                'xmax': 100,
                'tt_label': '<b>{point.x} bp</b>: {point.y:.0f}%',
            })
        )


    #### General Stats
    self.general_stats_headers['5_3_bias'] = {
        'title': "5'-3' bias",
        'format': '{:,.2f}',
github sequana / sequana / sequana / multiqc / pacbio_amplicon.py View on Github external
data['sample'] = {x:y for x,y in zip(X, Y)}

        pconfig = {
            "title": "CCS reads ",
            "percentages": False,
            "min": 0,
            #"max":100,
            "format": '{0:.2f}'
        }

        self.add_section(
            name = 'CCS reads histogram',
            anchor = 'ccs_reads_hist',
            description = 'CCS reads histogram.',
            helptext = "",
            plot = linegraph.plot(data, pconfig))
github sequana / sequana / sequana / multiqc / pacbio_qc.py View on Github external
'xmin': 0,
            'yDecimals': False,
            'tt_label': '<b>{point.x}% GC</b>: {point.y}',
            #'colors': self.get_status_cols('per_sequence_gc_content'),
            'data_labels': [
                {'name': 'Percentages', 'ylab': 'Percentage'},
                {'name': 'Counts', 'ylab': 'PDF'}
            ]
        }

        self.add_section (
            name = 'Per Sequence GC Content',
            anchor = 'fastqc_per_sequence_gc_content',
            description = "GC content (normalised)",
            #plot = linegraph.plot([data_norm, data], pconfig))
            plot = linegraph.plot(data, pconfig))
github ewels / MultiQC / multiqc / modules / fastqc / fastqc.py View on Github external
# Split by Read 1/2, Raw/Trimmed
        data, pconfig = self.split_fastqc_data_by_group(data, pconfig)

        self.add_section (
            name = 'Per Sequence Quality Scores',
            anchor = 'fastqc_per_sequence_quality_scores',
            description = 'The number of reads with average quality scores. Shows if a subset of reads has poor quality.',
            helptext = '''
            From the [FastQC help](http://www.bioinformatics.babraham.ac.uk/projects/fastqc/Help/3%20Analysis%20Modules/3%20Per%20Sequence%20Quality%20Scores.html):

            _The per sequence quality score report allows you to see if a subset of your
            sequences have universally low quality values. It is often the case that a
            subset of sequences will have universally poor quality, however these should
            represent only a small percentage of the total sequences._
            ''',
            plot = linegraph.plot(data, pconfig)
        )
github ewels / MultiQC / multiqc / modules / bbmap / plot_qahist.py View on Github external
plot_params = {
            'id': 'bbmap-' + file_type + '_plot',
            'title': 'BBTools: ' + plot_args['plot_title'],
            'xlab': 'Quality score',
            'data_labels': [
                {'name': 'Match', 'ylab': 'Match count'},
                {'name': 'Substitution', 'ylab': 'Substitution count'},
                {'name': 'Insertion', 'ylab': 'Insertion count'},
                {'name': 'Deletion', 'ylab': 'Deletion count'},
                {'name': 'TrueQuality', 'ylab': 'Count'},
                {'name': 'TrueQualitySubtitution', 'ylab': 'Count'},
            ]
    }

    plot_params.update(plot_args['plot_params'])
    plot = linegraph.plot(
        plot_data,
        plot_params
    )

    return plot
github ewels / MultiQC / multiqc / modules / bbmap / plot_basic_hist.py View on Github external
data = {
        sample: {
            x: samples[sample]['data'][x][0] if x in samples[sample]['data'] else 0
            for x in all_x
        }
        for sample in samples
    }

    plot_params = {
            'id': 'bbmap-' + file_type + '_plot',
            'title': 'BBTools: ' + plot_args['plot_title'],
            'xmax': xmax
    }
    plot_params.update(plot_args['plot_params'])
    plot = linegraph.plot(
        data,
        plot_params
    )

    return plot
github ewels / MultiQC / multiqc / modules / picard / RnaSeqMetrics.py View on Github external
# Plot the data and add section
            pconfig = {
                'smooth_points': 500,
                'smooth_points_sumcounts': [True, False],
                'id': 'picard_rna_coverage',
                'title': 'Picard: Normalized Gene Coverage',
                'ylab': 'Coverage',
                'xlab': 'Percent through gene',
                'xDecimals': False,
                'tt_label': '<b>{point.x}%</b>: {point.y:.0f}',
                'ymin': 0,
            }
            self.add_section (
                name = 'Gene Coverage',
                anchor = 'picard-rna-coverage',
                plot = linegraph.plot(self.picard_RnaSeqMetrics_histogram, pconfig)
            )


    # Return the number of detected samples to the parent module
    return len(self.picard_RnaSeqMetrics_data)
github ewels / MultiQC / multiqc / modules / bbmap / plot_bqhist.py View on Github external
)

    plot_params = {
            'id': 'bbmap-' + file_type + '_plot',
            'title': 'BBTools: ' + plot_args['plot_title'],
            'xlab': 'Read position',
            'ylab': 'Average quality score',
            'data_labels': [
                #{'name': 'Count histogram', 'ylab': 'Read count'},
                {'name': 'Read 1',},
                {'name': 'Read 2',},
            ]
    }

    plot_params.update(plot_args['plot_params'])
    plot = linegraph.plot(
        plot_data,
        plot_params
    )

    return plot
github ewels / MultiQC / multiqc / modules / custom_content / custom_content.py View on Github external
pconfig['title'] = modname

        # Table
        if mod['config'].get('plot_type') == 'table':
            pconfig['sortRows'] = pconfig.get('sortRows', False)
            headers = mod['config'].get('headers')
            self.add_section( plot = table.plot(mod['data'], headers, pconfig) )
            self.write_data_file( mod['data'], "multiqc_{}".format(modname.lower().replace(' ', '_')) )

        # Bar plot
        elif mod['config'].get('plot_type') == 'bargraph':
            self.add_section( plot = bargraph.plot(mod['data'], mod['config'].get('categories'), pconfig) )

        # Line plot
        elif mod['config'].get('plot_type') == 'linegraph':
            self.add_section( plot = linegraph.plot(mod['data'], pconfig) )

        # Scatter plot
        elif mod['config'].get('plot_type') == 'scatter':
            self.add_section( plot = scatter.plot(mod['data'], pconfig) )

        # Heatmap
        elif mod['config'].get('plot_type') == 'heatmap':
            self.add_section( plot = heatmap.plot(mod['data'], mod['config'].get('xcats'), mod['config'].get('ycats'), pconfig) )

        # Beeswarm plot
        elif mod['config'].get('plot_type') == 'beeswarm':
            self.add_section( plot = beeswarm.plot(mod['data'], pconfig) )

        # Raw HTML
        elif mod['config'].get('plot_type') == 'html':
            self.add_section( content = mod['data'] )