Reference-ordered data relies on bugs in the old command-line argument system to work. Update the ROD system to from -B track1 type1 file1 track2 type2 file2 to -B track1,type1,file1 -B track2,type2,file2.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@640 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
hanna 2009-05-08 15:28:19 +00:00
parent 483a58627b
commit de1c282e62
2 changed files with 12 additions and 11 deletions

View File

@ -58,7 +58,7 @@ public class ReferenceOrderedData<ROD extends ReferenceOrderedDatum> implements
/**
* Parse the ROD bindings. These are of the form of a single list of strings, each triplet of the
* form <name> <type> <file>. After this function, the List of RODs contains new RODs bound to each of
* form <name>,<type>,<file>. After this function, the List of RODs contains new RODs bound to each of
* name, of type, ready to read from the file. This function does check for the strings to be well formed
* and such.
*
@ -68,15 +68,16 @@ public class ReferenceOrderedData<ROD extends ReferenceOrderedDatum> implements
*/
public static void parseBindings(Logger logger, ArrayList<String> bindings, List<ReferenceOrderedData<? extends ReferenceOrderedDatum> > rods)
{
logger.info("Processing ROD bindings: " + bindings.size() + " -> " + Utils.join(" : ", bindings));
if ( bindings.size() % 3 != 0 )
Utils.scareUser(String.format("Invalid ROD specification: requires triplets of <name> <type> <file> but got %s", Utils.join(" ", bindings)));
// Loop over triplets
for ( int i = 0; i < bindings.size(); i += 3) {
final String name = bindings.get(i);
final String typeName = bindings.get(i+1);
final String fileName = bindings.get(i+2);
for( String binding: bindings ) {
String[] bindingTokens = binding.split(",");
logger.info("Processing ROD bindings: " + bindings.size() + " -> " + Utils.join(" : ", bindingTokens));
if( bindingTokens.length != 3 )
Utils.scareUser(String.format("Invalid ROD specification: requires triplets of <name>,<type>,<file> but got %s", Utils.join(",", bindings)));
final String name = bindingTokens[0];
final String typeName = bindingTokens[1];
final String fileName = bindingTokens[2];
ReferenceOrderedData<?> rod = parse1Binding(logger, name, typeName, fileName);
@ -85,7 +86,7 @@ public class ReferenceOrderedData<ROD extends ReferenceOrderedDatum> implements
if ( rod2.getName().equals(rod.getName()) )
Utils.scareUser(String.format("Found duplicate rod bindings", rod.getName()));
rods.add(rod);
rods.add(rod);
}
}

View File

@ -195,7 +195,7 @@ def main():
if isIntervalFile(region):
cmd += " --intervals_file " + region
cmd += " -B pileup SAMPileup " + pileup
cmd += " -B pileup,SAMPileup," + pileup
print cmd
farm_commands.cmd(cmd, OPTIONS.farmQueue, outputFile=validationOutput, just_print_commands=OPTIONS.justPrint)