Commit 00c2dfd 1 parent 218aa4f commit 00c2dfd Copy full SHA for 00c2dfd
File tree 3 files changed +9
-10
lines changed
3 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ A command-line tool for genomic-wide association studies (GWAS) data validation
4
4
5
5
## Features
6
6
7
- - Validate:
8
- - Input: GWAS Submission template that contains top associations
7
+ - Validate:
8
+ - Input: File path of GWAS Submission template that contains top associations
9
9
- Output: Validation report of top associations
10
10
11
11
## Installation
@@ -102,4 +102,3 @@ poetry run pre-commit run --all-files
102
102
## License
103
103
104
104
[ License] ( LICENSE )
105
-
Original file line number Diff line number Diff line change @@ -33,10 +33,10 @@ def cli() -> None:
33
33
34
34
35
35
@cli .command ()
36
- @click .argument ("file " , type = click .Path (exists = True ))
37
- def validate (file : str ) -> None :
36
+ @click .argument ("_file " , type = click .Path (exists = True ))
37
+ def validate (_file : str ) -> None :
38
38
"""Validate SNPs in an Excel file."""
39
- file_path = Path (file )
39
+ file_path = Path (_file )
40
40
41
41
console .print (f"Starting validation of [bold]{ file_path } [/]" )
42
42
@@ -50,7 +50,7 @@ def validate(file: str) -> None:
50
50
51
51
try :
52
52
validator = SnpValidator ()
53
- result = validator .validate_snps (file )
53
+ result = validator .validate_snps (file_path )
54
54
progress .update (task , completed = True )
55
55
except Exception as e :
56
56
progress .update (
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ def __init__(self) -> None:
29
29
"""
30
30
self .ensembl_api_url = "https://rest.ensembl.org/variation/human/"
31
31
32
- def _get_study_tags (self , file_path : str ) -> Set :
32
+ def _get_study_tags (self , file_path : Path ) -> Set :
33
33
# Read study sheet to get study tags
34
34
console .print ("[info]Reading study tags...[/]" )
35
35
try :
@@ -44,7 +44,7 @@ def _get_study_tags(self, file_path: str) -> Set:
44
44
print_error (f"Error reading study sheet: { str (e )} " )
45
45
return set ()
46
46
47
- def _get_schema_version (self , file_path : str ) -> str :
47
+ def _get_schema_version (self , file_path : Path ) -> str :
48
48
"""Get the schema version from the meta sheet of the Excel file"""
49
49
console .print ("[info]Reading schema version...[/]" )
50
50
meta_df = pd .read_excel (file_path , sheet_name = "meta" )
@@ -224,7 +224,7 @@ def _validate_associations_against_template(
224
224
pd .DataFrame (invalid_rows ) if invalid_rows else pd .DataFrame ()
225
225
)
226
226
227
- def validate_snps (self , file_path : str ) -> bool :
227
+ def validate_snps (self , file_path : Path ) -> bool :
228
228
"""
229
229
Validate SNPs from an Excel file
230
230
You can’t perform that action at this time.
0 commit comments