You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 25, 2018. It is now read-only.
Copy file name to clipboardExpand all lines: src/main/scala/org/phenopackets/pxftools/command/Common.scala
+7-6Lines changed: 7 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -30,15 +30,16 @@ trait Common extends Command {
30
30
31
31
varout= opt[String](description ="Output file. Omit to write to standard out.", default ="")
32
32
33
-
varinformat= opt[Option[String]](description ="Input format. By default both yaml and json will be attempted. Set the input format to one of:\nyaml\njson\nhpo-phenote")
33
+
varinformat= opt[String](description ="Input format. By default both yaml and json will be attempted. Set the input format to one of:\nyaml\njson\nhpo-phenote", default ="guess")
34
34
varoutformat= opt[String](description ="Output format. Set the output format to one of:\nyaml\njson\nturtle", default ="yaml")
35
35
36
-
definputReader:Option[PhenoPacketReader] = informat.map(_ match {
37
-
case"yaml"=>YamlReader.readInputStream
38
-
case"json"=>JsonReader.readInputStream
39
-
case"hpo-phenote"=>HPOAnnotations.read
36
+
definputReader:Option[PhenoPacketReader] = informat match {
37
+
case"yaml"=>Option(YamlReader.readInputStream)
38
+
case"json"=>Option(JsonReader.readInputStream)
39
+
case"hpo-phenote"=>Option(HPOAnnotations.read)
40
+
case"guess"=>None
40
41
case _ =>thrownewParsingException("Invalid input format.")
41
-
})
42
+
}
42
43
43
44
defoutputWriter:PhenoPacketWriter= outformat match {
0 commit comments