Skip to content

Commit

Permalink
Merge pull request #155 from ncbi/release/13.32.0
Browse files Browse the repository at this point in the history
Release updated docs for 13.32.0
  • Loading branch information
BradHolmes authored Aug 9, 2022
2 parents a9b86fc + 3dff918 commit 0313627
Show file tree
Hide file tree
Showing 14 changed files with 364 additions and 361 deletions.
2 changes: 1 addition & 1 deletion client_docs/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ For some larger downloads, you may want to download a [dehydrated bag](https://w
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: v1
- Package version: 13.31.0
- Package version: 13.32.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.
Expand Down
10 changes: 5 additions & 5 deletions client_docs/python/docs/VirusApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,7 @@ with ncbi.datasets.openapi.ApiClient(configuration) as api_client:
filter_geo_location = "USA" # str | Assemblies from this location (country and state, or continent) (optional)
filter_complete_only = True # bool | only include complete genomes. (optional) if omitted the server will use the default value of False
returned_content = V1VirusDataReportRequestContentType("COMPLETE") # V1VirusDataReportRequestContentType | Return either virus genome accessions, or complete virus metadata (optional)
table_fields = ["accession","is_complete","is_annotated"] # [str] | Specify which fields to include in the tabular report (optional)
table_fields = ["accession","is-complete","is-annotated"] # [str] | Specify which fields to include in the tabular report (optional)
page_size = 20 # int | The maximum number of virus data reports to return. Default is 20 and maximum is 1000. If the number of results exceeds the page size, `page_token` can be used to retrieve the remaining results. (optional) if omitted the server will use the default value of 20
page_token = "page_token_example" # str | A page token is returned from a `GetVirusDataReports` call with more than `page_size` results. Use this token, along with the previous `VirusDataReportRequest` parameters, to retrieve the next page of results. When `page_token` is empty, all results have been retrieved. (optional)

Expand Down Expand Up @@ -1244,7 +1244,7 @@ Name | Type | Description | Notes
### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json, text/tab-separated-values, application/x-tabular
- **Accept**: application/json, text/tab-separated-values


### HTTP response details
Expand Down Expand Up @@ -1346,7 +1346,7 @@ Name | Type | Description | Notes
### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json, text/tab-separated-values, application/x-tabular
- **Accept**: application/json, text/tab-separated-values


### HTTP response details
Expand Down Expand Up @@ -1408,7 +1408,7 @@ with ncbi.datasets.openapi.ApiClient(configuration) as api_client:
filter_geo_location = "USA" # str | Assemblies from this location (country and state, or continent) (optional)
filter_complete_only = True # bool | only include complete genomes. (optional) if omitted the server will use the default value of False
returned_content = V1VirusDataReportRequestContentType("COMPLETE") # V1VirusDataReportRequestContentType | Return either virus genome accessions, or complete virus metadata (optional)
table_fields = ["accession","is_complete","is_annotated"] # [str] | Specify which fields to include in the tabular report (optional)
table_fields = ["accession","is-complete","is-annotated"] # [str] | Specify which fields to include in the tabular report (optional)
page_size = 20 # int | The maximum number of virus data reports to return. Default is 20 and maximum is 1000. If the number of results exceeds the page size, `page_token` can be used to retrieve the remaining results. (optional) if omitted the server will use the default value of 20
page_token = "page_token_example" # str | A page token is returned from a `GetVirusDataReports` call with more than `page_size` results. Use this token, along with the previous `VirusDataReportRequest` parameters, to retrieve the next page of results. When `page_token` is empty, all results have been retrieved. (optional)

Expand Down Expand Up @@ -1460,7 +1460,7 @@ Name | Type | Description | Notes
### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json, text/tab-separated-values, application/x-tabular
- **Accept**: application/json, text/tab-separated-values


### HTTP response details
Expand Down
17 changes: 4 additions & 13 deletions datasets.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3002,9 +3002,6 @@ paths:
text/tab-separated-values:
schema:
type: string
application/x-tabular:
schema:
type: string
default:
description: An unexpected error response.
content:
Expand Down Expand Up @@ -3181,8 +3178,8 @@ paths:
example-0:
value:
- accession
- is_complete
- is_annotated
- is-complete
- is-annotated
summary: Virus Genome Fields
- name: page_size
description: 'The maximum number of virus data reports to return. Default is 20 and maximum is 1000. If the number of results exceeds the page size, `page_token` can be used to retrieve the remaining results.'
Expand Down Expand Up @@ -3214,9 +3211,6 @@ paths:
text/tab-separated-values:
schema:
type: string
application/x-tabular:
schema:
type: string
default:
description: An unexpected error response.
content:
Expand Down Expand Up @@ -3389,8 +3383,8 @@ paths:
example-0:
value:
- accession
- is_complete
- is_annotated
- is-complete
- is-annotated
summary: Virus Genome Fields
- name: page_size
description: 'The maximum number of virus data reports to return. Default is 20 and maximum is 1000. If the number of results exceeds the page size, `page_token` can be used to retrieve the remaining results.'
Expand Down Expand Up @@ -3422,9 +3416,6 @@ paths:
text/tab-separated-values:
schema:
type: string
application/x-tabular:
schema:
type: string
default:
description: An unexpected error response.
content:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,26 @@ import (
openapi "datasets_cli/v1/openapi"
)

func contains(s []int32, e int32) bool {
for _, a := range s {
if a == e {
return true
}
}
return false
}

func checkTaxonWithinScope(cli *openapi.APIClient, taxon string) (is_cov bool) {
// conservatively set default to true
is_cov = true
query_min_ord, query_max_ord, err := findTaxonOrd(cli, taxon)
if err == nil {
cov_min_ord, cov_max_ord, err := findTaxonOrd(cli, "Coronaviridae")
if err == nil && (query_min_ord < cov_min_ord || query_max_ord > cov_max_ord) {
coronaviridaeTaxId := int32(10239)
request := cli.TaxonomyApi.TaxonomyMetadata(nil, []string{taxon})
org, resp, err := request.Execute()
if err = handleHTTPResponse(resp, err); err == nil {
taxNode := org.GetTaxonomyNodes()[0]
taxonomy := taxNode.GetTaxonomy()
lineage := taxonomy.GetLineage()
if !contains(lineage, coronaviridaeTaxId) {
is_cov = false
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,13 @@ Refer to NCBI's [download and install](https://www.ncbi.nlm.nih.gov/datasets/doc
Args: cobra.ExactArgs(1),

RunE: func(cmd *cobra.Command, args []string) error {
processAssmAccArgs(args)
request, err := summaryVirusGenomeRequestWithTax(args[0])
if err != nil {
return err
}

return printViralMetadataWithPost(request)
},
}

func init() {

}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0313627

Please sign in to comment.