Skip to content
Snippets Groups Projects

Fsharp cwl

Merged Dominik Brilhaus requested to merge fsharp-cwl into main
7 files
+ 47
32
Compare changes
  • Side-by-side
  • Inline
Files
7
@@ -4,22 +4,22 @@
#r "nuget: ARCtrl.NET"
#r "nuget: ARCtrl.QueryModel"
#r "nuget: FsSpreadsheet.CsvIO"
open System.IO
open ARCtrl.NET
open ARCtrl
open ARCtrl.QueryModel
open ARCtrl.Helper
open FsSpreadsheet
open FsSpreadsheet.Net
open FsSpreadsheet.CsvIO
// input parameters
// let args : string array = fsi.CommandLineArgs |> Array.tail
// let arcPath = args.[0]
// let assayName = args.[1]
// let startingNodeNum = args.[2] |> int
// let outName = args.[3]
let args : string array = fsi.CommandLineArgs |> Array.tail
let arcPath = args.[0]
let assayName = args.[1]
let startingNodeNum = args.[2] |> int
let outName = args.[3]
type ArcTables with
@@ -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 = 0
let outName = "rnaseq-samples"
// // 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 🤣😀
// 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,7 @@ let clean (a : ARC) =
)
a
// transform all data cells to freetext cells 😀🤣😀😀🤣😀😀🤣😀😀🤣😀😀🤣😀😀🤣😀😀🤣😀
// transform all data cells to freetext cells
let shittify (a : ARC) =
a.ISA.Value.Assays |> Seq.iter (fun a ->
a.Tables
@@ -161,6 +161,8 @@ let wb = new FsSpreadsheet.FsWorkbook()
wb.AddWorksheet ws
// Write to csv
// Write to xlsx
wb.ToXlsxFile ($"{outName}.xlsx")
wb.ToXlsxFile (outName + ".xlsx")
\ No newline at end of file
// Write to csv
wb.ToCsvFile ($"{outName}.csv")
\ No newline at end of file
Loading