ArrayList<String> blockInputBGSeqs = new ArrayList<String>();
String inputBackgroundFile = null;
//get type of background
//if backgrounf type is "input", retrieve input background sequences...
// else,
JMotifXBlockSequenceExtractor jmxBSXr = new JMotifXBlockSequenceExtractor();
String backgroundType = configMap.get("backgroundType");
if(backgroundType.equalsIgnoreCase("input")){
inputBackgroundFile = configMap.get("backgroudSequenceFile");
JMotifXSequenceFileReader jmotifxR = new JMotifXSequenceFileReader();
ArrayList<String> inputBGSeqs = jmotifxR.extractSequences(inputBackgroundFile);
// preprocess input background sequence if not already done...
// preprocessing at this stage involves, extracting a block sequence of the inputted sequence,
// presupposing the inputed peptide sequences are of variable lengths.
blockInputBGSeqs = jmxBSXr.extractBlockSequence(inputBGSeqs, configMap, db);
} else if(backgroundType.equalsIgnoreCase("database")){
//get all peptides about the specified central residue with the specified window
blockInputBGSeqs = jmxBSXr.extractBlockSeqs4rmDBWithMotifNCentralResidue(configMap, db);
} else if(backgroundType.equalsIgnoreCase("random")){
blockInputBGSeqs = jmxBSXr.extractRandomBlockSequences(configMap, db);
}
return blockInputBGSeqs;
}