Skip to content

Commit

Permalink
Merge pull request #30 from ropensci:joelnitta/bump
Browse files Browse the repository at this point in the history
Joelnitta/bump
  • Loading branch information
joelnitta authored Jun 3, 2022
2 parents 5d4033e + ec892db commit 86935af
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 56 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: restez
Type: Package
Title: Create and Query a Local Copy of 'GenBank' in R
Version: 1.0.3
Version: 1.1.0
Authors@R: c(
person(
given = "Joel H.",
Expand Down
16 changes: 15 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
# restez (in development)
# restez 1.1.0

## Bug fixes

* Fix bug where single extremely long sequence caused db_create() to die (#14)

## New features

* Add ability to filter database by accession number upon creation (#25)

## Other

* Change maintainer to [Joel Nitta](https://github.com/joelnitta)

# restez 1.0.1

## Bug fixes

Expand Down
4 changes: 0 additions & 4 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,6 @@ restez_disconnect()

Want to contribute? Check the [contributing page](https://ropensci.github.io/restez/CONTRIBUTING.html).

## Version

Release version 1.

## Licence

MIT
Expand Down
94 changes: 46 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ no longer available.)
# Warning: running these examples may take a few minutes
library(restez)
#> -------------
#> restez v1.0.3
#> restez v1.1.0
#> -------------
#> Remember to restez_path_set() and, then, restez_connect()
# choose a location to store GenBank files
Expand Down Expand Up @@ -117,56 +117,58 @@ id <- sample(list_db_ids(), 1)
# sequences
seq <- gb_sequence_get(id)[[1]]
str(seq)
#> chr "GATCCCGACCTTGATGCTGTTCAAGGGCGGCAACGTCGAGGCGACCAAGGTCGGGGCACTGTCGAAGAGCCAGCTCGCGGCATTTCTCGACAGCAATCTCTGAGCGCGACG"| __truncated__
#> chr "AATTCGGCTTGGTTACCTTGTTACGACTTCACCCCAGTCATGAACCACAAAGTGGTGAGCGACCTCCCGAAGGTTAGTCTACCCACTTCTTTTGCAACCCACTCCCATGGT"| __truncated__
# definitions
def <- gb_definition_get(id)[[1]]
print(def)
#> [1] "Unidentified clone B27 DNA sequence from ocean beach sand"
#> [1] "Unidentified clone E16S17 SSU ribosomal RNA gene, partial sequence"
# organisms
org <- gb_organism_get(id)[[1]]
print(org)
#> [1] "unidentified"
# or whole records
rec <- gb_record_get(id)[[1]]
cat(rec)
#> LOCUS AF298103 647 bp DNA linear UNA 23-NOV-2000
#> DEFINITION Unidentified clone B27 DNA sequence from ocean beach sand.
#> ACCESSION AF298103
#> VERSION AF298103.1
#> LOCUS AF298113 633 bp DNA linear UNA 23-NOV-2000
#> DEFINITION Unidentified clone E16S17 SSU ribosomal RNA gene, partial sequence.
#> ACCESSION AF298113
#> VERSION AF298113.1
#> KEYWORDS .
#> SOURCE unidentified
#> ORGANISM unidentified
#> unclassified sequences.
#> REFERENCE 1 (bases 1 to 647)
#> REFERENCE 1 (bases 1 to 633)
#> AUTHORS Naviaux,R.K.
#> TITLE Sand DNA: a multigenomic library on the beach
#> JOURNAL Unpublished
#> REFERENCE 2 (bases 1 to 647)
#> REFERENCE 2 (bases 1 to 633)
#> AUTHORS Naviaux,R.K.
#> TITLE Direct Submission
#> JOURNAL Submitted (21-AUG-2000) Medicine, University of California, San
#> Diego School of Medicine, 200 West Arbor Drive, San Diego, CA
#> 92103-8467, USA
#> FEATURES Location/Qualifiers
#> source 1..647
#> source 1..633
#> /organism="unidentified"
#> /mol_type="genomic DNA"
#> /db_xref="taxon:32644"
#> /clone="B27"
#> /clone="E16S17"
#> /note="anonymous environmental sample sequence from ocean
#> beach sand"
#> rRNA <1..>633
#> /product="SSU ribosomal RNA"
#> ORIGIN
#> 1 gatcccgacc ttgatgctgt tcaagggcgg caacgtcgag gcgaccaagg tcggggcact
#> 61 gtcgaagagc cagctcgcgg catttctcga cagcaatctc tgagcgcgac gcgcgccgcc
#> 121 gtcatgtggc gctcatcacg aaaacttcgt cacacggggt agacgccccc tgaggcgcgt
#> 181 gttaggtttt tcatacaccg gcgcactcgc gccgtcctca ccttcatccg tacccagcac
#> 241 acgcttgctc acgcccatac ccgtgcggtc gtcatgaccg tcgaccgtgc tgcccgccag
#> 301 tccgcctctt ggattgctta atgaacctca cagagttgaa acagaaaacc gccccggagc
#> 361 tgctcgagct gtcgcaggag ctcggcatcg agggcatggc ccgctcgcgc aagcaggacg
#> 421 tgatcttcgc gatcctgaag aaccaggcga agaagggcga ggacatctac ggcgacggcg
#> 481 tgctcgaaat ccttcaggac ggattcggct tnctgcgctc gtctgacagc ttctacctgg
#> 541 ccgggcccga cgacatttac gtnagtccna gccanatccg ccgcttnggc tgncaccggn
#> 601 nnaccgtggt tggaaagata aggcttcaaa ggagggaagc gctcttt
#> 1 aattcggctt ggttaccttg ttacgacttc accccagtca tgaaccacaa agtggtgagc
#> 61 gacctcccga aggttagtct acccacttct tttgcaaccc actcccatgg tgtgacgggc
#> 121 ggtgtgtaca aggcccggga acgtattcac cgtagcaatg ctgatctacg attactagcg
#> 181 attccaactt catgcagtcg agttgcagac tgcaatccgg actaagaact gctttgtggg
#> 241 attggctccc cctcgcgggt tagcgaccct ctgtacagcc cattgtagca cgtgtgtagc
#> 301 ccagcccata agggccatga tgacttgacg tcatccccac cttcctccgg tttgtcaccg
#> 361 gcagtctcct tagagttccc accattacgt gctggcaact aaggacaang gttgcgctcg
#> 421 ttgcgggact taacccaaca tctcacgaca cgagctgacg acagccatgc agcacctgtg
#> 481 taacggcccg aangcggcac catctctggt aaccttccat tacatgtcaa atccaggtaa
#> 541 ggttctgcgc gttgcatcga attaaaccac atgctccact gcttgtgcgg gccccccgtc
#> 601 aatttctttg agtttaatct tgcgaccgta ctt
#> //
```

Expand All @@ -176,34 +178,34 @@ cat(rec)
# use the entrez_* wrappers to access GB data
res <- entrez_fetch(db = 'nucleotide', id = id, rettype = 'fasta')
cat(res)
#> >AF298103.1 Unidentified clone B27 DNA sequence from ocean beach sand
#> GATCCCGACCTTGATGCTGTTCAAGGGCGGCAACGTCGAGGCGACCAAGGTCGGGGCACTGTCGAAGAGC
#> CAGCTCGCGGCATTTCTCGACAGCAATCTCTGAGCGCGACGCGCGCCGCCGTCATGTGGCGCTCATCACG
#> AAAACTTCGTCACACGGGGTAGACGCCCCCTGAGGCGCGTGTTAGGTTTTTCATACACCGGCGCACTCGC
#> GCCGTCCTCACCTTCATCCGTACCCAGCACACGCTTGCTCACGCCCATACCCGTGCGGTCGTCATGACCG
#> TCGACCGTGCTGCCCGCCAGTCCGCCTCTTGGATTGCTTAATGAACCTCACAGAGTTGAAACAGAAAACC
#> GCCCCGGAGCTGCTCGAGCTGTCGCAGGAGCTCGGCATCGAGGGCATGGCCCGCTCGCGCAAGCAGGACG
#> TGATCTTCGCGATCCTGAAGAACCAGGCGAAGAAGGGCGAGGACATCTACGGCGACGGCGTGCTCGAAAT
#> CCTTCAGGACGGATTCGGCTTNCTGCGCTCGTCTGACAGCTTCTACCTGGCCGGGCCCGACGACATTTAC
#> GTNAGTCCNAGCCANATCCGCCGCTTNGGCTGNCACCGGNNNACCGTGGTTGGAAAGATAAGGCTTCAAA
#> GGAGGGAAGCGCTCTTT
#> >AF298113.1 Unidentified clone E16S17 SSU ribosomal RNA gene, partial sequence
#> AATTCGGCTTGGTTACCTTGTTACGACTTCACCCCAGTCATGAACCACAAAGTGGTGAGCGACCTCCCGA
#> AGGTTAGTCTACCCACTTCTTTTGCAACCCACTCCCATGGTGTGACGGGCGGTGTGTACAAGGCCCGGGA
#> ACGTATTCACCGTAGCAATGCTGATCTACGATTACTAGCGATTCCAACTTCATGCAGTCGAGTTGCAGAC
#> TGCAATCCGGACTAAGAACTGCTTTGTGGGATTGGCTCCCCCTCGCGGGTTAGCGACCCTCTGTACAGCC
#> CATTGTAGCACGTGTGTAGCCCAGCCCATAAGGGCCATGATGACTTGACGTCATCCCCACCTTCCTCCGG
#> TTTGTCACCGGCAGTCTCCTTAGAGTTCCCACCATTACGTGCTGGCAACTAAGGACAANGGTTGCGCTCG
#> TTGCGGGACTTAACCCAACATCTCACGACACGAGCTGACGACAGCCATGCAGCACCTGTGTAACGGCCCG
#> AANGCGGCACCATCTCTGGTAACCTTCCATTACATGTCAAATCCAGGTAAGGTTCTGCGCGTTGCATCGA
#> ATTAAACCACATGCTCCACTGCTTGTGCGGGCCCCCCGTCAATTTCTTTGAGTTTAATCTTGCGACCGTA
#> CTT
# if the id is not in the local database
# these wrappers will search online via the rentrez package
res <- entrez_fetch(db = 'nucleotide', id = c('S71333.1', id),
rettype = 'fasta')
#> [1] id(s) are unavailable locally, searching online.
cat(res)
#> >AF298103.1 Unidentified clone B27 DNA sequence from ocean beach sand
#> GATCCCGACCTTGATGCTGTTCAAGGGCGGCAACGTCGAGGCGACCAAGGTCGGGGCACTGTCGAAGAGC
#> CAGCTCGCGGCATTTCTCGACAGCAATCTCTGAGCGCGACGCGCGCCGCCGTCATGTGGCGCTCATCACG
#> AAAACTTCGTCACACGGGGTAGACGCCCCCTGAGGCGCGTGTTAGGTTTTTCATACACCGGCGCACTCGC
#> GCCGTCCTCACCTTCATCCGTACCCAGCACACGCTTGCTCACGCCCATACCCGTGCGGTCGTCATGACCG
#> TCGACCGTGCTGCCCGCCAGTCCGCCTCTTGGATTGCTTAATGAACCTCACAGAGTTGAAACAGAAAACC
#> GCCCCGGAGCTGCTCGAGCTGTCGCAGGAGCTCGGCATCGAGGGCATGGCCCGCTCGCGCAAGCAGGACG
#> TGATCTTCGCGATCCTGAAGAACCAGGCGAAGAAGGGCGAGGACATCTACGGCGACGGCGTGCTCGAAAT
#> CCTTCAGGACGGATTCGGCTTNCTGCGCTCGTCTGACAGCTTCTACCTGGCCGGGCCCGACGACATTTAC
#> GTNAGTCCNAGCCANATCCGCCGCTTNGGCTGNCACCGGNNNACCGTGGTTGGAAAGATAAGGCTTCAAA
#> GGAGGGAAGCGCTCTTT
#> >AF298113.1 Unidentified clone E16S17 SSU ribosomal RNA gene, partial sequence
#> AATTCGGCTTGGTTACCTTGTTACGACTTCACCCCAGTCATGAACCACAAAGTGGTGAGCGACCTCCCGA
#> AGGTTAGTCTACCCACTTCTTTTGCAACCCACTCCCATGGTGTGACGGGCGGTGTGTACAAGGCCCGGGA
#> ACGTATTCACCGTAGCAATGCTGATCTACGATTACTAGCGATTCCAACTTCATGCAGTCGAGTTGCAGAC
#> TGCAATCCGGACTAAGAACTGCTTTGTGGGATTGGCTCCCCCTCGCGGGTTAGCGACCCTCTGTACAGCC
#> CATTGTAGCACGTGTGTAGCCCAGCCCATAAGGGCCATGATGACTTGACGTCATCCCCACCTTCCTCCGG
#> TTTGTCACCGGCAGTCTCCTTAGAGTTCCCACCATTACGTGCTGGCAACTAAGGACAANGGTTGCGCTCG
#> TTGCGGGACTTAACCCAACATCTCACGACACGAGCTGACGACAGCCATGCAGCACCTGTGTAACGGCCCG
#> AANGCGGCACCATCTCTGGTAACCTTCCATTACATGTCAAATCCAGGTAAGGTTCTGCGCGTTGCATCGA
#> ATTAAACCACATGCTCCACTGCTTGTGCGGGCCCCCCGTCAATTTCTTTGAGTTTAATCTTGCGACCGTA
#> CTT
#>
#> >S71333.1 alpha 1,3 galactosyltransferase [New World monkeys, mermoset lymphoid cell line B95.8, mRNA Partial, 1131 nt]
#> ATGAATGTCAAAGGAAAAGTAATTCTGTCGATGCTGGTTGTCTCAACTGTGATTGTTGTGTTTTGGGAAT
Expand Down Expand Up @@ -231,10 +233,6 @@ restez_disconnect()
Want to contribute? Check the [contributing
page](https://ropensci.github.io/restez/CONTRIBUTING.html).

## Version

Release version 1.

## Licence

MIT
Expand Down
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"codeRepository": "https://github.com/ropensci/restez",
"issueTracker": "https://github.com/ropensci/restez/issues",
"license": "https://spdx.org/licenses/MIT",
"version": "1.0.3",
"version": "1.1.0",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down Expand Up @@ -195,7 +195,7 @@
},
"SystemRequirements": null
},
"fileSize": "1657.315KB",
"fileSize": "1657.388KB",
"citation": [
{
"@type": "ScholarlyArticle",
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-biomartr-tools.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ library(testthat)
# RUNNING
context('Testing \'biomartr-tools\'')
test_that('check_connection() works', {
skip("skip until switch to duckdb")
with_mock(
`url_exists` = function(...) FALSE,
expect_error(restez:::check_connection())
Expand Down

0 comments on commit 86935af

Please sign in to comment.