Question: maskedBSgenome - cannot enable masks
gravatar for kielpinski
4.0 years ago by
kielpinski0 wrote:

Dear All,

I am trying to figure out how to use the masked BSgenome object - I want to enable ALL masks.

Following help for "bsapply" I tried:

hg19 <- BSgenome.Hsapiens.UCSC.hg19.masked
param <- new("BSParams", X = hg19)
param@maskList <- c(AGAPS = TRUE, AMB = TRUE, RM = TRUE, TRF = TRUE)

Just to get:

Error in BSParams@FUN(seq, ...) : unused argument (seq)


I have tried many, many other combinations but none seem to work. I'd greatly appreciate any ideas on how to make it work.

Best regards,



active(masks(hg19$chr1))["RM"] <- TRUE

Error in `$<-`(`*tmp*`, "chr1", value = <S4 object of class "MaskedDNAString">) :
  no method for assigning subsets of this S4 class


c1 <- hg19$chr1

active(masks(c1))["RM"] <- TRUE

works ok! The problem is I need a whole genome, not split into chromosomes...

> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.5 (Yosemite)

[1] C

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] BSgenome.Hsapiens.UCSC.hg19.masked_1.3.99 BSgenome.Hsapiens.UCSC.hg19_1.4.0         BSgenome_1.38.0                          
 [4] rtracklayer_1.30.1                        Biostrings_2.38.0                         XVector_0.10.0                           
 [7] GenomicRanges_1.22.1                      GenomeInfoDb_1.6.1                        IRanges_2.4.1                            
[10] S4Vectors_0.8.1                           BiocGenerics_0.16.1                      

loaded via a namespace (and not attached):
 [1] XML_3.98-1.3               Rsamtools_1.22.0           GenomicAlignments_1.6.1    bitops_1.0-6               futile.options_1.0.0      
 [6] zlibbioc_1.16.0            futile.logger_1.4.1        lambda.r_1.1.7             BiocParallel_1.4.0         tools_3.2.2               
[11] Biobase_2.30.0             RCurl_1.95-4.7             SummarizedExperiment_1.0.1



bsgenome mask • 603 views
ADD COMMENTlink modified 4.0 years ago • written 4.0 years ago by kielpinski0
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 246 users visited in the last hour