Class/Object

dagr.commons

CommonsDef

Related Docs: object CommonsDef | package commons

Permalink

class CommonsDef extends AnyRef

Object that is designed to be imported with import CommonsDef._ in any/all classes much like the way that scala.PreDef is imported in all files automatically.

New methods, types and objects should not be added to this class lightly as they will pollute the namespace of any classes which import it.

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CommonsDef
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CommonsDef()

    Permalink

Type Members

  1. type DirPath = Path

    Permalink

    Represents a path to directory.

  2. type FilePath = Path

    Permalink

    Represents a path to a file (not a directory) that doesn't have a more specific type.

  3. type FilenamePrefix = String

    Permalink

    A String that represents the prefix or basename of a filename.

  4. type PathPrefix = Path

    Permalink

    Represents a full path including directories, that is intended to be used as a prefix for generating file paths.

  5. type PathToBam = Path

    Permalink

    Represents a path to a BAM (or SAM or CRAM) file.

  6. type PathToFasta = Path

    Permalink

    Represents a path to a Reference FASTA file.

  7. type PathToFastq = Path

    Permalink

    Represents a path to a FASTQ file (optionally gzipped).

  8. type PathToIntervals = Path

    Permalink

    Represents a path to an intervals file (IntervalList or BED).

  9. type PathToVcf = Path

    Permalink

    Represents a path to a VCF/BCF/VCF.gz.

  10. implicit class SafelyClosable extends AnyRef

    Permalink

    Implicit class that wraps a closeable and provides a safelyClose method that will not throw any exception.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from CommonsDef to any2stringadd[CommonsDef] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (CommonsDef, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from CommonsDef to ArrowAssoc[CommonsDef] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def ensuring(cond: (CommonsDef) ⇒ Boolean, msg: ⇒ Any): CommonsDef

    Permalink
    Implicit information
    This member is added by an implicit conversion from CommonsDef to Ensuring[CommonsDef] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  9. def ensuring(cond: (CommonsDef) ⇒ Boolean): CommonsDef

    Permalink
    Implicit information
    This member is added by an implicit conversion from CommonsDef to Ensuring[CommonsDef] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: Boolean, msg: ⇒ Any): CommonsDef

    Permalink
    Implicit information
    This member is added by an implicit conversion from CommonsDef to Ensuring[CommonsDef] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean): CommonsDef

    Permalink
    Implicit information
    This member is added by an implicit conversion from CommonsDef to Ensuring[CommonsDef] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from CommonsDef to StringFormat[CommonsDef] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  16. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  17. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  23. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  24. def tryWith[A, B](resource: A, logger: Option[Logger] = None)(cleanup: (A) ⇒ Unit)(doWork: (A) ⇒ B): Try[B]

    Permalink

    Performs the unit of work on a resource of type A cleaning up the resource in the case of an exception or upon completion, and ultimately returning a Try of type B.

    Performs the unit of work on a resource of type A cleaning up the resource in the case of an exception or upon completion, and ultimately returning a Try of type B. An exception during cleanup does not change the success of the work. If a logger is provided, the exception is logged, otherwise the exception is ignored.

    An example would be:

    tryWith(Io.toWriter("/path/does/not/exists")(_.close()) { writer => writer.write("Hello World!")) }

    which throws an exception since the path is not found, but this exception is ignored, and a Failure is returned.

    A

    the resource type.

    B

    the result type of the work performed.

    resource

    the resource upon which work is performed.

    cleanup

    the clean up method to apply to the resource when the work is complete.

    doWork

    the work to perform on the resource, returning a result of type B.

    returns

    Success if the work was performed successfully, Failure otherwise.

  25. def tryWithCloseable[A <: Closeable](resource: A, logger: Option[Logger] = None)(doWork: (A) ⇒ Unit): Try[Unit]

    Permalink

    Performs the unit of work on a closeable resource of type A closing up the resource in the case of an exception or upon completion, and ultimately returning a Try.

    Performs the unit of work on a closeable resource of type A closing up the resource in the case of an exception or upon completion, and ultimately returning a Try. An exception during closing does not change the success of the work. If a logger is provided, the exception is logged, otherwise the exception is ignored.

    An example would be:

    tryWith(Io.toWriter("/path/does/not/exists") { writer => writer.write("Hello World!")) }

    which throws an exception since the path is not found, but this exception is ignored, and a Failure is returned.

    A

    the resource type.

    resource

    the resource upon which work is performed.

    doWork

    the work to perform on the resource.

    returns

    Success if the work was performed successfully, Failure otherwise.

  26. def unreachable(message: ⇒ String = ""): Nothing

    Permalink

    A terse way to throw an UnreachableException that can be used where any type is expected, e.g.

    A terse way to throw an UnreachableException that can be used where any type is expected, e.g. Option(thing) getOrElse unreachable("my thing is never null")

    message

    an optional message

  27. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. def yieldAndThen[A](it: ⇒ A)(block: ⇒ Unit): A

    Permalink

    Construct to capture a value, execute some code, and then returned the captured value.

    Construct to capture a value, execute some code, and then returned the captured value. Allows code like: val x = foo; foo +=1; return x to be replaced with yieldAndThen(foo) {foo +=1}

    A

    the type of thing to be returned (usually inferred)

    it

    the value to be returned/yielded

    block

    a block of code to be evaluated

    returns

    it

  31. def [B](y: B): (CommonsDef, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from CommonsDef to ArrowAssoc[CommonsDef] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from CommonsDef to any2stringadd[CommonsDef]

Inherited by implicit conversion StringFormat from CommonsDef to StringFormat[CommonsDef]

Inherited by implicit conversion Ensuring from CommonsDef to Ensuring[CommonsDef]

Inherited by implicit conversion ArrowAssoc from CommonsDef to ArrowAssoc[CommonsDef]

Ungrouped