Package org.broadinstitute.gatk.utils.sam

Examples of org.broadinstitute.gatk.utils.sam.GATKSAMReadGroupRecord


    public ArtificialReadPileupTestProvider(final int numSamples, final String SAMPLE_PREFIX) {
        sampleRGs = new ArrayList<SAMReadGroupRecord>();

        for ( int i = 0; i < numSamples; i++ ) {
            sampleNames.add(String.format("%s%04d", SAMPLE_PREFIX, i));
            GATKSAMReadGroupRecord rg = createRG(sampleName(i));
            sampleRGs.add(rg);
            sample2RG.put(sampleName(i), rg);
        }

    }
View Full Code Here


        return contexts;
    }

    private GATKSAMReadGroupRecord createRG(String name) {
        GATKSAMReadGroupRecord rg = new GATKSAMReadGroupRecord(name);
        rg.setPlatform("ILLUMINA");
        rg.setSample(name);
        return rg;
    }
View Full Code Here

    }

    @BeforeTest
    public void setup() {
        header = ArtificialSAMUtils.createArtificialSamHeader(1,1,1000);
        rgForMerged = new GATKSAMReadGroupRecord("RG1");
    }
View Full Code Here

        read.setProperPairFlag(true);
        read.setReadPairedFlag(true);
        read.setInferredInsertSize(30);
        read.setReadNegativeStrandFlag(negStrand);
        read.setMateNegativeStrandFlag(! negStrand);
        read.setReadGroup(new GATKSAMReadGroupRecord("foo"));
        return read;
    }
View Full Code Here

            headerMerger = new SamFileHeaderMerger(SAMFileHeader.SortOrder.coordinate,headers,true);

            // update all read groups to GATKSAMRecordReadGroups
            final List<SAMReadGroupRecord> gatkReadGroups = new LinkedList<SAMReadGroupRecord>();
            for ( final SAMReadGroupRecord rg : headerMerger.getMergedHeader().getReadGroups() ) {
                gatkReadGroups.add(new GATKSAMReadGroupRecord(rg));
            }
            headerMerger.getMergedHeader().setReadGroups(gatkReadGroups);
        }
View Full Code Here

        final SAMFileHeader header = ArtificialSAMUtils.createArtificialSamHeader(1, 1, 100000);
        final int nSamples = 1;
        final List<String> samples = new ArrayList<String>(nSamples);
        for ( int i = 0; i < nSamples; i++ ) {
            final GATKSAMReadGroupRecord rg = new GATKSAMReadGroupRecord("rg" + i);
            final String sample = "sample" + i;
            samples.add(sample);
            rg.setSample(sample);
            rg.setPlatform(NGSPlatform.ILLUMINA.getDefaultPlatform());
            header.addReadGroup(rg);
        }

        final boolean downsample = downsampleTo != -1;
        final DownsamplingMethod downsampler = downsample
View Full Code Here

        private GATKSAMRecord makeRead() {
            final SAMReadGroupRecord rg = header.getReadGroups().get(0);
            final String readName = String.format("%s.%d.%s", "read", readI, rg.getId());
            final GATKSAMRecord read = ArtificialSAMUtils.createArtificialRead(header, readName, 0, 1, readLength);
            read.setReadGroup(new GATKSAMReadGroupRecord(rg));
            if ( payloadInBytes > 0 )
                // add a payload byte array to push memory use per read even higher
                read.setAttribute("PL", new byte[payloadInBytes]);
            return read;
        }
View Full Code Here

TOP

Related Classes of org.broadinstitute.gatk.utils.sam.GATKSAMReadGroupRecord

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.