Object/Class

com.fulcrumgenomics.commons

CommonsDef

Related Docs: class CommonsDef | package commons

Permalink

object CommonsDef extends CommonsDef

A singleton object providing access to all the functionality of CommonsDef.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CommonsDef
  2. CommonsDef
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. implicit class BetterBufferedIteratorJavaWrapper[A] extends AnyRef

    Permalink

    Implicit class that provides a method to wrap a Java iterator into a BetterBufferedIterator.

    Implicit class that provides a method to wrap a Java iterator into a BetterBufferedIterator.

    Definition Classes
    CommonsDef
  2. implicit class BetterBufferedIteratorScalaWrapper[A] extends AnyRef

    Permalink

    Implicit class that provides a method to wrap an iterator into a BetterBufferedIterator.

    Implicit class that provides a method to wrap an iterator into a BetterBufferedIterator.

    Definition Classes
    CommonsDef
  3. type DirPath = Path

    Permalink

    Represents a path to directory.

    Represents a path to directory.

    Definition Classes
    CommonsDef
  4. trait DualIterator[A] extends Iterator[A] with Iterator[A]

    Permalink

    A trait that combine's scala's Iterator with Java's Iterator.

    A trait that combine's scala's Iterator with Java's Iterator.

    Definition Classes
    CommonsDef
  5. type FilePath = Path

    Permalink

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

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

    Definition Classes
    CommonsDef
  6. type FilenamePrefix = String

    Permalink

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

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

    Definition Classes
    CommonsDef
  7. implicit class IteratorToJavaCollectionsAdapter[A] extends AnyRef

    Permalink

    Implicit class that provides methods for creating Java collections from an Iterator.

    Implicit class that provides methods for creating Java collections from an Iterator.

    Definition Classes
    CommonsDef
  8. implicit class ParSupport[A, B <: ParIterableLike[_, _, _]] extends AnyRef

    Permalink

    Implicit that provides additional methods to any collection that is Parallelizable.

    Implicit that provides additional methods to any collection that is Parallelizable. Introduces parWith() methods that create parallel versions of the collection with various configuration options.

    A

    the type of the elements in the collection

    B

    the type of the parallel representation of the collection

    Definition Classes
    CommonsDef
  9. type PathPrefix = Path

    Permalink

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

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

    Definition Classes
    CommonsDef
  10. type PathToBam = Path

    Permalink

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

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

    Definition Classes
    CommonsDef
  11. type PathToFasta = Path

    Permalink

    Represents a path to a Reference FASTA file.

    Represents a path to a Reference FASTA file.

    Definition Classes
    CommonsDef
  12. type PathToFastq = Path

    Permalink

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

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

    Definition Classes
    CommonsDef
  13. type PathToIntervals = Path

    Permalink

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

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

    Definition Classes
    CommonsDef
  14. type PathToVcf = Path

    Permalink

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

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

    Definition Classes
    CommonsDef
  15. implicit class SafelyClosable extends AnyRef

    Permalink

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

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

    Definition Classes
    CommonsDef

Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. def forloop[T](from: T)(check: (T) ⇒ Boolean)(next: (T) ⇒ T)(f: (T) ⇒ Unit): Unit

    Permalink

    A more generic for loop, that gives performance similar, but slightly worse than, CommonsDef#forloop(Int,Int,Int).

    A more generic for loop, that gives performance similar, but slightly worse than, CommonsDef#forloop(Int,Int,Int). Equivalent to:

    for (i=from; check(i); i=next(i)) f(i)

    T

    the type of the index

    from

    an initial value

    check

    a function that checks to see if a value should be evaluated (not cause termination)

    next

    a function that takes a value and produced the next value

    f

    a function called on all values

    Definition Classes
    CommonsDef
    Annotations
    @inline()
  10. def forloop(from: Int, until: Int, by: Int = 1)(f: (Int) ⇒ Unit): Unit

    Permalink

    An implementation of a for loop that has performance similar to writing a custom while loop for primitive types, which suffer great performance loss when iterating via foreach(), and especially with zipWithIndex.foreach().

    An implementation of a for loop that has performance similar to writing a custom while loop for primitive types, which suffer great performance loss when iterating via foreach(), and especially with zipWithIndex.foreach().

    Equivalent to: for(int i=from; i<until; i+=by) f(i)

    from

    an initial integer values

    until

    a value one higher than the last value that should be accepted

    by

    a step value to increment by each iteration

    f

    a function that takes the index and is called each iteration

    Definition Classes
    CommonsDef
    Annotations
    @inline()
  11. final def getClass(): Class[_]

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

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

    Permalink
    Definition Classes
    Any
  14. implicit def javaIterableToIterator[A](iterable: Iterable[A]): Iterator[A]

    Permalink

    Implicit that converts a Java Iterable into a scala Iterator.

    Implicit that converts a Java Iterable into a scala Iterator.

    Definition Classes
    CommonsDef
  15. implicit def javaIteratorAsScalaIterator[A](iterator: Iterator[A]): DualIterator[A]

    Permalink

    Implicit that wraps a Java iterator as a Scala iterator.

    Implicit that wraps a Java iterator as a Scala iterator.

    Definition Classes
    CommonsDef
  16. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  19. implicit def scalaIteratorAsJavaIterator[A](iterator: Iterator[A]): DualIterator[A]

    Permalink

    Implicit that wraps a Scala iterator as a Java iterator.

    Implicit that wraps a Scala iterator as a Java iterator.

    Definition Classes
    CommonsDef
  20. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  22. 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.

    Definition Classes
    CommonsDef
  23. 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.

    Definition Classes
    CommonsDef
  24. 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

    Definition Classes
    CommonsDef
  25. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. 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

    Definition Classes
    CommonsDef

Inherited from CommonsDef

Inherited from AnyRef

Inherited from Any

Ungrouped