Class OptionalReferenceArgumentCollection
java.lang.Object
picard.cmdline.argumentcollections.OptionalReferenceArgumentCollection
- All Implemented Interfaces:
ReferenceArgumentCollection
public class OptionalReferenceArgumentCollection
extends Object
implements ReferenceArgumentCollection
Picard default argument collection for an optional reference.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a PicardHtsPath for the reference input.This method is retained for backward compatibility with legacy tools that have not been updated to support PicardHtsPath input files.This method first checks if the PicardHtsPath is null, thereby avoiding NPE that results from getHtsPath.toPath().
-
Field Details
-
REFERENCE_SEQUENCE
@Argument(shortName="R", doc="Reference sequence file.", common=true, optional=true) public PicardHtsPath REFERENCE_SEQUENCE
-
-
Constructor Details
-
OptionalReferenceArgumentCollection
public OptionalReferenceArgumentCollection()
-
-
Method Details
-
getReferenceFile
Description copied from interface:ReferenceArgumentCollection
This method is retained for backward compatibility with legacy tools that have not been updated to support PicardHtsPath input files. The preferred methods for accessing the reference file provided on the command line is either getHtsPath() or getReferencePath(). TODO: update tools that call this method to use getHtsPath()- Specified by:
getReferenceFile
in interfaceReferenceArgumentCollection
- Returns:
- The reference provided by the user, or the default defined by
htsjdk.samtools.Defaults.REFERENCE_FASTA
. May be null.
-
getReferencePath
Description copied from interface:ReferenceArgumentCollection
This method first checks if the PicardHtsPath is null, thereby avoiding NPE that results from getHtsPath.toPath(). Use this for providing input to methods that expect the Path to be null when the reference is absent e.g. SamReaderFactory.referenceSequence().- Specified by:
getReferencePath
in interfaceReferenceArgumentCollection
- Returns:
- The reference provided by the user or the default as an nio Path. May be null.
-
getHtsPath
Description copied from interface:ReferenceArgumentCollection
Returns a PicardHtsPath for the reference input. Maybe be null. Implementers of this interface should override with an appropriate implementation. This currently does not support remote paths set via HtsJdk.Defaults.REFERENCE_FASTA, since that uses a `File` object.- Specified by:
getHtsPath
in interfaceReferenceArgumentCollection
- Returns:
- The reference provided by the user, if any, or the default, if any, as a PicardHtsPath. May be null.
-