PCAP::Bam::Stats(3)

NAME
PCAP::Bam::Stats - Generate mapping and read statistics for a BAM.

  Methods

new
     my $stats = PCAP::Bam::Stats->new(-path => $input_bam);
      # or if quality plots required
     my $stats = PCAP::Bam::Stats->new(-path => $input_bam, -qscoring => defined $plots_dir);

init
    Initialise the object.

bas
      $stats->bas($fh);

    Generate the output *.bas file to the specified file handle

read_groups
    Get the sorted list of readgroup ids.

read_group_info
    Returns the RG line for this readgroup.

read_length
      $stats->read_length($rg_id, $read_end);

    Returns the length of read X for the specified readgroup.

mean_gc_rg
    Returns the mean GC content for this readgroup.

insert_sizes
    Returns the raw insert size data array for specified readgroup.

properly_mapped_ratio
    Returns the ratio of properly mapped pairs

fqplots
    Trigger generation of fastq quality plots.

down_pop_quals
    Build data structure for quality plots from raw PBQ arrays.

fastq2image
    Write a fastq quality plot as png using GD image.

mean_insert_size_rg
    Calculate the insert size mean for this readgroup.

mean_insert_size
    Calculate the insert size mean for this file.

med_insert_size_rg
    Calculate the insert size median for this readgroup.

med_insert_size
    Calculate the insert size median for this file.

cal_insert_size_sd_rg
    Calculate the insert size standard deviation for this readgroup.

cal_insert_size_sd
    Calculate the insert size standard deviation for this file.

calc_frac_properly_paired_rg
    Calculate the fraction of properly_paired for this readgroup.

calc_frac_properly_paired
    Calculate the fraction of properly_paired for this file.

calc_frac_unmapped_rg
    Calculate the fraction of unmapped for this readgroup.

calc_frac_unmapped
    Calculate the fraction of unmapped for this file.

calc_frac_duplicate_reads_rg
    Calculate the fraction of duplicate_reads for this readgroup.

calc_frac_duplicate_reads
    Calculate the fraction of duplicate_reads for this file.

count_total_reads_rg
    Returns the count of total_reads for this readgroup.

count_total_reads
    Returns the count of total_reads for this file.

count_properly_paired_rg
    Returns the count of properly_paired for this readgroup.

count_properly_paired
    Returns the count of properly_paired for this file.

count_unmapped_rg
    Returns the count of unmapped for this readgroup.

count_unmapped
    Returns the count of unmapped for this file.

count_duplicate_reads_rg
    Returns the count of duplicate_reads for this readgroup.

count_duplicate_reads
    Returns the count of duplicate_reads for this file.

count_total_mapped_bases_rg
    Returns the count of total_mapped_bases for this readgroup.

count_total_mapped_bases
    Returns the count of total_mapped_bases for this file.

count_total_divergent_bases_rg
    Returns the count of total_divergent_bases for this readgroup.

count_total_divergent_bases
    Returns the count of total_divergent_bases for this file.

count_gc_rg
    Returns the count of gc_rg for this readgroup.