I am trying to make a Granges object with a list of genes that I have downloaded from MGI.
This is the column with strand info > mm9genes$X.3
gives me Levels: - +
However, when I use this code..
GRanges(seqnames = Rle("chr12", 322),
ranges = IRanges(start = mm9genes$X, end = mm9genes$X.1),
strand = Rle(mm9genes$X.3),
symbol = mm9genes$X.2)`
I get error Error in .local(x, ...) : invalid strand levels in 'x': - , +
I am pretty new to this and trying to learn from. Will appreciate any help.
sessionInfo() R version 3.1.2 (2014-10-31) Platform: x86_64-apple-darwin13.4.0 (64-bit) locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats4 parallel stats graphics grDevices utils datasets [8] methods base other attached packages: [1] GenomicRanges_1.18.4 GenomeInfoDb_1.2.5 IRanges_2.0.1 [4] S4Vectors_0.4.0 BiocGenerics_0.12.1 BiocInstaller_1.16.5 loaded via a namespace (and not attached): [1] bitops_1.0-6 digest_0.6.9 httr_1.1.0 magrittr_1.5 [5] RCurl_1.95-4.8 stringi_1.0-1 stringr_1.0.0 swirl_2.2.21 [9] testthat_0.11.0 tools_3.1.2 XVector_0.6.0 yaml_2.1.13
Hi,
This post is a question, not a Tutorial. Please ask again as a question i.e. make sure to set Post Type to Question (which is the default). Also provide a reproducible example and the output of your
sessionInfo()
.Thanks,
H.