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
Checking pipeline status
This diff is collapsed.
No preview for this file type
...@@ -2,17 +2,25 @@ ...@@ -2,17 +2,25 @@
// Dependencies // Dependencies
#r "nuget: ARCtrl.NET" #r "nuget: ARCtrl"
#r "nuget: ARCtrl.QueryModel" #r "nuget: ARCtrl.QueryModel"
#r "nuget: FsSpreadsheet.CsvIO" #r "nuget: FsSpreadsheet.CsvIO"
open ARCtrl.NET
open ARCtrl open ARCtrl
open ARCtrl.QueryModel open ARCtrl.QueryModel
open ARCtrl.Helper open ARCtrl.Helper
open FsSpreadsheet.Net open FsSpreadsheet.Net
open FsSpreadsheet.CsvIO 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 // input parameters
let args : string array = fsi.CommandLineArgs |> Array.tail let args : string array = fsi.CommandLineArgs |> Array.tail
...@@ -31,13 +39,6 @@ type ArcTables with ...@@ -31,13 +39,6 @@ type ArcTables with
) )
|> ArcTables |> 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 // Load ARC
// Remove all tables with either an input or output column missing // Remove all tables with either an input or output column missing
...@@ -97,8 +98,6 @@ let shittify (a : ARC) = ...@@ -97,8 +98,6 @@ let shittify (a : ARC) =
let arc = ARC.load(arcPath) |> clean |> shittify let arc = ARC.load(arcPath) |> clean |> shittify
let inv = arc.ISA.Value let inv = arc.ISA.Value
// Load first data node // Load first data node
...@@ -108,7 +107,11 @@ let firstData = inv.GetAssay(assayName).FirstData ...@@ -108,7 +107,11 @@ let firstData = inv.GetAssay(assayName).FirstData
// Create headers for output table // Create headers for output table
let headers = [ 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 for v in inv.ArcTables.IgnoreShitty().ValuesOf firstData.[0].Name do
if v.IsCharacteristicValue then if v.IsCharacteristicValue then
CompositeHeader.Characteristic v.Category CompositeHeader.Characteristic v.Category
...@@ -128,7 +131,7 @@ let headers = [ ...@@ -128,7 +131,7 @@ let headers = [
let getRow (d: QNode) = 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 for v in inv.ArcTables.ValuesOf d do
if v.HasUnit then if v.HasUnit then
...@@ -165,4 +168,4 @@ wb.AddWorksheet ws ...@@ -165,4 +168,4 @@ wb.AddWorksheet ws
wb.ToXlsxFile ($"{outName}.xlsx") wb.ToXlsxFile ($"{outName}.xlsx")
// Write to csv // Write to csv
wb.ToCsvFile ($"{outName}.csv") wb.ToCsvFile ($"{outName}.csv")
\ No newline at end of file
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