Comments (4)
There is no code executed from this library to get the worksheet (also true for #36 ) - it is just FsWorkbook.tryGetWorksheetByName
and getWorksheetByName
guarded with a try ... with
. So this looks like a FsSpreadsheet issue to me.
ARCTokenization/src/ARCTokenization/Workbook.fs
Lines 20 to 40 in 4c93bfc
We should definitely add integration tests for these functions though.
from arctokenization.
On another note, possible workheet names should all be defined by structural ontology
from arctokenization.
Hm...
Try this.
#r "nuget: FsSpreadsheet"
#r "nuget: FsSpreadsheet.ExcelIO"
open FsSpreadsheet
open FsSpreadsheet.ExcelIO
let wb = FsWorkbook.fromXlsxFile @"C:\Users\<you>\Downloads\isa.study.xlsx"
FsWorkbook.tryGetWorksheetByName "Study" wb
Le output:
val it: FsWorksheet option =
Some
FsSpreadsheet.FsWorksheet
{CellCollection = FsSpreadsheet.FsCellsCollection;
Columns = seq
[seq
[A1 : STUDY METADATA | String;
A2 : Study Identifier | String;
A3 : Study Title | String;
A4 : Study Description | String; ...];
seq
[B2 : experiment1_material | String;
B3 : Prototype for experimental data | String;
B4 : In this a devised study to have an exemplary experimental material description. | String;
B5 : | String; ...]];
Name = "Study";
Rows = seq
[seq [A1 : STUDY METADATA | String];
seq
[A2 : Study Identifier | String;
B2 : experiment1_material | String];
seq
[A3 : Study Title | String;
B3 : Prototype for experimental data | String];
seq
[A4 : Study Description | String;
B4 : In this a devised study to have an exemplary experimental material description. | String];
...];
Tables = seq [];}
Then try this:
FsWorkbook.tryGetWorksheetByName "Study" wb
|> Option.defaultValue (FsWorkbook.getWorksheetByName "isa_study" wb)
outputs:
> FsWorkbook.tryGetWorksheetByName "Study" wb
- |> Option.defaultValue (FsWorkbook.getWorksheetByName "isa_study" wb);;
System.Exception: FsWorksheet with name isa_study is not present in the FsWorkbook.
at FsSpreadsheet.FsWorkbook.GetWorksheetByName(String sheetName)
at <StartupCode$FSI_0012>.$FSI_0012.main@() in C:\Users\revil\Untitled-1:line 13
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
Stopped due to error
The fuck is this?! 😳
from arctokenization.
Ahh, nvm.
It tries to evaluate FsWorkbook.getWorksheetByName "isa_study" wb
, no matter if FsWorkbook.tryGetWorksheetByName "Study" wb
is Some
or None
.
So, care!: Option.defaultValue
is not like &&
or ||
. It doesn't stop evaluating just because it's Some
.
from arctokenization.
Related Issues (20)
- Use new equals overrides for testing CvParam equality in ARCTokenizarion tests
- Transfer ArcGraph into ARCTokenization
- `Assay.parseMetadataSheetfromFile` does not parse metadata sheet: says worksheet is not present
- [BUG] Annotation table parsing can result in CvParam lists of incorrect length when parsing incorrect building blocks HOT 1
- [Discussion] AnnotationTable.TokenizedAnnotationTable HOT 4
- [Feature Request] Annotation Table Graph
- [Discussion] is it really necessary to nest static ontology terms HOT 2
- [BUG] Study structural ontology has incorrect ID links in some cases HOT 2
- [BUG] When parsing User Comments, the name of the comment (not the value!) gets lost
- Make ARCMock accessible for consumption in other libraries HOT 1
- Refactor FileSystem token-based metadata parsing from ValidationPackage POC into ARCTokenization
- [BUG] `ARCMock.AssayMetadataTokens` misses Assay Technology Type TAN HOT 1
- `ARCMock` does not allow adding of User Comments HOT 1
- ProcessGraph parsing function (Study & Assay) only works with full paths but a function for tokens (like those for metadata sheets) would be nice
- Feature Request - Enhanced Tokenization for Specific Folders and Files
- Add integration tests for parsing ISA files from tokens
- Add CodeGenerator for structural ontologies HOT 1
- Move ControlledVocabulary to own repo HOT 1
- Use OBO.NET.CodeGeneration for structural ontology generation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arctokenization.