Skip to content

Commit

Permalink
RE2022-272: Add a bulk version of genbank_to_genome in GFU (#208)
Browse files Browse the repository at this point in the history
* add a bulk version of genbank_to_genome in GFU
  • Loading branch information
Xiangs18 authored May 21, 2024
1 parent d48a690 commit e0b1dd3
Show file tree
Hide file tree
Showing 19 changed files with 9,893 additions and 423 deletions.
1 change: 1 addition & 0 deletions .github/workflows/kb_sdk_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,5 @@ jobs:
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
43 changes: 43 additions & 0 deletions GenomeFileUtil.spec
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ module GenomeFileUtil {

/*
genome_name - becomes the name of the object
workspace_id - the immutable, numeric ID of the target workspace. Always prefer
providing the ID over the name.
workspace_name - the name of the workspace it gets saved to.
source - Source of the file typically something like RefSeq or Ensembl
taxon_ws_name - where the reference taxons are : ReferenceTaxons
Expand All @@ -42,6 +44,7 @@ module GenomeFileUtil {
typedef structure {
File file;

int workspace_id;
string genome_name;
string workspace_name;

Expand All @@ -65,6 +68,46 @@ module GenomeFileUtil {
funcdef genbank_to_genome(GenbankToGenomeParams params)
returns (GenomeSaveResult result) authentication required;

typedef structure {
File file;
string genome_name;

string source;
string taxon_wsname;
string taxon_id;

string release;
string generate_ids_if_needed;
int genetic_code;
string scientific_name;
usermeta metadata;
boolean generate_missing_genes;
string use_existing_assembly;
} GenbankToGenomeInput;

typedef structure {
int workspace_id;
list<GenbankToGenomeInput> inputs;
} GenbanksToGenomesParams;

typedef structure {
string genome_ref;
string assembly_ref;
string assembly_path;
Workspace.object_info assembly_info;
Workspace.object_info genome_info;
} GenbankToGenomeSaveResult;

/* Results for the genbanks_to_genomes function.
results - the results of the save operation in the same order as the input.
*/
typedef structure {
list<GenbankToGenomeSaveResult> results;
} GenbanksToGenomesSaveResults;

funcdef genbanks_to_genomes(GenbanksToGenomesParams params)
returns (GenbanksToGenomesSaveResults results) authentication required;

/*
is_gtf - optional flag switching export to GTF format (default is 0,
which means GFF)
Expand Down
7 changes: 7 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.11.7] - 2024-02-14

### Added

- The `genbanks_to_genomes` method was added to allow users to upload multiple
genome objects at once

## [0.11.6] - 2022-01-29
Fixed performance issue with FastaGFF impacting metagenome uploads

Expand Down
4 changes: 2 additions & 2 deletions kbase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ service-language:
python

module-version:
0.11.6
0.11.7

owners:
[jkbaumohl, tgu2]
[jkbaumohl, tgu2, sijiex]
208 changes: 172 additions & 36 deletions lib/GenomeFileUtil/GenomeFileUtilImpl.py

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions lib/GenomeFileUtil/GenomeFileUtilServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,10 @@ def __init__(self):
name='GenomeFileUtil.genbank_to_genome',
types=[dict])
self.method_authentication['GenomeFileUtil.genbank_to_genome'] = 'required' # noqa
self.rpc_service.add(impl_GenomeFileUtil.genbanks_to_genomes,
name='GenomeFileUtil.genbanks_to_genomes',
types=[dict])
self.method_authentication['GenomeFileUtil.genbanks_to_genomes'] = 'required' # noqa
self.rpc_service.add(impl_GenomeFileUtil.genome_to_gff,
name='GenomeFileUtil.genome_to_gff',
types=[dict])
Expand Down
Loading

0 comments on commit e0b1dd3

Please sign in to comment.