Removing the code that made the ROD system case insensitive. Anyone using specific ROD names in their classes should take care in naming required tracks; All lowercase is the best practice.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3184 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
aaron 2010-04-16 06:17:31 +00:00
parent 6dc1275cfb
commit 4d75b26b7a
3 changed files with 5 additions and 6 deletions

View File

@ -233,7 +233,6 @@ public class GenomeAnalysisEngine {
/**
* if we have a ROD specified as a 'rodToIntervalTrackName', convert its records to RODs
*/
// TODO: this function uses toLowerCase to work with the current ROD system, fix it if we make ROD names case-sensitive
private static List<GenomeLoc> checkRODToIntervalArgument() {
Map<String, ReferenceOrderedDataSource> rodNames = RMDIntervalGenerator.getRMDTrackNames(instance.rodDataSources);
// Do we have any RODs that overloaded as interval lists with the 'rodToIntervalTrackName' flag?
@ -242,11 +241,11 @@ public class GenomeAnalysisEngine {
String rodName = GenomeAnalysisEngine.instance.argCollection.RODToInterval;
// check to make sure we have a rod of that name
if (!rodNames.containsKey(rodName.toLowerCase()))
if (!rodNames.containsKey(rodName))
throw new StingException("--rodToIntervalTrackName (-BTI) was pass the name '"+rodName+"', which wasn't given as a ROD name in the -B option");
for (String str : rodNames.keySet())
if (str.toLowerCase().equals(rodName.toLowerCase())) {
if (str.equals(rodName)) {
RMDIntervalGenerator intervalGenerator = new RMDIntervalGenerator(rodNames.get(str).getReferenceOrderedData());
ret.addAll(intervalGenerator.toGenomeLocList());
}

View File

@ -53,7 +53,7 @@ public class ReferenceOrderedDataSource implements SimpleDataSource {
* @return Name of the underlying rod.
*/
public String getName() {
return this.rod.getName().toLowerCase(); // TODO: Aaron fix this. this is a hack, because RODs always lowercased their names, but in for consistency for now
return this.rod.getName();
}
/**

View File

@ -114,8 +114,8 @@ public class RODTrackBuilder implements RMDTrackBuilder {
public ReferenceOrderedData createROD(final String trackName, Class type, File fileName) {
// Create the ROD
ReferenceOrderedData<?> rod = new ReferenceOrderedData<ReferenceOrderedDatum>(trackName.toLowerCase(), fileName, type );
logger.info(String.format("Created binding from %s to %s of type %s", trackName.toLowerCase(), fileName, type));
ReferenceOrderedData<?> rod = new ReferenceOrderedData<ReferenceOrderedDatum>(trackName, fileName, type );
logger.info(String.format("Created binding from %s to %s of type %s", trackName, fileName, type));
return rod;
}