How to use the multiqc.plots.beeswarm.plot 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 / rseqc / bam_stat.py View on Github external
keys['read_2'] = dict(defaults, **{'title': 'Read-2' })
        keys['reads_map_to_sense'] = dict(defaults, **{'title': '+ve strand', 'description': "Reads map to '+'" })
        keys['reads_map_to_antisense'] = dict(defaults, **{'title': '-ve strand', 'description': "Reads map to '-'" })
        keys['non-splice_reads'] = dict(defaults, **{'title': 'Non-splice reads' })
        keys['splice_reads'] = dict(defaults, **{'title': 'Splice reads' })
        if is_paired_end:
            keys['reads_mapped_in_proper_pairs'] = dict(defaults, **{
                        'title': 'Proper pairs', 'description':'Reads mapped in proper pairs' })
            keys['proper-paired_reads_map_to_different_chrom'] = dict(defaults, **{
                        'title': 'Different chrom', 'description': 'Proper-paired reads map to different chrom' })

        self.add_section (
            name = 'Bam Stat',
            anchor = 'rseqc-bam_stat',
            description = 'All numbers reported in millions.',
            plot = beeswarm.plot(self.bam_stat_data, keys, pconfig)
        )

    # Return number of samples found
    return len(self.bam_stat_data)
github ewels / MultiQC / multiqc / modules / bamtools / stats.py View on Github external
keys['mapped_reads_pct'] = dict(defaults, **{'title': 'Mapped reads' })
        keys['forward_strand_pct'] = dict(defaults, **{'title': 'Forward strand' })
        keys['reverse_strand_pct'] = dict(defaults, **{'title': 'Reverse strand' })
        keys['failed_qc_pct'] = dict(defaults, **{'title': 'Failed QC' })
        keys['duplicates_pct'] = dict(defaults, **{'title': 'Duplicates' })
        keys['paired_end_pct'] = dict(defaults, **{'title': 'Paired-end', 'description': 'Paired-end reads' })
        keys['proper_pairs_pct'] = dict(defaults, **{'title': 'Proper-pairs' })
        keys['both_mapped_pct'] = dict(defaults, **{'title': 'Both mapped', 'description': 'Both pairs mapped' })
        keys['bt_read_1'] = dict(num_defaults, **{'title': 'Read 1', 'description': 'Read 1 (millions)' });
        keys['bt_read_2'] = dict(num_defaults, **{'title': 'Read 2', 'description': 'Read 2 (millions)' });
        keys['singletons_pct'] = dict(defaults, **{'title': 'Singletons' })

        self.add_section (
            name = 'Bamtools Stats',
            anchor = 'bamtools-stats',
            plot = beeswarm.plot(self.bamtools_stats_data, keys)
        )

    # Return number of samples found
    return len(self.bamtools_stats_data)
github ewels / MultiQC / multiqc / modules / custom_content / custom_content.py View on Github external
# 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'] )

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

        # Not supplied
        elif mod['config'].get('plot_type') == None:
            log.warning("Plot type not found for content ID '{}'".format(c_id))

        # Not recognised
        else:
            log.warning("Error - custom content plot type '{}' not recognised for content ID {}".format(mod['config'].get('plot_type'), c_id))
github ewels / MultiQC / multiqc / modules / samtools / flagstat.py View on Github external
keys['with itself and mate mapped_passed'] = \
                                                  dict(reads, title = 'Self and mate mapped',
                                                              description = 'Reads with itself and mate mapped' )
            keys['singletons_passed']           = dict(reads, title = 'Singletons' )
            keys['with mate mapped to a different chr_passed'] = \
                                                  dict(reads, title = 'Mate mapped to diff chr',
                                                              description = 'Mate mapped to different chromosome' )
            keys['with mate mapped to a different chr (mapQ >= 5)_passed'] = \
                                                  dict(reads, title = 'Diff chr (mapQ >= 5)',
                                                              description = 'Mate mapped to different chromosome (mapQ >= 5)' )

            self.add_section (
                name = 'Samtools Flagstat',
                anchor = 'samtools-flagstat',
                description = 'This module parses the output from <code>samtools flagstat</code>. All numbers in millions.',
                plot = beeswarm.plot(self.samtools_flagstat, keys, {'id': 'samtools-flagstat-dp'})
            )

        # Return the number of logs that were found
        return len(self.samtools_flagstat)
github ewels / MultiQC / multiqc / modules / bismark / bismark.py View on Github external
# Config for the plot
        keys = OrderedDict()
        defaults = {
            'max': 100,
            'min': 0,
            'suffix': '%',
            'decimalPlaces': 1
        }
        keys['percent_cpg_meth'] = dict(defaults, **{ 'title': 'Methylated CpG' })
        keys['percent_chg_meth'] = dict(defaults, **{ 'title': 'Methylated CHG' })
        keys['percent_chh_meth'] = dict(defaults, **{ 'title': 'Methylated CHH' })

        self.add_section (
            name = 'Cytosine Methylation',
            anchor = 'bismark-methylation',
            plot = beeswarm.plot(self.bismark_data['methextract'], keys, {'id': 'bismark-methylation-dp'})
        )
github ewels / MultiQC / multiqc / modules / samtools / stats.py View on Github external
keys['reads_duplicated'] = dict(reads, **{'title': 'Duplicated', 'description': 'PCR or optical duplicate bit set'})
            keys['reads_QC_failed'] = dict(reads, **{'title': 'QC Failed'})
            keys['reads_MQ0'] = dict(reads, **{'title': 'Reads MQ0', 'description': 'Reads mapped and MQ=0'})
            keys['bases_mapped_(cigar)'] = dict(bases, **{'title': 'Mapped bases (CIGAR)', 'description': 'Mapped bases (CIGAR)'})
            keys['bases_trimmed'] = dict(bases, **{'title': 'Bases Trimmed'})
            keys['bases_duplicated'] = dict(bases, **{'title': 'Duplicated bases'})
            keys['pairs_on_different_chromosomes'] = dict(reads, **{'title': 'Diff chromosomes', 'description': 'Pairs on different chromosomes'})
            keys['pairs_with_other_orientation'] = dict(reads, **{'title': 'Other orientation', 'description': 'Pairs with other orientation'})
            keys['inward_oriented_pairs'] = dict(reads, **{'title': 'Inward pairs', 'description': 'Inward oriented pairs'})
            keys['outward_oriented_pairs'] = dict(reads, **{'title': 'Outward pairs', 'description': 'Outward oriented pairs'})

            self.add_section (
                name = 'Alignment metrics',
                anchor = 'samtools-stats',
                description = "This module parses the output from <code>samtools stats</code>. All numbers in millions.",
                plot = beeswarm.plot(self.samtools_stats, keys, {'id': 'samtools-stats-dp'})
            )

        # Return the number of logs that were found
        return len(self.samtools_stats)