Entering edit mode
hi please help in getting sub-sequences in View, corresponding to granges on positive strand and reverse complementary of granges on negative strand.
hi please help in getting sub-sequences in View, corresponding to granges on positive strand and reverse complementary of granges on negative strand.
Got answer for that Views by default give +ve strand sequence for both granges of both strand.
Got answer for that Views by default give +ve strand sequence for both granges of both strand.
Hi,
If you want to create views on a BSgenome object (e.g. views on the exons of the Human genome) then:
library(BSgenome.Hsapiens.UCSC.hg19) genome <- BSgenome.Hsapiens.UCSC.hg19 library(TxDb.Hsapiens.UCSC.hg19.knownGene) txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene ex <- exons(txdb) v <- Views(genome, ex) v # BSgenomeViews object with 289969 views and 1 metadata column: # seqnames ranges strand dna | # <Rle> <IRanges> <Rle> <DNAStringSet> | # [1] chr1 [11874, 12227] + [CTTGC...GGCCA] | # [2] chr1 [12595, 12721] + [GCTCC...CAGAG] | # [3] chr1 [12613, 12721] + [GTGTG...CAGAG] | # [4] chr1 [12646, 12697] + [CATCA...CTCTT] | # [5] chr1 [13221, 14409] + [GCAGG...TTCTG] | # ... ... ... ... ... .. # [289965] chrUn_gl000241 [35706, 35859] - [GCGAG...AAGTG] | # [289966] chrUn_gl000241 [36711, 36875] - [CTCCA...AAGAG] | # [289967] chrUn_gl000243 [11501, 11530] + [TGGTG...AAGAA] | # [289968] chrUn_gl000243 [13608, 13637] + [TTGCA...GAGCC] | # [289969] chrUn_gl000247 [ 5787, 5816] - [TGGTG...AAGAA] | # exon_id # <integer> # [1] 1 # [2] 2 # [3] 3 # [4] 4 # [5] 5 # ... ... # [289965] 289965 # [289966] 289966 # [289967] 289967 # [289968] 289968 # [289969] 289969 # ------- # seqinfo: 93 sequences (1 circular) from hg19 genome
See ?BSgenomeViews
in the BSgenome package for more information.
H.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.