Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Facultative CAM in Talinum
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dominik Brilhaus
Facultative CAM in Talinum
Commits
7333e2b6
Commit
7333e2b6
authored
5 months ago
by
Dominik Brilhaus
Browse files
Options
Downloads
Patches
Plain Diff
fix issue with data nodes now being objects (not free text)
parent
ab95fefd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
workflows/isaSampleToRawDataSeq/isaSampleToRawDataSeq.fsx
+44
-7
44 additions, 7 deletions
workflows/isaSampleToRawDataSeq/isaSampleToRawDataSeq.fsx
with
44 additions
and
7 deletions
workflows/isaSampleToRawDataSeq/isaSampleToRawDataSeq.fsx
+
44
−
7
View file @
7333e2b6
...
...
@@ -31,16 +31,16 @@ type ArcTables with
)
|>
ArcTables
// test parameters
let
source
=
__
SOURCE_DIRECTORY__
let
arcPath
=
Path
.
Combine
(
source
,
"../../"
)
let
assayName
=
"Talinum_RNASeq_minimal"
let
startingNodeNum
=
1
let
startingNodeNum
=
0
let
outName
=
"rnaseq-samples"
// Load ARC
// Remove all tables with either an input or output column missing 🤣😀
let
clean
(
a
:
ARC
)
=
a
.
ISA
.
Value
.
Assays
|>
Seq
.
iter
(
fun
a
->
a
.
Tables
...
...
@@ -64,7 +64,39 @@ let clean (a : ARC) =
)
a
let
arc
=
ARC
.
load
(
arcPath
)
|>
clean
// transform all data cells to freetext cells 😀🤣😀😀🤣😀😀🤣😀😀🤣😀😀🤣😀😀🤣😀😀🤣😀
let
shittify
(
a
:
ARC
)
=
a
.
ISA
.
Value
.
Assays
|>
Seq
.
iter
(
fun
a
->
a
.
Tables
|>
Seq
.
toArray
|>
Seq
.
iter
(
fun
t
->
t
.
Values
|>
Seq
.
toArray
|>
Seq
.
iter
(
fun
kv
->
if
kv
.
Value
.
isData
then
t
.
Values
.[
kv
.
Key
]
<-
CompositeCell
.
createFreeText
(
kv
.
Value
.
AsData
.
NameText
)
)
)
)
a
.
ISA
.
Value
.
Studies
|>
Seq
.
iter
(
fun
s
->
s
.
Tables
|>
Seq
.
toArray
|>
Seq
.
iter
(
fun
t
->
t
.
Values
|>
Seq
.
toArray
|>
Seq
.
iter
(
fun
kv
->
if
kv
.
Value
.
isData
then
t
.
Values
.[
kv
.
Key
]
<-
CompositeCell
.
createFreeText
(
kv
.
Value
.
AsData
.
NameText
)
)
)
)
a
let
arc
=
ARC
.
load
(
arcPath
)
|>
clean
|>
shittify
let
inv
=
arc
.
ISA
.
Value
...
...
@@ -73,6 +105,7 @@ let inv = arc.ISA.Value
let
firstData
=
inv
.
GetAssay
(
assayName
).
FirstData
// Create headers for output table
let
headers
=
[
CompositeHeader
.
Input
IOType
.
Sample
...
...
@@ -95,7 +128,6 @@ let headers = [
let
getRow
(
d
:
QNode
)
=
[|
CompositeCell
.
createFreeText
(
inv
.
ArcTables
.
SamplesOf
d
).[
startingNodeNum
].
Name
for
v
in
inv
.
ArcTables
.
ValuesOf
d
do
...
...
@@ -104,7 +136,7 @@ let getRow (d: QNode) =
else
CompositeCell
.
Term
(
v
.
Value
.
AsOntology
()
)
CompositeCell
.
FreeText
d
.
Name
CompositeCell
.
Data
(
Data
(
name
=
d
.
Name
))
|]
...
...
@@ -113,6 +145,12 @@ let getRow (d: QNode) =
let
t
=
ArcTable
.
init
"FullTable"
t
.
Headers
<-
ResizeArray
headers
let
d
=
firstData
.
Head
inv
.
ArcTables
.
SamplesOf
d
for
d
in
firstData
do
t
.
AddRow
(
getRow
d
)
...
...
@@ -125,5 +163,4 @@ wb.AddWorksheet ws
// Write to csv
// wb.To (outName + ".tsv", Separator = '\t')
wb
.
ToXlsxFile
(
outName
+
".xlsx"
)
wb
.
ToXlsxFile
(
outName
+
".xlsx"
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment