CountLoci nows writes out to a file for Queue status tracking. VariantAnnotatorEngine has a special group None that doesn't add any annotations; useful for those who are testing UG performance
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4202 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
b59d62927e
commit
73d41bfa24
|
|
@ -98,22 +98,24 @@ public class VariantAnnotatorEngine {
|
||||||
|
|
||||||
HashSet<Class> classes = new HashSet<Class>();
|
HashSet<Class> classes = new HashSet<Class>();
|
||||||
// get the classes from the provided groups (interfaces)
|
// get the classes from the provided groups (interfaces)
|
||||||
for ( String group : annotationGroupsToUse ) {
|
if ( annotationGroupsToUse.size() != 1 || ! annotationGroupsToUse.get(0).toLowerCase().equals("none") ) {
|
||||||
Class interfaceClass = classMap.get(group);
|
for ( String group : annotationGroupsToUse ) {
|
||||||
if ( interfaceClass == null )
|
Class interfaceClass = classMap.get(group);
|
||||||
interfaceClass = classMap.get(group + "Annotation");
|
if ( interfaceClass == null )
|
||||||
if ( interfaceClass == null )
|
interfaceClass = classMap.get(group + "Annotation");
|
||||||
throw new StingException("Class " + group + " is not found; please check that you have specified the class name correctly");
|
if ( interfaceClass == null )
|
||||||
classes.addAll(PackageUtils.getClassesImplementingInterface(interfaceClass));
|
throw new StingException("Class " + group + " is not found; please check that you have specified the class name correctly");
|
||||||
}
|
classes.addAll(PackageUtils.getClassesImplementingInterface(interfaceClass));
|
||||||
// get the specific classes provided
|
}
|
||||||
for ( String annotation : annotationsToUse ) {
|
// get the specific classes provided
|
||||||
Class annotationClass = classMap.get(annotation);
|
for ( String annotation : annotationsToUse ) {
|
||||||
if ( annotationClass == null )
|
Class annotationClass = classMap.get(annotation);
|
||||||
annotationClass = classMap.get(annotation + "Annotation");
|
if ( annotationClass == null )
|
||||||
if ( annotationClass == null )
|
annotationClass = classMap.get(annotation + "Annotation");
|
||||||
throw new StingException("Class " + annotation + " is not found; please check that you have specified the class name correctly");
|
if ( annotationClass == null )
|
||||||
classes.add(annotationClass);
|
throw new StingException("Class " + annotation + " is not found; please check that you have specified the class name correctly");
|
||||||
|
classes.add(annotationClass);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// get the instances
|
// get the instances
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,23 @@
|
||||||
package org.broadinstitute.sting.gatk.walkers.qc;
|
package org.broadinstitute.sting.gatk.walkers.qc;
|
||||||
|
|
||||||
|
import net.sf.samtools.SAMFileWriter;
|
||||||
|
import org.broadinstitute.sting.commandline.Output;
|
||||||
import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
|
import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
|
||||||
import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
|
import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
|
||||||
import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
|
import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
|
||||||
import org.broadinstitute.sting.gatk.walkers.LocusWalker;
|
import org.broadinstitute.sting.gatk.walkers.LocusWalker;
|
||||||
import org.broadinstitute.sting.gatk.walkers.TreeReducible;
|
import org.broadinstitute.sting.gatk.walkers.TreeReducible;
|
||||||
|
|
||||||
|
import java.io.PrintStream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Walks over the input data set, calculating the total number of covered loci for diagnostic purposes.
|
* Walks over the input data set, calculating the total number of covered loci for diagnostic purposes.
|
||||||
* Simplest example of a locus walker.
|
* Simplest example of a locus walker.
|
||||||
*/
|
*/
|
||||||
public class CountLociWalker extends LocusWalker<Integer, Long> implements TreeReducible<Long> {
|
public class CountLociWalker extends LocusWalker<Integer, Long> implements TreeReducible<Long> {
|
||||||
|
@Output(doc="Write count to this file instead of STDOUT")
|
||||||
|
PrintStream out;
|
||||||
|
|
||||||
public Integer map(RefMetaDataTracker tracker, ReferenceContext ref, AlignmentContext context) {
|
public Integer map(RefMetaDataTracker tracker, ReferenceContext ref, AlignmentContext context) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue