Count alleles for reads phased to SNPs in a BAM file

cwrap_asm_get_allele_counts(
  bam_file,
  snps_gr,
  loci_dt,
  paired_end,
  drop_ccgg,
  min_mapq = min_mapq,
  min_cov = min_cov
)

Arguments

bam_file

Path to BAM file

snps_gr

GRanges object with heterozygous SNP loci for phasing

loci_dt

Data table with CAMDAC CpG loci from reference files

paired_end

Logical indicating if BAM is paired end

drop_ccgg

Logical indicating if CCGG should be dropped (i.e. rrbs mode)

min_mapq

Minimum mapping quality to consider a read

min_cov

Minimum coverage to consider a read

Value

A list with three slots: stats, qnames and asm_cg. stats describes counts of reads phased, qnames determines which SNPs each read was phased to and asm_cg is the data table with read counts