Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete DataOneV1 #71

Merged
merged 5 commits into from
Oct 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,22 +188,13 @@ Example of use:
```


### `DataOneV1()` - API Based

https://releases.dataone.org/online/api-documentation-v1.2.0/

Data repositories like DataDryad, support version 1 API of the DataOne.

Data Repositories:
* DataDryad: `generate(DataOneV1(), "https://datadryad.org/resource/doi:10.5061/dryad.74699", "Wild Crop Genomics")`



### `DataOneV2`

https://releases.dataone.org/online/api-documentation-v2.0/apis/index.html

Supports DataOne API version 2. There are differences in the API structure in each of them, hence are accounted for, separately:
Supports DataOne API version 2.
There are differences in the API structure for each repository each of them, hence are accounted for, separately:

Data Repositories:
* Knowledge Network for Biocomplexity `KnowledgeNetworkforBiocomplexity()`: `generate(KnowledgeNetworkforBiocomplexity(), "https://knb.ecoinformatics.org/knb/d1/mn/v2/object/doi:10.5063/F1T43R7N")`
Expand Down
57 changes: 0 additions & 57 deletions src/APIs/DataOneV1.jl

This file was deleted.

5 changes: 4 additions & 1 deletion src/APIs/Figshare.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ struct Figshare <: DataRepo
end

base_url(::Figshare) = "https://api.figshare.com/v2/articles"
# Note: Unlike other generators, FigShare base_url is sometimes a "directory" and sometimes a file
# But it is OK, because Figshare also overloads all the functions that use `base_url`
# Most importantly `mainpage_url`

description(repo::Figshare, mainpage) = mainpage["description"]

Expand Down Expand Up @@ -49,7 +52,7 @@ function mainpage_url(repo::Figshare, dataname)
return JSON.parse(text_only(getpage(url).root)), url
elseif match_figshare(dataname)!= nothing
identifier = match_figshare(dataname)
url = base_url(repo) * "/" *identifier
url = joinpath(base_url(repo), identifier)
return JSON.parse(text_only(getpage(url).root)), url
else
throw(GeneratorError(repo))
Expand Down
2 changes: 1 addition & 1 deletion src/APIs/GitHub.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
struct GitHub <: DataRepo
end

base_url(::GitHub) = "https://github.com"
base_url(::GitHub) = "https://github.com/"

git_repo_page_url(page) = base_url(GitHub()) * getattr(first(eachmatch(sel"strong[itemprop=\"name\"] a", page.root)), "href")

Expand Down
3 changes: 1 addition & 2 deletions src/DataDepsGenerators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ using Dates
using InteractiveUtils: subtypes

export generate, citation_text, remove_cite_version
export UCI, GitHub, DataDryad, DataOneV1, DataOneV2, CKAN, DataCite, Figshare, JSONLD_Web, JSONLD_DOI
export UCI, GitHub, DataDryad, DataOneV2, CKAN, DataCite, Figshare, JSONLD_Web, JSONLD_DOI



Expand Down Expand Up @@ -38,7 +38,6 @@ include("misc_extractors.jl")
include("APIs/UCI.jl")
include("APIs/GitHub.jl")
include("APIs/DataDryad.jl")
include("APIs/DataOneV1.jl")
include("APIs/DataOneV2/DataOneV2.jl")
include("APIs/CKAN.jl")
include("APIs/DataCite.jl")
Expand Down
2 changes: 1 addition & 1 deletion src/generate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function mainpage_url(repo::DataRepo, dataname)
if startswith(dataname, "http")
url = dataname
else # not a URL
url = joinpath(base_url(repo), dataname)
url = base_url(repo) * dataname
end
getpage(url), url
end
Expand Down
3 changes: 3 additions & 0 deletions test/DataDryad.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ using Test
using ReferenceTests

@testset "DataDryad test" begin
# Via URL
@test_reference "references/DataDryad Ecology.txt" generate(DataDryad(), "https://datadryad.org/resource/doi:10.5061/dryad.74699")
#Via DOI
@test_reference "references/DataDryad Ecology.txt" generate(DataDryad(), "https://datadryad.org/resource/doi:10.5061/dryad.74699")

#Checking files with multiple files available for download
Expand Down
12 changes: 0 additions & 12 deletions test/DataOneV1.jl

This file was deleted.

2 changes: 1 addition & 1 deletion test/combine.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using ReferenceTests
@testset "Combining test" begin
@test_reference "references/Combining Ecology.txt" remove_cite_version(generate("10.5061/dryad.74699"))

@test_reference "references/Combining Plasticity.txt" remove_cite_version(generate("https://datadryad.org/mn/object/http://dx.doi.org/10.5061/dryad.f9s4424"))
@test_reference "references/Combining Plasticity.txt" remove_cite_version(generate("http://dx.doi.org/10.5061/dryad.f9s4424"))

@test_reference "references/Combining Stack Overflow.txt" generate("https://www.kaggle.com/stackoverflow/stack-overflow-2018-developer-survey")

Expand Down
12 changes: 6 additions & 6 deletions test/references/Combining Ecology.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ register(DataDep(
"Data from Ecology and genomics of an important crop wild relative as a prelude to agricultural innovation",
"""
Dataset: Data from: Ecology and genomics of an important crop wild relative as a prelude to agricultural innovation
Website: http://dx.doi.org/10.5061/dryad.74699
Author: von Wettberg, Eric J. B. et al.
Date of Publication: 2018-02-27T21:46:38
Website: https://datadryad.org/resource/doi:10.5061/dryad.74699
Author: Eric J. B. Von Wettberg et al.
Date of Publication: February 27, 2018
License: https://creativecommons.org/publicdomain/zero/1.0/

Domesticated species are impacted in unintended ways during domestication and breeding. Changes in the nature and intensity of selection impart genetic drift, reduce diversity, and increase the frequency of deleterious alleles. Such outcomes constrain our ability to expand the cultivation of crops into environments that differ from those under which domestication occurred. We address this need in chickpea, an important pulse legume, by harnessing the diversity of wild crop relatives. We document an extreme domestication-related genetic bottleneck and decipher the genetic history of wild populations. We provide evidence of ancestral adaptations for seed coat color crypsis, estimate the impact of environment on genetic structure and trait values, and demonstrate variation between wild and cultivated accessions for agronomic properties. A resource of genotyped, association mapping progeny functionally links the wild and cultivated gene pools and is an essential resource chickpea for improvement, while our methods inform collection of other wild crop progenitor species.

Please cite this paper: Von Wettberg, E. J. B., Chang, P. L., Başdemir, F., Carrasquila-Garcia, N., Korbu, L. B., Moenga, S. M., … Cook, D. R. (2018). Ecology and genomics of an important crop wild relative as a prelude to agricultural innovation. Nature Communications, 9(1). doi:10.1038/s41467-018-02867-z
Please cite this paper: von Wettberg EJB, Chang PL, Başdemir F, Carrasquila-Garcia N, Korbu L, Moenga SM, Bedada G, Greenlon A, Moriuchi KS, Suryawanshi V, Cordeiro MA, Noujdina NV, Dinegde KN, Abbas Shah Sani SG, Getahun T, Vance L, Bergmann E, Lindsay D, Mamo BE, Warschefsky EJ, Dacosta-Calheiros E, Marques E, Yilmaz MA, Cakmak AM, Rose J, Migneault A, Krieg CP, Saylak S, Temel H, Friesen ML, Silor E, Akhmetov Z, Ozelik H, Kholova J, Can C, Gaur P, Yildirim M, Sharma H, Vadez V, Tesfaye K, Woldemedhin AF, Tar'an B, Aydogan A, Bukun B, Penmetsa RV, Berger J, Kahraman A, Nuzhdin SV, Cook DR (2018) Ecology and genomics of an important crop wild relative as a prelude to agricultural innovation. Nature Communications 9: 649. https://doi.org/10.1038/s41467-018-02867-z

Please cite this dataset: Von Wettberg, E. J. B., Chang, P. L., Başdemir, F., Carrasquila-Garcia, N., Korbu, L., Moenga, S. M., … Cook, D. R. (2018). Data from: Ecology and genomics of an important crop wild relative as a prelude to agricultural innovation [Data set]. Dryad Digital Repository. https://doi.org/10.5061/dryad.74699
""",
Any["/bitstream/handle/10255/dryad.166590/draft_dryad_upload_dec2017.xls?sequence=1"],
[(md5, "3c837a0a41e01966a0f037beb7db43b8")]
Any["https://datadryad.org/bitstream/handle/10255/dryad.166590/draft_dryad_upload_dec2017.xls?sequence=1"],
[(md5, "efc75490db3444d3708b3e9ccd030d38")]
))
10 changes: 5 additions & 5 deletions test/references/Combining Plasticity.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ register(DataDep(
"Data from Plasticity of plant defense and its evolutionary implications in wild populations of Boechera stricta",
"""
Dataset: Data from: Plasticity of plant defense and its evolutionary implications in wild populations of Boechera stricta
Website: https://datadryad.org/mn/object/http://dx.doi.org/10.5061/dryad.f9s4424
Author: Wagner, Maggie R., Mitchell-Olds, Thomas
Date of Publication: 2018-03-02T20:35:36
Website: http://dx.doi.org/10.5061/dryad.f9s4424
Author: Maggie R. Wagner, Thomas Mitchell-Olds
Date of Publication: March 2, 2018
License: https://creativecommons.org/publicdomain/zero/1.0/

Phenotypic plasticity is thought to impact evolutionary trajectories by shifting trait values in a direction that is either favored by natural selection (“adaptive plasticity”) or disfavored (“nonadaptive” plasticity). However, it is unclear how commonly each of these types of plasticity occurs in natural populations. To answer this question, we measured glucosinolate defensive chemistry and reproductive fitness in over 1,500 individuals of the wild perennial mustard Boechera stricta, planted in four common gardens across central Idaho, USA. Glucosinolate profiles—including total glucosinolate concentration as well as the relative abundances and overall diversity of different compounds—were strongly plastic both among habitats and within habitats. Patterns of glucosinolate plasticity varied greatly among genotypes. Plasticity among sites was predicted to affect fitness in 27.1% of cases; more often than expected by chance, glucosinolate plasticity increased rather than decreased relative fitness. In contrast, we found no evidence for within-habitat selection on glucosinolate reaction norm slopes (i.e., plasticity along a continuous environmental gradient). Together, our results indicate that glucosinolate plasticity may improve the ability of B. stricta populations to persist after migration to new habitats.
Expand All @@ -14,6 +14,6 @@ register(DataDep(

Please cite this dataset: Wagner, M. R., & Mitchell-Olds, T. (2018). Data from: Plasticity of plant defense and its evolutionary implications in wild populations of Boechera stricta [Data set]. Dryad Digital Repository. https://doi.org/10.5061/dryad.f9s4424
""",
Any["/bitstream/handle/10255/dryad.173251/raw_data.zip?sequence=1", "/bitstream/handle/10255/dryad.173251/README.txt?sequence=2", "/bitstream/handle/10255/dryad.173252/GSplasticity_code.R?sequence=1"],
[(md5, "aea52e9cdb6c4069720bc709415e479f"), (md5, "2abd4c62b7263eba8c74ce2bcb25790f"), (md5, "783d619e042bfe516b6ffd34dc97b5df")]
Any["https://datadryad.org/bitstream/handle/10255/dryad.173251/raw_data.zip?sequence=1", "https://datadryad.org/bitstream/handle/10255/dryad.173251/README.txt?sequence=2", "https://datadryad.org/bitstream/handle/10255/dryad.173252/GSplasticity_code.R?sequence=1"],
[(md5, "898237b1dd8306be586ffc036ebda768"), (md5, "af502ff7111868c548cc7923a9193673")]
))
18 changes: 0 additions & 18 deletions test/references/DataOneV1 Drought.txt

This file was deleted.

18 changes: 0 additions & 18 deletions test/references/DataOneV1 Ecology.txt

This file was deleted.

Loading