public abstract class ParameterizedFileUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.io.File |
base
If you think of the file system as a tree, this is the deepest directory(node) on the tree that
still contains all of the files for this given type (e.g.
|
protected static boolean |
DefaultSkipEmptyFiles |
protected java.lang.String |
extension
The file extension for this class, file extension does not have the standard meaning
in this instance.
|
protected FileFaker |
faker |
protected int |
lane |
protected java.util.regex.Pattern |
matchPattern
A pattern that will match files of this type for this lane
|
static java.lang.String |
PER_TILE_PATTERN_STRING |
protected boolean |
skipEmptyFiles |
protected java.util.List<java.lang.Integer> |
tiles |
Constructor and Description |
---|
ParameterizedFileUtil(boolean laneTileRegex,
java.lang.String extension,
java.io.File base,
FileFaker faker,
int lane) |
ParameterizedFileUtil(boolean laneTileRegex,
java.lang.String extension,
java.io.File base,
FileFaker faker,
int lane,
boolean skipEmptyFiles) |
ParameterizedFileUtil(java.lang.String pattern,
java.lang.String extension,
java.io.File base,
FileFaker faker,
int lane) |
Modifier and Type | Method and Description |
---|---|
abstract java.util.List<java.lang.String> |
fakeFiles(java.util.List<java.lang.Integer> expectedTiles,
int[] cycles,
IlluminaFileUtil.SupportedIlluminaFormat format)
Given the expected tiles/expected cycles for this file type create a set of fake files such that the
verification criteria are met.
|
abstract boolean |
filesAvailable()
Determine whether or not files are available
|
protected java.lang.Integer |
fileToTile(java.lang.String fileName)
Returns only lane and tile information as PerTileFt's do not have End information.
|
protected picard.illumina.parser.IlluminaFileMap |
getTiledFiles(java.io.File baseDirectory,
java.util.regex.Pattern pattern)
Return all files that match pattern of the given file type in the given base directory
|
java.util.List<java.lang.Integer> |
getTiles()
Return a list of all tiles available for this file format and run
|
static java.lang.String |
makeLaneTileRegex(java.lang.String fileNameEndPattern,
int lane)
Return a regex string for finding Lane and Tile given a file extension pattern
|
abstract java.util.List<java.lang.String> |
verify(java.util.List<java.lang.Integer> expectedTiles,
int[] expectedCycles)
Given the expected tiles/expected cycles for this file type, return a list of error messages describing any
missing/or malformed files
|
public static final java.lang.String PER_TILE_PATTERN_STRING
protected final java.lang.String extension
protected java.util.regex.Pattern matchPattern
protected final int lane
protected java.util.List<java.lang.Integer> tiles
protected final java.io.File base
protected final FileFaker faker
protected static final boolean DefaultSkipEmptyFiles
protected final boolean skipEmptyFiles
public ParameterizedFileUtil(boolean laneTileRegex, java.lang.String extension, java.io.File base, FileFaker faker, int lane, boolean skipEmptyFiles)
public ParameterizedFileUtil(boolean laneTileRegex, java.lang.String extension, java.io.File base, FileFaker faker, int lane)
public ParameterizedFileUtil(java.lang.String pattern, java.lang.String extension, java.io.File base, FileFaker faker, int lane)
public abstract boolean filesAvailable()
public java.util.List<java.lang.Integer> getTiles()
public abstract java.util.List<java.lang.String> verify(java.util.List<java.lang.Integer> expectedTiles, int[] expectedCycles)
expectedTiles
- An ordered list of tile numbersexpectedCycles
- An ordered list of cycle numbers that may contain gapspublic abstract java.util.List<java.lang.String> fakeFiles(java.util.List<java.lang.Integer> expectedTiles, int[] cycles, IlluminaFileUtil.SupportedIlluminaFormat format)
expectedTiles
- An ordered list of tile numberscycles
- An ordered list of cycle numbers that may contain gapsformat
- The format of the files that are to be fakedprotected java.lang.Integer fileToTile(java.lang.String fileName)
fileName
- Filename to analyze for datapublic static java.lang.String makeLaneTileRegex(java.lang.String fileNameEndPattern, int lane)
protected picard.illumina.parser.IlluminaFileMap getTiledFiles(java.io.File baseDirectory, java.util.regex.Pattern pattern)