-
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 #2 from biocad/develop
version 0.1.0.2: BioSources added
- Loading branch information
Showing
4 changed files
with
28 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{-# LANGUAGE OverloadedStrings #-} | ||
|
||
module System.BCD.Config.BioSources | ||
( BioSourcesConfig (..) | ||
, FromJsonConfig (..) | ||
) where | ||
|
||
import Data.Aeson.Picker ((|--)) | ||
import System.BCD.Config (FromJsonConfig (..), getConfigText) | ||
|
||
-- | This class contains information where to find files that are related to | ||
-- semantic common used library [bio-sources](https://github.com/biocad/bio-sources). | ||
-- That library includes dihedral angles, kmers, ideal aminoacids and functions to work with them. | ||
newtype BioSourcesConfig = BioSourcesConfig { bioSourcesPath :: FilePath } | ||
deriving (Show, Read, Eq) | ||
|
||
instance FromJsonConfig BioSourcesConfig where | ||
fromJsonConfig = do | ||
jsonText <- getConfigText | ||
let path = jsonText |-- ["deploy", "fs", "bio-sources"] | ||
pure $ BioSourcesConfig path |
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