Fix concurrency issue that periodically kills VariantEvalIntegrationTest --
a member field of RMDTrackBuilder was getting rebuilt every time it was called, creating concurrency issues. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5001 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
73acfa654a
commit
af31d02a2d
|
|
@ -871,7 +871,7 @@ public class GenomeAnalysisEngine {
|
||||||
SAMSequenceDictionary sequenceDictionary,
|
SAMSequenceDictionary sequenceDictionary,
|
||||||
GenomeLocParser genomeLocParser,
|
GenomeLocParser genomeLocParser,
|
||||||
ValidationExclusion.TYPE validationExclusionType) {
|
ValidationExclusion.TYPE validationExclusionType) {
|
||||||
RMDTrackBuilder builder = new RMDTrackBuilder(referenceMetaDataFiles,sequenceDictionary,genomeLocParser,validationExclusionType);
|
RMDTrackBuilder builder = new RMDTrackBuilder(sequenceDictionary,genomeLocParser,validationExclusionType);
|
||||||
// try and make the tracks given their requests
|
// try and make the tracks given their requests
|
||||||
// create of live instances of the tracks
|
// create of live instances of the tracks
|
||||||
List<RMDTrack> tracks = new ArrayList<RMDTrack>();
|
List<RMDTrack> tracks = new ArrayList<RMDTrack>();
|
||||||
|
|
|
||||||
|
|
@ -73,9 +73,6 @@ public class RMDTrackBuilder extends PluginManager<FeatureCodec> {
|
||||||
// a constant we use for marking sequence dictionary entries in the Tribble index property list
|
// a constant we use for marking sequence dictionary entries in the Tribble index property list
|
||||||
public static final String SequenceDictionaryPropertyPredicate = "DICT:";
|
public static final String SequenceDictionaryPropertyPredicate = "DICT:";
|
||||||
|
|
||||||
// the input strings we use to create RODs from
|
|
||||||
private final Collection<RMDTriplet> inputs;
|
|
||||||
|
|
||||||
private Map<String, Class> classes = null;
|
private Map<String, Class> classes = null;
|
||||||
|
|
||||||
// private sequence dictionary we use to set our tracks with
|
// private sequence dictionary we use to set our tracks with
|
||||||
|
|
@ -91,24 +88,6 @@ public class RMDTrackBuilder extends PluginManager<FeatureCodec> {
|
||||||
*/
|
*/
|
||||||
private ValidationExclusion.TYPE validationExclusionType;
|
private ValidationExclusion.TYPE validationExclusionType;
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new RMDTrackBuilder, predefined to use a given set of reference metadata.
|
|
||||||
* @param referenceMetaDataDescriptors file descriptors to build out during trackbuilder construction.
|
|
||||||
* @param dict Sequence dictionary to use.
|
|
||||||
* @param genomeLocParser Location parser to use.
|
|
||||||
* @param validationExclusionType Types of validations to exclude, for sequence dictionary verification.
|
|
||||||
*/
|
|
||||||
public RMDTrackBuilder(Collection<RMDTriplet> referenceMetaDataDescriptors,
|
|
||||||
SAMSequenceDictionary dict,
|
|
||||||
GenomeLocParser genomeLocParser,
|
|
||||||
ValidationExclusion.TYPE validationExclusionType) {
|
|
||||||
super(FeatureCodec.class, "Codecs", "Codec");
|
|
||||||
this.inputs = referenceMetaDataDescriptors;
|
|
||||||
this.dict = dict;
|
|
||||||
this.genomeLocParser = genomeLocParser;
|
|
||||||
this.validationExclusionType = validationExclusionType;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct an RMDTrackerBuilder, allowing the user to define tracks to build after-the-fact. This is generally
|
* Construct an RMDTrackerBuilder, allowing the user to define tracks to build after-the-fact. This is generally
|
||||||
* used when walkers want to directly manage the ROD system for whatever reason. Before using this constructor,
|
* used when walkers want to directly manage the ROD system for whatever reason. Before using this constructor,
|
||||||
|
|
@ -120,16 +99,19 @@ public class RMDTrackBuilder extends PluginManager<FeatureCodec> {
|
||||||
public RMDTrackBuilder(SAMSequenceDictionary dict,
|
public RMDTrackBuilder(SAMSequenceDictionary dict,
|
||||||
GenomeLocParser genomeLocParser,
|
GenomeLocParser genomeLocParser,
|
||||||
ValidationExclusion.TYPE validationExclusionType) {
|
ValidationExclusion.TYPE validationExclusionType) {
|
||||||
this(Collections.<RMDTriplet>emptyList(),dict,genomeLocParser,validationExclusionType);
|
super(FeatureCodec.class, "Codecs", "Codec");
|
||||||
}
|
this.dict = dict;
|
||||||
|
this.genomeLocParser = genomeLocParser;
|
||||||
|
this.validationExclusionType = validationExclusionType;
|
||||||
|
|
||||||
/** @return a list of all available track types we currently have access to create */
|
|
||||||
public Map<String, Class> getAvailableTrackNamesAndTypes() {
|
|
||||||
classes = new HashMap<String, Class>();
|
classes = new HashMap<String, Class>();
|
||||||
for (String name: this.getPluginsByName().keySet()) {
|
for (String name: this.getPluginsByName().keySet()) {
|
||||||
classes.put(name.toUpperCase(), getPluginsByName().get(name));
|
classes.put(name.toUpperCase(), getPluginsByName().get(name));
|
||||||
}
|
} }
|
||||||
return classes;
|
|
||||||
|
/** @return a list of all available track types we currently have access to create */
|
||||||
|
public Map<String, Class> getAvailableTrackNamesAndTypes() {
|
||||||
|
return Collections.unmodifiableMap(classes);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return a list of all available track record types we currently have access to create */
|
/** @return a list of all available track record types we currently have access to create */
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ public class ReferenceOrderedDataPoolUnitTest extends BaseTest {
|
||||||
if (indexFileName.exists()) indexFileName.delete();
|
if (indexFileName.exists()) indexFileName.delete();
|
||||||
|
|
||||||
triplet = new RMDTriplet("tableTest","Table",fileName,RMDStorageType.FILE);
|
triplet = new RMDTriplet("tableTest","Table",fileName,RMDStorageType.FILE);
|
||||||
builder = new RMDTrackBuilder(Collections.singletonList(triplet),seq.getSequenceDictionary(),genomeLocParser,null);
|
builder = new RMDTrackBuilder(seq.getSequenceDictionary(),genomeLocParser,null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue