[BioC] Extend GRanges start/end
Paul Shannon
pshannon at fhcrc.org
Mon Oct 29 13:55:54 CET 2012
Hi Antonio,
New methods in Genomic Features 1.10.0
promoter
getPromoterSeq
might help you out here. The latter uses the former, and a documented example can be found here:
http://www.bioconductor.org/help/workflows/gene-regulation-tfbs/#compact-summary
If this is insufficient please let us know, and we can dig further into your problem.
Cheers,
- Paul
On Oct 29, 2012, at 3:37 AM, António Miguel de Jesus Domingues wrote:
> Hi Bioconducters,
>
> I have a GRanges object created with the package GenomicFeatures that
> contains gene coordinates:
>
> ##########################################################
> hg19RefGenes <- loadFeatures(file='hg19RefGenes.sqlite')
> hg19RefGenes
>
> # generate a GRanges object containing contiguous transcribed regions of
> the genome (from the 1st to last exon)
> GeneRegions <- transcriptsBy(hg19RefGenes, by='gene')
> gene.bounds <- seqapply(GeneRegions, range, progress="text")
> GeneRegions <- unlist(gene.bounds)
> head(GeneRegions)
> GRanges with 6 ranges and 0 elementMetadata cols:
> seqnames ranges strand
> <Rle> <IRanges> <Rle>
> 1 chr19 [ 58858172, 58864865] -
> 10 chr8 [ 18248755, 18258723] +
> 100 chr20 [ 43248163, 43280376] -
> 1000 chr18 [ 25530930, 25757445] -
> 10000 chr1 [243651535, 244006886] -
> 100008586 chrX [ 49217771, 49342266] +
> ---
> seqlengths:
> chr1 chr2 ... chr18_gl000207_random
> 249250621 243199373 ... 4262
> ##########################################################
>
> I want to do something that should be simple: extend the ranges to that it
> also includes 1Kb upstream of the gene (~Promoter region), for example,
> chr19 [ 58858172, 58864865] becomes chr19 [ 58858172, 58865865]. Looking
> at the GenomicFeatures fucntions it seems that neither resize or flank will
> do. Is there another function that I am missing that will do the job ?
>
> Cheers,
> António
>
> --
> --
> António Miguel de Jesus Domingues, PhD
> Neugebauer group
> Max Planck Institute of Molecular Cell Biology and Genetics, Dresden
> Pfotenhauerstrasse 108
> 01307 Dresden
> Germany
>
> e-mail: domingue at mpi-cbg.de
> tel. +49 351 210 2481
> The Unbearable Lightness of Molecular Biology
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
More information about the Bioconductor
mailing list