[BioC] Repeat masker sequences as GRanges object

Hermann Norpois hnorpois at gmail.com
Fri Sep 12 14:06:33 CEST 2014


I continued ...

 active (masks (ch1))["AMP"] <- FALSE

 masks (ch1)
MaskCollection of length 4 and width 249250621
masks:
  maskedwidth maskedratio active names                               desc
1    23970000  0.09616827  FALSE AGAPS                      assembly gaps
2           0  0.00000000   TRUE   AMB   intra-contig ambiguities (empty)
3   114014472  0.45742904   TRUE    RM                       RepeatMasker
4     1581889  0.00634658  FALSE   TRF Tandem Repeats Finder [period<=12]
all masks together:
  maskedwidth maskedratio
    138071094   0.5539448
all active masks together:
  maskedwidth maskedratio
    114014472    0.457429

Reversed the masks
 gg <- gaps (ch1)
> gg <- collapse (gg)
> gu <- as (gg, "Views")
> sum (width (gu))
[1] 114014472 # same as maskedwidth (masks (ch1))

So I just have to transform gu into an GRanges object.
I hope my solution is correct.
Thanks


Hermann


2014-09-11 12:16 GMT+02:00 Hermann Norpois <hnorpois at gmail.com>:

> Hello,
>
> I would like to have repeat sequences as GRanges object
> I started with ...
>
> library (BSgenome.Hsapiens.UCSC.hg19)
> ch1 <- Hsapiens$chr1
> active (masks (ch1))
> AGAPS   AMB    RM   TRF
>  TRUE  TRUE FALSE FALSE
> active (masks(ch1))["RM"] <- TRUE
> active (masks (ch1))
> AGAPS   AMB    RM   TRF
>  TRUE  TRUE  TRUE FALSE
>
> Can anyboldy give me a hint how to continue.
>
> Thanks
> hermann
>

	[[alternative HTML version deleted]]



More information about the Bioconductor mailing list