This walker can NOT be tree-reducible (in its current state). Given that it's meant to be run just once for any given transcript set, this is not at all a problem.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4231 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
ae9cba1c73
commit
cd091d7309
|
|
@ -43,7 +43,6 @@ import org.broadinstitute.sting.gatk.walkers.RMD;
|
||||||
import org.broadinstitute.sting.gatk.walkers.Reference;
|
import org.broadinstitute.sting.gatk.walkers.Reference;
|
||||||
import org.broadinstitute.sting.gatk.walkers.Requires;
|
import org.broadinstitute.sting.gatk.walkers.Requires;
|
||||||
import org.broadinstitute.sting.gatk.walkers.RodWalker;
|
import org.broadinstitute.sting.gatk.walkers.RodWalker;
|
||||||
import org.broadinstitute.sting.gatk.walkers.TreeReducible;
|
|
||||||
import org.broadinstitute.sting.gatk.walkers.Window;
|
import org.broadinstitute.sting.gatk.walkers.Window;
|
||||||
import org.broadinstitute.sting.utils.BaseUtils;
|
import org.broadinstitute.sting.utils.BaseUtils;
|
||||||
import org.broadinstitute.sting.utils.StingException;
|
import org.broadinstitute.sting.utils.StingException;
|
||||||
|
|
@ -65,9 +64,8 @@ import org.broadinstitute.sting.utils.StingException;
|
||||||
*/
|
*/
|
||||||
@Reference(window=@Window(start=-4,stop=4))
|
@Reference(window=@Window(start=-4,stop=4))
|
||||||
@By(DataSource.REFERENCE)
|
@By(DataSource.REFERENCE)
|
||||||
@Requires(value={DataSource.REFERENCE}, referenceMetaData={ @RMD(name="transcripts",type=AnnotatorInputTableFeature.class) } )
|
@Requires(value={DataSource.REFERENCE}, referenceMetaData={ @RMD(name=TranscriptToGenomicInfo.ROD_NAME,type=AnnotatorInputTableFeature.class) } )
|
||||||
public class TranscriptToGenomicInfo extends RodWalker<Integer, Integer> implements TreeReducible<Integer>
|
public class TranscriptToGenomicInfo extends RodWalker<Integer, Integer> {
|
||||||
{
|
|
||||||
private static final String ROD_NAME = "transcripts";
|
private static final String ROD_NAME = "transcripts";
|
||||||
|
|
||||||
//@Argument(fullName="pass-through", shortName="t", doc="Optionally specifies which columns from the transcript table should be copied verbatim (aka. passed-through) to the records in the output table. For example, -B transcripts,AnnotatorInputTable,/data/refGene.txt -t id will cause the refGene id column to be copied to the output table.", required=false)
|
//@Argument(fullName="pass-through", shortName="t", doc="Optionally specifies which columns from the transcript table should be copied verbatim (aka. passed-through) to the records in the output table. For example, -B transcripts,AnnotatorInputTable,/data/refGene.txt -t id will cause the refGene id column to be copied to the output table.", required=false)
|
||||||
|
|
@ -272,7 +270,7 @@ public class TranscriptToGenomicInfo extends RodWalker<Integer, Integer> impleme
|
||||||
try {
|
try {
|
||||||
generateOutputRecordsForROD(parsedTranscriptRod);
|
generateOutputRecordsForROD(parsedTranscriptRod);
|
||||||
}
|
}
|
||||||
catch(Exception e) {
|
catch(IOException e) {
|
||||||
throw new RuntimeException(Thread.currentThread().getName() + " - Unexpected error occurred at position: [" + parsedTranscriptRod.txChrom + ":" + position + "] in transcript: " + parsedTranscriptRod, e);
|
throw new RuntimeException(Thread.currentThread().getName() + " - Unexpected error occurred at position: [" + parsedTranscriptRod.txChrom + ":" + position + "] in transcript: " + parsedTranscriptRod, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -760,8 +758,6 @@ public class TranscriptToGenomicInfo extends RodWalker<Integer, Integer> impleme
|
||||||
|
|
||||||
public Integer reduce(Integer value, Integer sum) { return sum + value; }
|
public Integer reduce(Integer value, Integer sum) { return sum + value; }
|
||||||
|
|
||||||
public Integer treeReduce(Integer lhs, Integer rhs) { return lhs + rhs; }
|
|
||||||
|
|
||||||
public void onTraversalDone(Integer result) {
|
public void onTraversalDone(Integer result) {
|
||||||
logger.info("Skipped " + skippedPositionsCounter + " in-transcript genomic positions out of "+ totalPositionsCounter + " total (" + ( totalPositionsCounter == 0 ? 0 : (100*skippedPositionsCounter)/totalPositionsCounter) + "%)");
|
logger.info("Skipped " + skippedPositionsCounter + " in-transcript genomic positions out of "+ totalPositionsCounter + " total (" + ( totalPositionsCounter == 0 ? 0 : (100*skippedPositionsCounter)/totalPositionsCounter) + "%)");
|
||||||
logger.info("Skipped " + skippedTranscriptCounter + " transcripts out of "+ transcriptsProcessedCounter + " total (" + ( transcriptsProcessedCounter == 0 ? 0 : (100*skippedTranscriptCounter)/transcriptsProcessedCounter) + "%)");
|
logger.info("Skipped " + skippedTranscriptCounter + " transcripts out of "+ transcriptsProcessedCounter + " total (" + ( transcriptsProcessedCounter == 0 ? 0 : (100*skippedTranscriptCounter)/transcriptsProcessedCounter) + "%)");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue