org.bdgenomics.cannoli.builder

## Class SingularityBuilder

- java.lang.Object
- - org.bdgenomics.cannoli.builder.CommandBuilder
  - - org.bdgenomics.cannoli.builder.SingularityBuilder

All Implemented Interfaces:
  Serializable

    public final class SingularityBuilder
    extends CommandBuilder

Singularity container builder.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`SingularityBuilder()` Create a new Singularity command builder.
`SingularityBuilder(String executable)` Create a new Singularity command builder with the specified executable.
`SingularityBuilder(String executable, String image)` Create a new Singularity command builder with the specified executable and image.

### Method Summary

All Methods Instance Methods Concrete Methods
`List<String>` `build()` Build and return the command for this command builder as a list of strings.
`protected List<String>` `formatEnvironmentArgument(String variable, String value)` Format the specified environment variable into a list of string arguments.
`protected List<String>` `formatEnvironmentVariable(String variable, String value)` Format the specified environment variable into a list of strings.
`protected List<String>` `formatImage(String image)` Format the specified environment variable into a list of string arguments.
`protected List<String>` `formatMount(String source, String target)` Format the specified mount point into a list of string arguments.
`protected List<String>` `getContainerCommands()` Return the container commands for this container builder.
`protected List<String>` `getRemoveArgument()` Return the remove argument for this container builder.

### Methods inherited from class org.bdgenomics.cannoli.builder.CommandBuilder

`add, add, addArgument, addArguments, addArguments, addEnvironment, addEnvironment, addFile, addFiles, addFiles, addMount, addMount, addMounts, getArguments, getEnvironment, getExecutable, getFiles, getFlankSize, getImage, getMounts, getOptFlankSize, getOptTimeout, getSudo, getTimeout, isSudo, reset, setExecutable, setFlankSize, setImage, setSudo, setTimeout, setTimeout`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SingularityBuilder

    public SingularityBuilder()

Create a new Singularity command builder.

#### SingularityBuilder

    public SingularityBuilder(String executable)

Create a new Singularity command builder with the specified executable.

Parameters:
  `executable` - executable, must not be null

#### SingularityBuilder

    public SingularityBuilder(String executable,
                              String image)

Create a new Singularity command builder with the specified executable and image.

Parameters:
  `executable` - executable, must not be null
  `image` - image, must not be null

### Method Detail

#### getContainerCommands

    protected List<String> getContainerCommands()

Return the container commands for this container builder.

Returns:
  the container commands for this container builder

#### getRemoveArgument

    protected List<String> getRemoveArgument()

Return the remove argument for this container builder.

Returns:
  the remove argument for this container builder

#### formatEnvironmentVariable

    protected List<String> formatEnvironmentVariable(String variable,
                                                     String value)

Format the specified environment variable into a list of strings.

Parameters:
  `variable` - variable
  `value` - value
Returns:
  the specified environment variable formatted into a list of strings.

#### formatEnvironmentArgument

    protected List<String> formatEnvironmentArgument(String variable,
                                                     String value)

Format the specified environment variable into a list of string arguments.

Parameters:
  `variable` - variable
  `value` - value
Returns:
  the specified environment variable formatted into a list of string arguments.

#### formatImage

    protected List<String> formatImage(String image)

Format the specified environment variable into a list of string arguments.

Parameters:
  `image` - image
Returns:
  the specified environment variable formatted into a list of string arguments.

#### formatMount

    protected List<String> formatMount(String source,
                                       String target)

Format the specified mount point into a list of string arguments.

Parameters:
  `source` - source
  `target` - target
Returns:
  the specified mount point formatted into a list of string arguments

#### build

    public final List<String> build()

Description copied from class: `CommandBuilder`
Build and return the command for this command builder as a list of strings.

Specified by:
  `build` in class `CommandBuilder`
Returns:
  the command for this command builder as a list of strings.