Skip to content
代码片段 群组 项目
提交 bb595fd3 编辑于 作者: Bruce Walker's avatar Bruce Walker
浏览文件

Clean up.

Version 1.22
上级 8159bbb2
无相关合并请求
......@@ -222,20 +222,17 @@ class GenomeFile(val referenceFile: File, val targets : String = "") {
val targetHelp = "Target string must be of the form \"element:start-stop\""
val targets = for (target <- targetString.split(",")) yield {
// look for trailing coordinate spec
val pattern = "^\\s*(.+):([0-9]+)-([0-9]+)\\s*$".r
val (contig_name, start, stop) = try {
// look for trailing coordinate spec
val pattern = "^\\s*(.+):([0-9]+)-([0-9]+)\\s*$".r
val pattern(contig_name, start, stop) = target
(contig_name, start.toInt, stop.toInt)
} catch {
//use entire contig to define a region if start and stop are not specified
case e: MatchError => (target, 1, contigMap(target).length)
}
val contig = contigMap(contig_name)
// start and length must both be specified, or neither specified
//use entire contig to define a region if start and stop are not specified
val region = new GenomeRegion(contig, start, stop)
println("Target: " + region)
......
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册