Package picard.illumina.parser
Class ParameterizedFileUtil
java.lang.Object
picard.illumina.parser.ParameterizedFileUtil
- Direct Known Subclasses:
MultiTileBclFileUtil
,MultiTileFileUtil
,PerTileFileUtil
,PerTilePerCycleFileUtil
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final File
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 final boolean
protected final String
The file extension for this class, file extension does not have the standard meaning in this instance.protected final FileFaker
protected final int
protected Pattern
A pattern that will match files of this type for this lanestatic final String
protected final boolean
-
Constructor Summary
ConstructorsConstructorDescriptionParameterizedFileUtil
(boolean laneTileRegex, String extension, File base, FileFaker faker, int lane) ParameterizedFileUtil
(boolean laneTileRegex, String extension, File base, FileFaker faker, int lane, boolean skipEmptyFiles) ParameterizedFileUtil
(String pattern, String extension, File base, FileFaker faker, int lane) -
Method Summary
Modifier and TypeMethodDescriptionboolean
static String
escapePeriods
(String preEscaped) Escape the period character.fakeFiles
(List<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
Determine whether or not files are availableprotected Integer
fileToTile
(String fileName) Returns only lane and tile information as PerTileFt's do not have End information.protected File
getRunFile
(File baseDirectory, Pattern pattern) protected picard.illumina.parser.IlluminaFileMap
getTiledFiles
(File baseDirectory, Pattern pattern) Return all files that match pattern of the given file type in the given base directorygetTiles()
Return a list of all tiles available for this file format and runstatic String
makeBarcodeRegex
(int lane) static String
makeLaneTileRegex
(String fileNameEndPattern, int lane) Return a regex string for finding Lane and Tile given a file extension patternvoid
void
setTilesForPerRunFile
(List<Integer> tiles) Given the expected tiles/expected cycles for this file type, return a list of error messages describing any missing/or malformed files
-
Field Details
-
PER_TILE_PATTERN_STRING
- See Also:
-
extension
The file extension for this class, file extension does not have the standard meaning in this instance. It means, all the characters that come after the identifying portion of the file (after lane, tile, and end that is). So _qseq.txt and .filter are both file extensions -
matchPattern
A pattern that will match files of this type for this lane -
lane
protected final int lane -
tiles
-
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. If we're talking about BCLs the directory structure is: BaseCall Dir | L001 | | | C1.1 C2.1 ... Cn.1 | | | bcl Files ... bclFiles L001 is the base because it contains every BCL file in the run (though those files are nested in other folders). -
faker
-
DefaultSkipEmptyFiles
protected static final boolean DefaultSkipEmptyFiles- See Also:
-
skipEmptyFiles
protected final boolean skipEmptyFiles
-
-
Constructor Details
-
ParameterizedFileUtil
-
ParameterizedFileUtil
-
ParameterizedFileUtil
-
-
Method Details
-
filesAvailable
public abstract boolean filesAvailable()Determine whether or not files are available- Returns:
- return true if files are found matching this types pattern, false otherwise
-
getTiles
Return a list of all tiles available for this file format and run- Returns:
- A List of tile integers
-
verify
Given the expected tiles/expected cycles for this file type, return a list of error messages describing any missing/or malformed files- Parameters:
expectedTiles
- An ordered list of tile numbersexpectedCycles
- An ordered list of cycle numbers that may contain gaps- Returns:
- A list of error messages for this format
-
fakeFiles
public abstract List<String> fakeFiles(List<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.- Parameters:
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 faked- Returns:
- A list of error messages for this format
-
fileToTile
Returns only lane and tile information as PerTileFt's do not have End information.- Parameters:
fileName
- Filename to analyze for data- Returns:
- A LaneTile object with the discovered Lane and Tile information and a null end field.
-
makeLaneTileRegex
Return a regex string for finding Lane and Tile given a file extension pattern -
escapePeriods
Escape the period character. -
getRunFile
-
getTiledFiles
Return all files that match pattern of the given file type in the given base directory -
setTiles
-
setTilesForPerRunFile
-
checkTileCount
public boolean checkTileCount() -
makeBarcodeRegex
-