| getAlleleQuality {AllelicImbalance} | R Documentation |
Given the positions of known SNPs, this function returns allele quality from a BamGRL object
getAlleleQuality(BamList, ...) ## S4 method for signature 'GAlignmentsList' getAlleleQuality(BamList, GRvariants, fastq.format = "illumina.1.8", return.class = "array", verbose = TRUE, ...)
BamList |
A |
... |
parameters to pass on |
GRvariants |
A |
fastq.format |
default 'illumina.1.8' |
return.class |
'list' or 'array' |
verbose |
Setting |
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.
getAlleleQuality returns a list of several data.frame objects,
each storing the count data for one SNP.
Jesper R. Gadin, Lasse Folkersen
#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