getAlleleCounts {AllelicImbalance} | R Documentation |
Given the positions of known SNPs, this function returns allele counts from a BamGRL object
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
#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='-')