-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from bento-platform/feat/impl-ref-service
feat!: use reference service to provide assembly ID
- Loading branch information
Showing
15 changed files
with
62 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,6 @@ | ||
package assemblyId | ||
|
||
import ( | ||
"gohan/api/models/constants" | ||
"strings" | ||
) | ||
|
||
const ( | ||
Unknown constants.AssemblyId = "Unknown" | ||
|
||
GRCh38 constants.AssemblyId = "GRCh38" | ||
GRCh37 constants.AssemblyId = "GRCh37" | ||
NCBI36 constants.AssemblyId = "NCBI36" | ||
NCBI35 constants.AssemblyId = "NCBI35" | ||
NCBI34 constants.AssemblyId = "NCBI34" | ||
Other constants.AssemblyId = "Other" | ||
GRCh38 string = "GRCh38" | ||
GRCh37 string = "GRCh37" | ||
) | ||
|
||
func CastToAssemblyId(text string) constants.AssemblyId { | ||
switch strings.ToLower(text) { | ||
case "grch38": | ||
return GRCh38 | ||
case "grch37": | ||
return GRCh37 | ||
case "ncbi36": | ||
return NCBI36 | ||
case "ncbi35": | ||
return NCBI35 | ||
case "ncbi34": | ||
return NCBI34 | ||
case "other": | ||
return Other | ||
default: | ||
return Unknown | ||
} | ||
} | ||
|
||
func IsKnownAssemblyId(text string) bool { | ||
// attempt to cast to assemblyId and | ||
// return if unknown assemblyId | ||
return CastToAssemblyId(text) != Unknown | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.