Skip to content
Snippets Groups Projects
Commit 26181b2f authored by Dominik Brilhaus's avatar Dominik Brilhaus
Browse files

adapt isaSampleToRawDataSeq to start from Source (not Sample)

parent effde36d
No related branches found
No related tags found
1 merge request!11Restructure cwl
Pipeline #9300 passed
This commit is part of merge request !11. Comments created here will be created in the context of that merge request.
This diff is collapsed.
No preview for this file type
......@@ -2,17 +2,25 @@
// Dependencies
#r "nuget: ARCtrl.NET"
#r "nuget: ARCtrl"
#r "nuget: ARCtrl.QueryModel"
#r "nuget: FsSpreadsheet.CsvIO"
open ARCtrl.NET
open ARCtrl
open ARCtrl.QueryModel
open ARCtrl.Helper
open FsSpreadsheet.Net
open FsSpreadsheet.CsvIO
// test parameters
// let source = __SOURCE_DIRECTORY__
// let arcPath = System.IO.Path.Combine(source, "../../")
// let assayName = "Talinum_RNASeq_minimal"
// let startingNodeNum = 0
// let outName = "rnaseq-samples"
// input parameters
let args : string array = fsi.CommandLineArgs |> Array.tail
......@@ -31,13 +39,6 @@ type ArcTables with
)
|> ArcTables
// // test parameters
// let source = __SOURCE_DIRECTORY__
// let arcPath = Path.Combine(source, "../../")
// let assayName = "Talinum_RNASeq_minimal"
// let startingNodeNum = 0
// let outName = "rnaseq-samples"
// Load ARC
// Remove all tables with either an input or output column missing
......@@ -97,8 +98,6 @@ let shittify (a : ARC) =
let arc = ARC.load(arcPath) |> clean |> shittify
let inv = arc.ISA.Value
// Load first data node
......@@ -108,7 +107,11 @@ let firstData = inv.GetAssay(assayName).FirstData
// Create headers for output table
let headers = [
CompositeHeader.Input IOType.Sample
CompositeHeader.Input IOType.Source
// CompositeHeader.Input IOType.Sample
for v in inv.ArcTables.IgnoreShitty().ValuesOf firstData.[0].Name do
if v.IsCharacteristicValue then
CompositeHeader.Characteristic v.Category
......@@ -128,7 +131,7 @@ let headers = [
let getRow (d: QNode) =
[|
CompositeCell.createFreeText (inv.ArcTables.SamplesOf d).[startingNodeNum].Name
CompositeCell.createFreeText (inv.ArcTables.SourcesOf d).[startingNodeNum].Name
for v in inv.ArcTables.ValuesOf d do
if v.HasUnit then
......@@ -165,4 +168,4 @@ wb.AddWorksheet ws
wb.ToXlsxFile ($"{outName}.xlsx")
// Write to csv
wb.ToCsvFile ($"{outName}.csv")
\ No newline at end of file
wb.ToCsvFile ($"{outName}.csv")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment