Hi there,

I have some ranges of interest in the human genome, specified as a GRanges object (a bunch of them, in a list), and I'd like to use alphabetFrequency on their RepeatMasked sequences. I've found an inefficient way to do this, but I wondered 
(a) whether I'm missing a better way to do it, or 
(b) whether it'd be possible for you to implement some version of Views that returns masked sequences, rather than dropping the masks

My inefficient (in memory) version is to create a hard-masked version of the genome like this:

allMaskedSeqsHsapiens <- list()
for (thisChr in seqnames(Hsapiens)) {
    cat("chr",thisChr,"\n")
    myChr <- Hsapiens [[thisChr]] 
    active(masks(myChr)) <- rep(TRUE, 4)
    myChr <- injectHardMask(myChr)
    allMaskedSeqsHsapiens[[thisChr]] <- myChr
}

and then for each of the GRanges objects I'm looking at (each has ranges only on a single chromosome), I get the sequence using Views on the relevant hard-masked sequence from allMaskedSeqsHsapiens[[thisChr]].

It seems I shouldn't have to create the hard-masked genome list - is there a direct way to do this?  Views always seems to drop the masks, and I don't think getSeq works for MaskedDNAString objects.  Maybe I should be doing some roundabout coercion to get the MaskedDNAString chromosome into a DNAString format, retaining the masks?  But perhaps it would be nice to have be able to use Views or getSeq directly to get masked sequences.

Motivation: I want to calculating repeat-masked intronic GC content for each human gene.

thanks very much,

Janet



	[[alternative HTML version deleted]]

