getAlleleQuality: snp quality data

Description Usage Arguments Details Value Author(s) Examples

Description

Given the positions of known SNPs, this function returns allele quality from a BamGRL object

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
getAlleleQuality(BamList, ...)

## S4 method for signature 'GAlignmentsList'
getAlleleQuality(
  BamList,
  GRvariants,
  fastq.format = "illumina.1.8",
  return.class = "array",
  verbose = TRUE,
  ...
)

Arguments

BamList

A GAlignmentsList object or GRangesList object containing data imported from a bam file

...

parameters to pass on

GRvariants

A GRanges object that contains positions of SNPs to retrieve.

fastq.format

default 'illumina.1.8'

return.class

'list' or 'array'

verbose

Setting verbose=TRUE makes function more talkative

Details

This function is used to retrieve the allele quality strings from specified positions in a set of RNA-seq reads. The BamList argument will typically have been created using the impBamGAL function on bam-files. The GRvariants is either a GRanges with user-specified locations or else it is generated through scanning the same bam-files as in BamList for heterozygote locations (e.g. using scanForHeterozygotes). The GRvariants will currently only accept locations having width=1, corresponding to bi-allelic SNPs. The strand type information will be kept in the returned object. If the strand is marked as unknown "*", it will be forced to the "+" strand.

quaity information is extracted from the BamList object, and requires the presence of mcols(BamList)[["qual"]] to contain quality sequences.

Value

getAlleleQuality returns a list of several data.frame objects, each storing the count data for one SNP.

Author(s)

Jesper R. Gadin, Lasse Folkersen

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#load example data
data(reads)
data(GRvariants)

#get counts at the three positions specified in GRvariants
alleleQualityArray <- getAlleleQuality(BamList=reads,GRvariants)

#place in ASEset object
alleleCountsArray <- getAlleleCounts(BamList=reads,GRvariants,
                     strand='*', return.class="array")

	a <- ASEsetFromArrays(GRvariants, countsUnknown = alleleCountsArray)
	aquals(a) <- alleleQualityArray

AllelicImbalance documentation built on Nov. 8, 2020, 6:52 p.m.