Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from ryan-williams/ug
upgrade tests, plugin
- Loading branch information
Showing
20 changed files
with
266 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=1.1.1 | ||
sbt.version=1.1.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
addSbtPlugin("org.hammerlab.sbt" % "base" % "4.4.2") | ||
addSbtPlugin("org.hammerlab.sbt" % "base" % "4.6.1") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package org.hammerlab.genomics.loci | ||
|
||
import caseapp.{ HelpMessage ⇒ M } | ||
import org.hammerlab.genomics.loci.parsing.ParsedLoci | ||
import org.hammerlab.genomics.loci.parsing.ParsedLoci.loadFromPath | ||
import org.hammerlab.genomics.reference.ContigName.Factory | ||
import org.hammerlab.paths.Path | ||
|
||
/** Arguments for accepting a set of loci to restrict variant-calling to. */ | ||
case class Args( | ||
@M("If set, loci to include. Either 'all' or 'contig[:start[-end]],contig[:start[-end]],…'") | ||
loci: Option[String] = None, | ||
|
||
@M("Path to file giving loci to include") | ||
lociFile: Option[Path] = None | ||
) { | ||
def parse( | ||
implicit | ||
factory: Factory | ||
): Option[ParsedLoci] = | ||
(loci, lociFile) match { | ||
case (Some(str), Some(file)) ⇒ | ||
throw new IllegalArgumentException( | ||
"Specify a loci string (--loci) xor file (--loci-file)" | ||
) | ||
case (Some(str), _) => Some(ParsedLoci(str)) | ||
case (_, Some(path)) => Some(loadFromPath(path)) | ||
case _ => | ||
None | ||
} | ||
} |
25 changes: 0 additions & 25 deletions
25
src/main/scala/org/hammerlab/genomics/loci/args/LociArgs.scala
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
src/main/scala/org/hammerlab/genomics/loci/args/LociInput.scala
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package org.hammerlab.genomics.loci | ||
|
||
import org.hammerlab.cmp.CanEq.Cmp | ||
import org.hammerlab.cmp.Cmp | ||
import org.hammerlab.genomics.reference.{ Interval, Locus } | ||
|
||
trait cmps { | ||
// TODO: move this to reference repo | ||
implicit def cmpInterval(implicit cmp: Cmp[(Locus, Locus)]): Cmp.Aux[Interval, cmp.Diff] = Cmp.by[(Locus, Locus), Interval](i ⇒ (i.start, i.end))(cmp) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.