Description Usage Arguments Details Value Author(s) See Also Examples
Given the positions of known SNPs, this function returns allele counts from a BamGRL object
1 2 3 4 5 6 7 8 9 10 11  | getAlleleCounts(BamList, ...)
## S4 method for signature 'GAlignmentsList'
getAlleleCounts(
  BamList,
  GRvariants,
  strand = "*",
  return.class = "list",
  verbose = TRUE,
  ...
)
 | 
BamList | 
 A   | 
... | 
 parameters to pass on  | 
GRvariants | 
 A   | 
strand | 
 A length 1   | 
return.class | 
 'list' or 'array'  | 
verbose | 
 Setting   | 
This function is used to retrieve the allele counts 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. In the strand argument, specifying
'*' is the same as retrieving the sum count of '+' and '-' reads
(and unknown strand reads in case these are found in the bam file). '*' is
the default behaviour and can be used when the RNA-seq experiments strand
information is not available.
getAlleleCounts returns a list of several data.frame objects,
each storing the count data for one SNP.
Jesper R. Gadin, Lasse Folkersen
 The scanForHeterozygotes which is a
function to find possible heterozygote sites in a
GenomicAlignments object 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  | #load example data
data(reads)
data(GRvariants)
#get counts at the three positions specified in GRvariants
alleleCount <- getAlleleCounts(BamList=reads,GRvariants,
strand='*')
#if the reads had contained stranded data, these two calls would
#have given the correct input objects for getAlleleCounts
alleleCountPlus <- getAlleleCounts(BamList=reads,GRvariants,
strand='+')
alleleCountMinus <- getAlleleCounts(BamList=reads,GRvariants,
strand='-')
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.