ChIPpeakAnno (version 3.6.4)

getGeneSeq: Get gene sequence using the biomaRt package

Description

Get gene sequence using the biomaRt package

Usage

getGeneSeq(LocationParameters, mart)

Arguments

LocationParameters
c(ensembl_gene_id, distance from the peak to the transcription start site of the gene with the above ensemblID, upstream offset from the peak, downstream offset from the peak, Gene Start, Gene End)
mart
see useMart of bioMaRt package for details

Value

  • a list with the following items
  • feature_idensemble gene ID
  • distancetoFeaturedistance from the peak to the transcriptionstart site of the gene with the above ensembl gene ID
  • upstreamupstream offset from the peakStart
  • downstreamdownstream offset from the peakEnd
  • seqsequence obtained around the peak with above upstream and downstream offset

Examples

Run this code
if (interactive())
{
mart <- useMart(biomart="ensembl", dataset="drerio_gene_ensembl")
LocationParameters =c("ENSDARG00000054562",400, 750, 750,40454140,40454935)
getGeneSeq(LocationParameters, mart)

LocationParameters =c("ENSDARG00000054562",752, 750, 750,40454140,40454935)
getGeneSeq(LocationParameters, mart)
 
LocationParameters =c("ENSDARG00000054562",750, 750, 750,40454140,40454935)
getGeneSeq(LocationParameters, mart)
 
 LocationParameters =c("ENSDARG00000054562",-2, 750, 750,40454140,40454935)
 getGeneSeq(LocationParameters, mart)

 LocationParameters =c("ENSDARG00000054562",0, 750, 750,40454140,40454935)
 getGeneSeq(LocationParameters, mart)
 
 LocationParameters =c("ENSDARG00000054562",2, 750, 750,40454140,40454935)
 getGeneSeq(LocationParameters, mart) 
 
 LocationParameters =c("ENSDARG00000054562",1000, 750, 750,40454140,40454935)
 getGeneSeq(LocationParameters, mart)
}

Run the code above in your browser using DataCamp Workspace