extractByGeneName {spliceSites} | R Documentation

## extractByGeneName: Extract subset for sites which lie in range(s) defined by given gene list.

### Description

The function takes a 'cRanges' object (or derived) and searches inside of given 'refGenome' object for gene names. From identified gene-name matches genomic target regions can be defined for wich in turn the contained sites are extracted.

### Usage

    extractByGeneName(object,geneNames,src,...)

### Arguments

`object` | gapSites or cRanges (or derived). Object inside which the data is searched for.
`geneNames` | Character. Vector of gene names for which data is to be extracted.
`src` | refGenome. Contains gene annotation (for conversion of gene-name to genomic coordinates).
`...` | (currently unused)

### Details

The function internally calls 'extractByGeneName' on 'refGenome'. This function also prints out non matching gene names. On the result, the function calls 'getGenePositions' from which the genomic regions can be extracted. For each gene, data is extracted via 'extractRange' and the resulting objects are then concatenated.

### Value

Same type as object

### Author(s)

Wolfgang Kaisers

### Examples

    # A) Read gapSites from BAM
    bam<-system.file("extdata","rna_fem.bam",package="spliceSites")
    reader<-bamReader(bam,idx=TRUE)
    ga<-alignGapList(reader)
    bamClose(reader)
    # B) Load DNAStringSet
    dnafile<-system.file("extdata","dna_small.RData",package="spliceSites")
    load(dnafile)
    # C) load refGenome
    ucf<-system.file("extdata","uc_small.RData",package="spliceSites")
    uc<-loadGenome(ucf)
    # D) For cRanges
    lj<-lJunc(ga,featlen=6,gaplen=3,strand='+')
    ljw<-extractByGeneName(lj,geneNames="WASH7P",src=uc)
    # E) For cdRanges
    ljc<-lCodons(lj,frame=2)
    ljcd<-dnaRanges(ljc,dna_small)
    ljcdw<-extractByGeneName(ljcd,geneNames="WASH7P",src=uc)
    # F) For caRanges
    ljca<-translate(ljcd)
    ljcaw<-extractByGeneName(ljca,geneNames="WASH7P",src=uc)
    # G) For gapSites
    lrj<-lrJunc(ga,lfeatlen=6,rfeatlen=6,strand='+')
    lrjw<-extractByGeneName(lrj,geneNames="WASH7P",src=uc)

[Package spliceSites version 1.28.0 Index]