Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Julien Moutinho
haskell-gargantext
Commits
13c81a8c
Commit
13c81a8c
authored
Jan 20, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Phylo][WIP] File Format parameters.
parent
08d3adb7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
Phylo.hs
src/Gargantext/Viz/Phylo.hs
+33
-0
No files found.
src/Gargantext/Viz/Phylo.hs
View file @
13c81a8c
...
...
@@ -28,6 +28,7 @@ one 8, e54847.
module
Gargantext.Viz.Phylo
where
import
Control.Lens
(
makeLenses
)
import
Data.Aeson.TH
(
deriveJSON
)
import
Data.Maybe
(
Maybe
)
import
Data.Text
(
Text
)
...
...
@@ -37,6 +38,28 @@ import Gargantext.Database.Schema.Ngrams (NgramsId)
import
Gargantext.Core.Utils.Prefix
(
unPrefix
)
import
Gargantext.Prelude
------------------------------------------------------------------------
data
PhyloFormat
=
PhyloFormat
{
_phyloFormat_parm
::
PhyloParam
,
_phyloFormat_data
::
Phylo
}
deriving
(
Generic
)
-- | .phylo parameters
data
PhyloParam
=
PhyloParam
{
_phyloParam_version
::
Text
-- Double ?
,
_phyloParam_software
::
Software
,
_phyloParam_params
::
Hash
}
deriving
(
Generic
)
type
Hash
=
Text
-- | Software
-- TODO move somewhere since it is generic
data
Software
=
Software
{
_software_name
::
Text
,
_software_version
::
Text
}
deriving
(
Generic
)
------------------------------------------------------------------------
-- | Phylo datatype descriptor of a phylomemy
-- Duration : time Segment of the whole phylomemy (start,end)
...
...
@@ -103,8 +126,18 @@ type PhyloGroupId = (PhyloLevelId, Int)
type
Edge
=
(
PhyloGroupId
,
Weight
)
type
Weight
=
Double
-- | Lenses
makeLenses
''
P
hylo
makeLenses
''
P
hyloParam
makeLenses
''
P
hyloFormat
makeLenses
''
S
oftware
-- | JSON instances
$
(
deriveJSON
(
unPrefix
"_phylo_"
)
''
P
hylo
)
$
(
deriveJSON
(
unPrefix
"_phylo_period"
)
''
P
hyloPeriod
)
$
(
deriveJSON
(
unPrefix
"_phylo_level"
)
''
P
hyloLevel
)
$
(
deriveJSON
(
unPrefix
"_phylo_group"
)
''
P
hyloGroup
)
--
$
(
deriveJSON
(
unPrefix
"_software_"
)
''
S
oftware
)
$
(
deriveJSON
(
unPrefix
"_phyloParam_"
)
''
P
hyloParam
)
$
(
deriveJSON
(
unPrefix
"_phyloFormat_"
)
''
P
hyloFormat
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment