[Docs] Querymodel
Opened this issue ยท 3 comments
Found undocumented code? Please link it here
The newly implemented functionality in the query model has yet to be documented and thoroughly tested.
Recently, I added a test arc to the test repo and plan to add tests and documentation in the following days:
Tests that came to my mind
- Can I query all studies?
- Can I query all assays?
- Can I query all assays that belong to a certain study?
- Can I query all sheet names in an assay?
- Can I query all last nodes of a study?
- Can I query all last nodes of an assay?
- With the last nodes, do I get the correct parameter/factor/characteristic values in individual assay / study sheets?"
given the current test Arc (.\tests\ARCtrl.Querymodel.Tests\TestObjects\TestArc) I made this observation:
i.ArcTables.LastNodes
|> List.ofSeq
|> List.map (fun x -> x.Name)
returns:
["sampleOutCold.txt"; "sampleOutCold.txt"; "sampleOutCold.txt";
"sampleOutCold.txt"; "sampleOutCold.txt"; "sampleOutCold.txt";
"sampleOutHeat.txt"; "sampleOutHeat.txt"; "sampleOutHeat.txt";
"sampleOutHeat.txt"; "sampleOutHeat.txt"; "sampleOutHeat.txt"]
but I think it should return:
val it: string list = ["sampleOutCold.txt"; "sampleOutHeat.txt"]
in this special case, since all last nodes are samples, the behaviour should mimic:
i.ArcTables.LastSamples
|> List.map (fun x -> x.Name)
related:
let lastNodesHeat = i.GetAssay("MSEval_Heat").LastNodes |> Seq.map (fun x -> x.Name) |> Array.ofSeq
returns:
[|"sampleOutHeat.txt"; "sampleOutHeat.txt"; "sampleOutHeat.txt";
"sampleOutHeat.txt"; "sampleOutHeat.txt"; "sampleOutHeat.txt"|]
while:
let lastSamplesHeat = i.GetAssay("MSEval_Heat").LastSamples |> List.map (fun x -> x.Name) |> Array.ofSeq
correctly returns:
val lastSamplesHeat: string array = [|"sampleOutHeat.txt"|]
let nodeName = "sampleOutHeat.txt"
let protocolName = "MS"
i.ArcTables.ValuesOf(nodeName,protocolName)
|> Seq.toList
|> List.map (fun x -> x.NameText)
should return all the values related to sampleOutHeat.txt in this sheet, however it returns: []