load local genbank file
1
0
Entering edit mode
Hu, Bin ▴ 20
@hu-bin-5460
Last seen 9.7 years ago
Hello, Can anyone point me some examples of loading a local genbank file and query its features? Thanks. I just started learning Bioconductor and trying to get myself familiar with its packages. I googled but only found ways to download genbank from Internet. Bin
• 2.9k views
ADD COMMENT
0
Entering edit mode
@vincent-j-carey-jr-4
Last seen 7 weeks ago
United States
i googled on "read genbank with R". drilling on one of the responses, i found that the "ape" package addresses this issue; this is available on CRAN. read.GenBank {ape}R DocumentationRead DNA Sequences from GenBank via InternetDescription This function connects to the GenBank database, and reads nucleotide sequences using accession numbers given as arguments. Usage read.GenBank(access.nb, seq.names = access.nb, species.names = TRUE, as.character = FALSE) Argumentsaccess.nba vector of mode character giving the accession numbers. seq.namesthe names to give to each sequence; by default the accession numbers are used.species.namesa logical indicating whether to attribute the species names to the returned object.as.charactera logical controlling whether to return the sequences as an object of class "DNAbin" (the default).Details The function uses the site http://www.ncbi.nlm.nih.gov/ from where the sequences are downloaded. On Tue, Aug 21, 2012 at 12:54 AM, Hu, Bin <binhu@lanl.gov> wrote: > Hello, > > Can anyone point me some examples of loading a local genbank file and > query its features? Thanks. > > I just started learning Bioconductor and trying to get myself familiar > with its packages. I googled but only found ways to download genbank from > Internet. > > Bin > _______________________________________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
I hit return too soon. If you install ape and look at the source for read.GenBank, you can see how the data are acquired and processed. For example, set debug(read.GenBank) and then run the example. You can step through to see where the file is simply scanned and then chopped up. It will be simple to make a custom version of this function that reads from a file instead of the network. On Tue, Aug 21, 2012 at 2:41 AM, Vincent Carey <stvjc@channing.harvard.edu>wrote: > i googled on "read genbank with R". drilling on one of the responses, i > found that the "ape" package addresses this issue; this is available on > CRAN. > > read.GenBank {ape}R Documentation Read DNA Sequences from GenBank via > InternetDescription > > This function connects to the GenBank database, and reads nucleotide > sequences using accession numbers given as arguments. > Usage > > read.GenBank(access.nb, seq.names = access.nb, > species.names = TRUE, as.character = FALSE) > > Argumentsaccess.nb a vector of mode character giving the accession > numbers.seq.namesthe names to give to each sequence; by default the > accession numbers are used. species.namesa logical indicating whether to > attribute the species names to the returned object.as.charactera logical > controlling whether to return the sequences as an object of class "DNAbin" (the > default). Details > > The function uses the site http://www.ncbi.nlm.nih.gov/ from where the > sequences are downloaded. > > > On Tue, Aug 21, 2012 at 12:54 AM, Hu, Bin <binhu@lanl.gov> wrote: > >> Hello, >> >> Can anyone point me some examples of loading a local genbank file and >> query its features? Thanks. >> >> I just started learning Bioconductor and trying to get myself familiar >> with its packages. I googled but only found ways to download genbank from >> Internet. >> >> Bin >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor@r-project.org >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: >> http://news.gmane.org/gmane.science.biology.informatics.conductor >> > > [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
Thanks Vincent! I came across the ape package but I didn't know the debug() trick to check the source code? Bin On Aug 21, 2012, at 12:48 AM, Vincent Carey wrote: > I hit return too soon. If you install ape and look at the source for read.GenBank, you can see how the data are acquired and processed. For example, set > > debug(read.GenBank) > > and then run the example. You can step through to see where the file is simply scanned and then chopped up. It will be simple to make a custom version of this function that reads from a file instead of the network. > > On Tue, Aug 21, 2012 at 2:41 AM, Vincent Carey <stvjc at="" channing.harvard.edu=""> wrote: > i googled on "read genbank with R". drilling on one of the responses, i found that the "ape" package addresses this issue; this is available on CRAN. > > read.GenBank {ape} R Documentation > Read DNA Sequences from GenBank via Internet > > Description > > This function connects to the GenBank database, and reads nucleotide sequences using accession numbers given as arguments. > > Usage > > read.GenBank(access.nb, seq.names = access.nb, > species.names = TRUE, as.character = FALSE) > > Arguments > > access.nb a vector of mode character giving the accession numbers. > seq.names the names to give to each sequence; by default the accession numbers are used. > species.names a logical indicating whether to attribute the species names to the returned object. > as.character a logical controlling whether to return the sequences as an object of class "DNAbin" (the default). > Details > > The function uses the site http://www.ncbi.nlm.nih.gov/ from where the sequences are downloaded. > > > > On Tue, Aug 21, 2012 at 12:54 AM, Hu, Bin <binhu at="" lanl.gov=""> wrote: > Hello, > > Can anyone point me some examples of loading a local genbank file and query its features? Thanks. > > I just started learning Bioconductor and trying to get myself familiar with its packages. I googled but only found ways to download genbank from Internet. > > Bin > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor > >
ADD REPLY

Login before adding your answer.

Traffic: 871 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