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

v1.3.1 Bug Fix #109

Merged
merged 1 commit into from
Feb 12, 2025
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
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ github_pages_url <- description$GITHUB_PAGES

<p style="font-size: 16px;"><em>Public Database Submission Pipeline</em></p>

**Beta Version**: v1.3.0. This pipeline is currently in Beta testing, and issues could appear during submission. Please use it at your own risk. Feedback and suggestions are welcome!
**Beta Version**: v1.3.1. This pipeline is currently in Beta testing, and issues could appear during submission. Please use it at your own risk. Feedback and suggestions are welcome!

**General Disclaimer**: This repository was created for use by CDC programs to collaborate on public health related projects in support of the [CDC mission](https://www.cdc.gov/about/organization/mission.htm). GitHub is not hosted by the CDC, but is a third party website used by CDC and its partners to share information and collaborate on software. CDC use of GitHub does not imply an endorsement of any one particular service, product, or enterprise.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<!-- ![GitHub last commit](https://img.shields.io/github/last-commit/montilab/cadra) -->

**Beta Version**: 1.3.0. This pipeline is currently in Beta testing, and
**Beta Version**: 1.3.1. This pipeline is currently in Beta testing, and
issues could appear during submission. Please use it at your own risk.
Feedback and suggestions are welcome\!

Expand Down
2 changes: 1 addition & 1 deletion docs/app.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
PROG_DIR: str = os.path.dirname(os.path.abspath(__file__))

# SeqSender version
VERSION: str = "1.3.0 (Beta)"
VERSION: str = "1.3.1 (Beta)"

# Organism options with unique submission options
ORGANISM_CHOICES: List[str] = ["FLU", "COV", "POX", "ARBO", "RSV", "OTHER"]
Expand Down
2 changes: 1 addition & 1 deletion shiny/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
header = (
ui.card_header(
ui.HTML(
"""<p><strong>Beta Version</strong>: 1.3.0. This pipeline is currently in Beta testing, and issues could appear during submission. Please use it at your own risk. Feedback and suggestions are welcome!</p>"""
"""<p><strong>Beta Version</strong>: 1.3.1. This pipeline is currently in Beta testing, and issues could appear during submission. Please use it at your own risk. Feedback and suggestions are welcome!</p>"""
)
),
)
Expand Down
15 changes: 12 additions & 3 deletions tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import pathlib
import pandas as pd
from settings import PROG_DIR
from typing import List, Dict, Any, Optional, Union
from typing import List, Dict, Any, Optional, Union, Set
import file_handler
import json
import pandera
Expand All @@ -31,12 +31,12 @@ def get_config(config_file: str, databases: List[str]) -> Dict[str, Any]:
if not submission_portals:
print("Error: Submission portals list cannot be empty.", file=sys.stderr)
sys.exit(1)
submission_schema = "_".join(submission_portals)
submission_schema_file = get_submission_schema_config_name(submission_portals=submission_portals)
# Read in user config file
config_dict = file_handler.load_yaml(yaml_type = "Config file", yaml_path = config_file)
# Check if yaml forms dictionary
if type(config_dict) is dict:
schema = eval(open(os.path.join(PROG_DIR, "config", "seqsender", "config_file", (submission_schema + "_schema.py")), 'r').read())
schema = eval(open(os.path.join(PROG_DIR, "config", "seqsender", "config_file", submission_schema_file), 'r').read())
database_specific_config_schema_updates(schema, databases)
validator = Validator(schema)
# Validate based on schema
Expand All @@ -53,6 +53,15 @@ def get_config(config_file: str, databases: List[str]) -> Dict[str, Any]:
print("Error: Config file is incorrect. File must be a valid yaml format.", file=sys.stderr)
sys.exit(1)

def get_submission_schema_config_name(submission_portals: Set[str]) -> str:
submission_schema_file_name = ""
if "ncbi" in submission_portals:
submission_schema_file_name += "ncbi_"
if "gisaid" in submission_portals:
submission_schema_file_name += "gisaid_"
submission_schema_file_name += "schema.py"
return submission_schema_file_name

def validate_submission_position(config_dict: Dict[str, Any]):
genbank_position = get_submission_position(config_dict=config_dict, database="GENBANK")
gisaid_position = get_submission_position(config_dict=config_dict, database="GISAID")
Expand Down