Package org.broadinstitute.gatk.utils.commandline

Examples of org.broadinstitute.gatk.utils.commandline.Tags


    protected final static Logger logger = Logger.getLogger(TrainingSet.class);

    public TrainingSet( final RodBinding<VariantContext> rodBinding) {
        this.rodBinding = rodBinding;

        final Tags tags = rodBinding.getTags();
        final String name = rodBinding.getName();

        // Parse the tags to decide which tracks have which properties
        if( tags != null ) {
            isKnown = tags.containsKey("known") && tags.getValue("known").equals("true");
            isTraining = tags.containsKey("training") && tags.getValue("training").equals("true");
            isAntiTraining = tags.containsKey("bad") && tags.getValue("bad").equals("true");
            isTruth = tags.containsKey("truth") && tags.getValue("truth").equals("true");
            isConsensus = tags.containsKey("consensus") && tags.getValue("consensus").equals("true");
            prior = ( tags.containsKey("prior") ? Double.parseDouble(tags.getValue("prior")) : prior );
        }

        // Report back to the user which tracks were found and the properties that were detected
        if( !isConsensus && !isAntiTraining ) {
            logger.info( String.format( "Found %s track: \tKnown = %s \tTraining = %s \tTruth = %s \tPrior = Q%.1f", name, isKnown, isTraining, isTruth, prior) );
View Full Code Here


        final FeatureManager.FeatureDescriptor descriptor = getFeatureManager().getByCodec(codecClass);

        if (descriptor == null)
            throw new ReviewedGATKException("Unable to find type name for codec class " + codecClass.getName());

        return createInstanceOfTrack(new RMDTriplet("anonymous",descriptor.getName(),inputFile.getAbsolutePath(),RMDStorageType.FILE,new Tags()));
    }
View Full Code Here

    public void testCountsFromReadTraversal() {
        final GenomeAnalysisEngine engine = new GenomeAnalysisEngine();
        engine.setGenomeLocParser(genomeLocParser);

        final Collection<SAMReaderID> samFiles = new ArrayList<>();
        final SAMReaderID readerID = new SAMReaderID(testBAM, new Tags());
        samFiles.add(readerID);

        final SAMDataSource dataSource = new SAMDataSource(samFiles, new ThreadAllocation(), null, genomeLocParser,
                false,
                ValidationStringency.STRICT,
View Full Code Here

    public void testCountsFromLocusTraversal() {
        final GenomeAnalysisEngine engine = new GenomeAnalysisEngine();
        engine.setGenomeLocParser(genomeLocParser);

        final Collection<SAMReaderID> samFiles = new ArrayList<>();
        final SAMReaderID readerID = new SAMReaderID(testBAM, new Tags());
        samFiles.add(readerID);

        final SAMDataSource dataSource = new SAMDataSource(samFiles, new ThreadAllocation(), null, genomeLocParser,
                false,
                ValidationStringency.STRICT,
View Full Code Here

    public void testCountsFromActiveRegionTraversal() {
        final GenomeAnalysisEngine engine = new GenomeAnalysisEngine();
        engine.setGenomeLocParser(genomeLocParser);

        final Collection<SAMReaderID> samFiles = new ArrayList<>();
        final SAMReaderID readerID = new SAMReaderID(testBAM, new Tags());
        samFiles.add(readerID);

        final SAMDataSource dataSource = new SAMDataSource(samFiles, new ThreadAllocation(), null, genomeLocParser,
                false,
                ValidationStringency.STRICT,
View Full Code Here

    public void testFilteredCounts() {
        final GenomeAnalysisEngine engine = new GenomeAnalysisEngine();
        engine.setGenomeLocParser(genomeLocParser);

        final Collection<SAMReaderID> samFiles = new ArrayList<>();
        final SAMReaderID readerID = new SAMReaderID(testBAM, new Tags());
        samFiles.add(readerID);

        final List<ReadFilter> filters = new ArrayList<>();
        filters.add(new EveryTenthReadFilter());
View Full Code Here

            argCollection.referenceFile = new File(referenceFile);
            argCollection.samFiles = Collections.singletonList(inputFile.getAbsolutePath());

            engine.setArguments(argCollection);
            // Bugs in the engine mean that this has to be set twice.
            engine.setSAMFileIDs(Collections.singletonList(new SAMReaderID(inputFile,new Tags())));
            engine.setFilters(Collections.<ReadFilter>singletonList(new UnmappedReadFilter()));
            engine.setReferenceMetaDataFiles(Collections.<RMDTriplet>emptyList());

            // Create the walker
            engine.setWalker(walkerType.create());
View Full Code Here

    public void testSAMReaderIDHashingAndEquality() {
        // Test to make sure that two SAMReaderIDs that point at the same file via an absolute vs. relative
        // path are equal according to equals() and have the same hash code
        final File relativePathToBAMFile = new File(publicTestDir + "exampleBAM.bam");
        final File absolutePathToBAMFile = new File(relativePathToBAMFile.getAbsolutePath());
        final SAMReaderID relativePathSAMReaderID = new SAMReaderID(relativePathToBAMFile, new Tags());
        final SAMReaderID absolutePathSAMReaderID = new SAMReaderID(absolutePathToBAMFile, new Tags());

        Assert.assertEquals(relativePathSAMReaderID, absolutePathSAMReaderID, "Absolute-path and relative-path SAMReaderIDs not equal according to equals()");
        Assert.assertEquals(relativePathSAMReaderID.hashCode(), absolutePathSAMReaderID.hashCode(), "Absolute-path and relative-path SAMReaderIDs have different hash codes");
    }
View Full Code Here

    @Test
    public void testLinearBreakIterateAll() {
        logger.warn("Executing testLinearBreakIterateAll");

        // setup the data
        readers.add(new SAMReaderID(new File(validationDataLocation+"/NA12878.chrom6.SLX.SRP000032.2009_06.selected.bam"),new Tags()));

        // the sharding strat.
        SAMDataSource data = new SAMDataSource(readers,
                new ThreadAllocation(),
                null,
View Full Code Here

    @Test
    public void testRemoveProgramRecords() {
        logger.warn("Executing testRemoveProgramRecords");

        // setup the data
        readers.add(new SAMReaderID(new File(b37GoodBAM),new Tags()));

        // use defaults
        SAMDataSource data = new SAMDataSource(readers,
                new ThreadAllocation(),
                null,
View Full Code Here

TOP

Related Classes of org.broadinstitute.gatk.utils.commandline.Tags

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.