Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
210ba06
commit 66daaec
Showing
33 changed files
with
322 additions
and
430 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
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.0.4 | ||
sbt.version=1.1.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 |
---|---|---|
@@ -1 +1 @@ | ||
addSbtPlugin("org.hammerlab.sbt" % "base" % "4.0.1") | ||
addSbtPlugin("org.hammerlab.sbt" % "base" % "4.4.3") |
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
36 changes: 36 additions & 0 deletions
36
src/main/scala/org/hammerlab/genomics/readsets/args/Base.scala
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,36 @@ | ||
package org.hammerlab.genomics.readsets.args | ||
|
||
import hammerlab.path._ | ||
import org.hammerlab.genomics.readsets.Inputs | ||
import org.hammerlab.genomics.readsets.args.NoSequenceDictionaryArgs | ||
import org.hammerlab.genomics.readsets.io.{ Input, ReadFilterArgs, Sample } | ||
|
||
trait InputArgs { | ||
self: Base ⇒ | ||
|
||
def paths: Array[Path] | ||
|
||
def sampleNames: Array[Sample.Name] | ||
|
||
lazy val inputs: Inputs = | ||
paths | ||
.indices | ||
.map { | ||
i ⇒ | ||
Input( | ||
i, | ||
if (i < sampleNames.length) | ||
sampleNames(i) | ||
else | ||
paths(i).toString, | ||
paths(i) | ||
) | ||
} | ||
} | ||
|
||
trait Base | ||
extends InputArgs{ | ||
def readFilterArgs: ReadFilterArgs | ||
def noSequenceDictionaryArgs: NoSequenceDictionaryArgs | ||
def inputs: Inputs | ||
} |
10 changes: 10 additions & 0 deletions
10
src/main/scala/org/hammerlab/genomics/readsets/args/NoSequenceDictionaryArgs.scala
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.readsets.args | ||
|
||
import caseapp.{ HelpMessage ⇒ M } | ||
|
||
/** Argument for using / not using sequence dictionaries to get contigs and lengths. */ | ||
case class NoSequenceDictionaryArgs( | ||
@M("If set, get contigs and lengths directly from reads instead of from sequence dictionary.") | ||
noSequenceDictionary: Boolean = false | ||
) | ||
|
9 changes: 9 additions & 0 deletions
9
src/main/scala/org/hammerlab/genomics/readsets/args/PathPrefixArg.scala
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,9 @@ | ||
package org.hammerlab.genomics.readsets.args | ||
|
||
import caseapp.{ HelpMessage ⇒ M } | ||
import org.hammerlab.genomics.readsets.args.path.Prefix | ||
|
||
case class PathPrefixArg( | ||
@M("When set, relative paths will be prefixed with this path") | ||
dir: Option[Prefix] = None | ||
) |
11 changes: 11 additions & 0 deletions
11
src/main/scala/org/hammerlab/genomics/readsets/args/PathsArgs.scala
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,11 @@ | ||
package org.hammerlab.genomics.readsets.args | ||
|
||
import caseapp.{ HelpMessage ⇒ M, Recurse ⇒ R } | ||
import org.hammerlab.genomics.readsets.args.path.UnprefixedPath | ||
|
||
case class PathsArgs( | ||
@R prefix: PathPrefixArg, | ||
|
||
@M("Paths to sets of reads: FILE1 FILE2 FILE3") | ||
unprefixedPaths: Array[UnprefixedPath] = Array() | ||
) |
12 changes: 12 additions & 0 deletions
12
src/main/scala/org/hammerlab/genomics/readsets/args/ReferenceArgs.scala
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,12 @@ | ||
package org.hammerlab.genomics.readsets.args | ||
|
||
import caseapp.{ HelpMessage ⇒ M } | ||
import org.hammerlab.genomics.readsets.args.path.UnprefixedPath | ||
|
||
case class ReferenceArgs( | ||
@M("Path to a reference FASTA file") | ||
referencePath: UnprefixedPath, | ||
|
||
@M("Treat the reference fasta as a \"partial FASTA\", comprised of segments (possibly in the interior) of contigs.") | ||
partialReference: Boolean = false | ||
) |
31 changes: 31 additions & 0 deletions
31
src/main/scala/org/hammerlab/genomics/readsets/args/SingleSampleArgs.scala
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.readsets.args | ||
|
||
import caseapp.{ HelpMessage ⇒ M, Recurse ⇒ R } | ||
import hammerlab.path._ | ||
import org.hammerlab.genomics.readsets.args.Base | ||
import org.hammerlab.genomics.readsets.args.path.UnprefixedPath | ||
import org.hammerlab.genomics.readsets.io.ReadFilterArgs | ||
import org.hammerlab.genomics.readsets.io.Sample.Name | ||
|
||
/** Argument for accepting a single set of reads (for e.g. germline variant calling). */ | ||
case class SingleSampleArgs( | ||
@R readFilterArgs: ReadFilterArgs = ReadFilterArgs(), | ||
@R noSequenceDictionaryArgs: NoSequenceDictionaryArgs = NoSequenceDictionaryArgs(), | ||
@M("Path to aligned reads") | ||
reads: Path | ||
) extends Base { | ||
override def paths: Array[Path] = Array( reads ) | ||
override def sampleNames: Array[Name] = Array("reads") | ||
} | ||
|
||
/** [[SingleSampleArgs]] implementation that supports path-prefixing. */ | ||
case class PrefixedSingleSampleArgs( | ||
@R readFilterArgs: ReadFilterArgs, | ||
@R noSequenceDictionaryArgs: NoSequenceDictionaryArgs, | ||
@R prefix: PathPrefixArg, | ||
@M("Path to aligned reads") | ||
reads: UnprefixedPath | ||
) extends Base { | ||
override def paths: Array[Path] = Array( reads.buildPath(prefix.dir) ) | ||
override def sampleNames: Array[Name] = Array("reads") | ||
} |
Oops, something went wrong.