Hi,
How can I use the package BSgenome.Osativa.MSU.MSU7 Oryza sativa and get the sequences and extract the Chr7 sequences from 6Mb to 13Mb.
Thanks a lot.
Hi,
How can I use the package BSgenome.Osativa.MSU.MSU7 Oryza sativa and get the sequences and extract the Chr7 sequences from 6Mb to 13Mb.
Thanks a lot.
Hi,
Please have a look at the getSeq
method for BSgenome objects. Access its man page with ?`getSeq,BSgenome-method`
.
Cheers,
H.
Thanks a lot.
I'm trying this.
library(BSgenome.Osativa.MSU.MSU7)
library(BSgenome)
library(Biostrings)
genome <- getBSgenome("BSgenome.Osativa.MSU.MSU7")
getSeq (genome, "Chr7", 6000000, 13000000, as.BStringViews=TRUE)
I'm getting this error.
Error in .local(x, ...) : unused argument (as.BStringViews = TRUE)
Thanks a lot.
H
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Ok you are H and I'm H so we should understand each others. So you opened the man page with
?`getSeq,BSgenome-method`
as I suggested. Did you find any mention of anas.BStringViews
argument there? The error message you got is telling you that there is no such argument (I admit it could be more straightforward about this, the meaning of "unused" in this context not being totally clear). You cannot make up new arguments and expect that they will just work. That's not how any programming language works (not just R) . BTW I don't even know what a BStringViews object is. We do have BSgenomeViews and XStringViews classes but AFAIK we don't have a BStringViews class.Anyway according to its man page, the
getSeq
method for BSgenome objects has anas.character
argument that you can set to TRUE in case you wanted the result as an ordinary character vector. Otherwise, you'll get a DNAStringSet object. If you want something else (e.g. a BStringSet object, but why would you want this?), you'll have to explicitly coerce the result to the desired class with something likeas(..., "BStringSet")
. Note that only coercions that make sense are supported. If you want a BSgenomeViews object, don't usegetSeq()
, useViews(genome, GRanges("Chr7:6000000-13000000"))
instead.Hope this helps,
H.