public class DemuxUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BARCODE_CUTOFF
Config boolean property "demultiplexer.barcodeCutoff" will look for barcodes in
"metadata.barcodeColumn" to exist in this percentage of multiplex file. |
static String |
BARCODE_USE_REV_COMP
Config boolean property "demultiplexer.barcodeRevComp" will use the reverse compliment of
"metadata.barcodeColumn" to match sample IDs to sequences. |
static String |
DEMUX_STRATEGY
Config property "demultiplexer.strategy" tells BioLockJ how to match sequences with Sample
IDs.Options: barcode_in_header, barcode_in_mapping, barcode_in_seq, id_in_header, do_not_demux. If using barcodes, metadata column "metadata.barcodeColumn" is required. |
static String |
MAPPING_FILE
Config String property "demultiplexer.mapping" lists the path to the mapping file to match
sequence headers to barcodes. |
static String |
OPTION_BARCODE_IN_HEADER
Config property "demultiplexer.strategy" option: "barcode_in_header" |
static String |
OPTION_BARCODE_IN_MAPPING
Config property "demultiplexer.strategy" option: "barcode_in_mapping" |
static String |
OPTION_BARCODE_IN_SEQ
Config property "demultiplexer.strategy" option: "barcode_in_seq" |
static String |
OPTION_DO_NOT_DEMUX
Config property "demultiplexer.strategy" option: "do_not_demux" |
static String |
OPTION_ID_IN_HEADER
Config property "demultiplexer.strategy" option: "id_in_header" |
Constructor and Description |
---|
DemuxUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
barcodeInHeader()
Return TRUE if Config is setup to demultiplex the sequence data based on bar-codes in the sequence headers.
|
static boolean |
barcodeInMapping()
Return TRUE if Config is setup to demultiplex the sequence data based on bar-codes in the sequence itself.
|
static boolean |
barcodeInSeq()
Return TRUE if Config is setup to demultiplex the sequence data based on bar-codes in the sequence itself.
|
static void |
clearDemuxConfig()
Clear demultiplexer related fields
|
static boolean |
demuxWithBarcode()
Return TRUE if barcode column is defined in the Config file and is populated in the metadata file
|
static Boolean |
doDemux()
Return TRUE if Config is setup to demultiplex the sequence data.
|
protected static Map<String,String> |
getIdMap()
Return the ID map (key=barcodeID, value=sampleId) Print the map to the log file.
Barcodes, if used, are located in the metadata column defined by property: Config ."metadata.barcodeColumn" |
static String |
getSampleId(List<String> seqLines)
Determine Sample Id by examining the sequence lines.
If ="id_in_header", extract the Sample Id from the sequence header via SeqUtil.getSampleId(String) If ="barcode_in_header" and the sequence header contains a bar-code in the idMap, return the corresponding SampleID from the idMap. If ="barcode_in_mapping" and the sequence header maps to a bar-code in the idMap, return the corresponding SampleID from the idMap. If ="barcode_in_seq" and the sequence itself begins with a bar-code in the idMap, return the corresponding SampleID from the idMap. |
static boolean |
hasValidBarcodes()
Check for the existance of the barcode column.
|
static boolean |
sampleIdInHeader()
Return TRUE if Config is setup to demultiplex the sequence data based on Sample IDs in the sequence headers.
|
public static final String BARCODE_CUTOFF
Config
boolean property "demultiplexer.barcodeCutoff" will look for barcodes in
"metadata.barcodeColumn" to exist in this percentage of multiplex file.public static final String BARCODE_USE_REV_COMP
Config
boolean property "demultiplexer.barcodeRevComp" will use the reverse compliment of
"metadata.barcodeColumn" to match sample IDs to sequences.public static final String DEMUX_STRATEGY
Config
property "demultiplexer.strategy" tells BioLockJ how to match sequences with Sample
IDs.public static final String MAPPING_FILE
Config
String property "demultiplexer.mapping" lists the path to the mapping file to match
sequence headers to barcodes. The barcodes found in metadata file
"metadata.barcodeColumn" can be used to match sample IDs to sequences.public static final String OPTION_BARCODE_IN_HEADER
Config
property "demultiplexer.strategy" option: "barcode_in_header"public static final String OPTION_BARCODE_IN_MAPPING
Config
property "demultiplexer.strategy" option: "barcode_in_mapping"public static final String OPTION_BARCODE_IN_SEQ
Config
property "demultiplexer.strategy" option: "barcode_in_seq"public static final String OPTION_DO_NOT_DEMUX
Config
property "demultiplexer.strategy" option: "do_not_demux"public static final String OPTION_ID_IN_HEADER
Config
property "demultiplexer.strategy" option: "id_in_header"public static boolean barcodeInHeader() throws ConfigNotFoundException
ConfigNotFoundException
- if "demultiplexer.strategy" is undefinedpublic static boolean barcodeInMapping() throws ConfigNotFoundException
ConfigNotFoundException
- if "demultiplexer.strategy" is undefinedpublic static boolean barcodeInSeq() throws ConfigNotFoundException
ConfigNotFoundException
- if "demultiplexer.strategy" is undefinedpublic static void clearDemuxConfig()
public static boolean demuxWithBarcode() throws Exception
Exception
- if unable to access metadata file or Configpublic static Boolean doDemux() throws ConfigNotFoundException
ConfigNotFoundException
- if "demultiplexer.strategy" is undefinedpublic static String getSampleId(List<String> seqLines) throws Exception
SeqUtil.getSampleId(String)
public static boolean hasValidBarcodes()
public static boolean sampleIdInHeader()