BSgenome.Osativa.MSU.MSU7 Oryza sativa
3
0
Entering edit mode
Didi ▴ 10
@didi-10905
Last seen 2.8 years ago
Spain

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.

 

bsgenome biostrings • 1.5k views
ADD COMMENT
0
Entering edit mode
@herve-pages-1542
Last seen 10 hours ago
Seattle, WA, United States

Hi,

Please have a look at the getSeq method for BSgenome objects. Access its man page with ?`getSeq,BSgenome-method`.

Cheers,

H.

ADD COMMENT
0
Entering edit mode
Didi ▴ 10
@didi-10905
Last seen 2.8 years ago
Spain

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

 

ADD COMMENT
0
Entering edit mode

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 an as.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 an as.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 like as(..., "BStringSet"). Note that only coercions that make sense are supported. If you want a BSgenomeViews object, don't use getSeq(), use Views(genome, GRanges("Chr7:6000000-13000000")) instead.

Hope this helps,

H.

ADD REPLY
0
Entering edit mode
Didi ▴ 10
@didi-10905
Last seen 2.8 years ago
Spain

It works. Thanks a lot.

 

Cheers,

H

ADD COMMENT

Login before adding your answer.

Traffic: 423 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6