Examples of addReadGroup()


Examples of htsjdk.samtools.SAMFileHeader.addReadGroup()

    public Object[][] createDownsamplingReadsIteratorTests() {
        SAMFileHeader header = ArtificialSAMUtils.createArtificialSamHeader(5, 1, 10000);
        String readGroupID = "testReadGroup";
        SAMReadGroupRecord readGroup = new SAMReadGroupRecord(readGroupID);
        readGroup.setSample("testSample");
        header.addReadGroup(readGroup);

        // Values that don't vary across tests
        int targetCoverage = 10;
        int minReadLength = 50;
        int maxReadLength = 100;
View Full Code Here

Examples of htsjdk.samtools.SAMFileHeader.addReadGroup()

    public void testSplitByReadGroup() {
        SAMReadGroupRecord readGroupOne = new SAMReadGroupRecord("rg1");
        SAMReadGroupRecord readGroupTwo = new SAMReadGroupRecord("rg2");

        SAMFileHeader header = ArtificialSAMUtils.createArtificialSamHeader(1,1,1000);
        header.addReadGroup(readGroupOne);
        header.addReadGroup(readGroupTwo);

        GATKSAMRecord read1 = ArtificialSAMUtils.createArtificialRead(header,"read1",0,1,10);
        read1.setAttribute("RG",readGroupOne.getId());
        GATKSAMRecord read2 = ArtificialSAMUtils.createArtificialRead(header,"read2",0,1,10);
View Full Code Here

Examples of htsjdk.samtools.SAMFileHeader.addReadGroup()

        SAMReadGroupRecord readGroupOne = new SAMReadGroupRecord("rg1");
        SAMReadGroupRecord readGroupTwo = new SAMReadGroupRecord("rg2");

        SAMFileHeader header = ArtificialSAMUtils.createArtificialSamHeader(1,1,1000);
        header.addReadGroup(readGroupOne);
        header.addReadGroup(readGroupTwo);

        GATKSAMRecord read1 = ArtificialSAMUtils.createArtificialRead(header,"read1",0,1,10);
        read1.setAttribute("RG",readGroupOne.getId());
        GATKSAMRecord read2 = ArtificialSAMUtils.createArtificialRead(header,"read2",0,1,10);
        read2.setAttribute("RG",readGroupTwo.getId());
View Full Code Here

Examples of htsjdk.samtools.SAMFileHeader.addReadGroup()

        readGroupOne.setSample("sample1");
        SAMReadGroupRecord readGroupTwo = new SAMReadGroupRecord("rg2");
        readGroupTwo.setSample("sample2");

        SAMFileHeader header = ArtificialSAMUtils.createArtificialSamHeader(1,1,1000);
        header.addReadGroup(readGroupOne);
        header.addReadGroup(readGroupTwo);

        GATKSAMRecord read1 = ArtificialSAMUtils.createArtificialRead(header,"read1",0,1,10);
        read1.setAttribute("RG",readGroupOne.getId());
        GATKSAMRecord read2 = ArtificialSAMUtils.createArtificialRead(header,"read2",0,1,10);
View Full Code Here

Examples of htsjdk.samtools.SAMFileHeader.addReadGroup()

        SAMReadGroupRecord readGroupTwo = new SAMReadGroupRecord("rg2");
        readGroupTwo.setSample("sample2");

        SAMFileHeader header = ArtificialSAMUtils.createArtificialSamHeader(1,1,1000);
        header.addReadGroup(readGroupOne);
        header.addReadGroup(readGroupTwo);

        GATKSAMRecord read1 = ArtificialSAMUtils.createArtificialRead(header,"read1",0,1,10);
        read1.setAttribute("RG",readGroupOne.getId());
        GATKSAMRecord read2 = ArtificialSAMUtils.createArtificialRead(header,"read2",0,1,10);
        read2.setAttribute("RG",readGroupTwo.getId());
View Full Code Here

Examples of htsjdk.samtools.SAMFileHeader.addReadGroup()

        readGroupOne.setSample(sample1);
        SAMReadGroupRecord readGroupTwo = new SAMReadGroupRecord("rg2");
        readGroupTwo.setSample(sample2);

        SAMFileHeader header = ArtificialSAMUtils.createArtificialSamHeader(1,1,1000);
        header.addReadGroup(readGroupOne);
        header.addReadGroup(readGroupTwo);

        GATKSAMRecord read1 = ArtificialSAMUtils.createArtificialRead(header,"read1",0,1,10);
        read1.setAttribute("RG",readGroupOne.getId());
        GATKSAMRecord read2 = ArtificialSAMUtils.createArtificialRead(header,"read2",0,1,10);
View Full Code Here

Examples of htsjdk.samtools.SAMFileHeader.addReadGroup()

        SAMReadGroupRecord readGroupTwo = new SAMReadGroupRecord("rg2");
        readGroupTwo.setSample(sample2);

        SAMFileHeader header = ArtificialSAMUtils.createArtificialSamHeader(1,1,1000);
        header.addReadGroup(readGroupOne);
        header.addReadGroup(readGroupTwo);

        GATKSAMRecord read1 = ArtificialSAMUtils.createArtificialRead(header,"read1",0,1,10);
        read1.setAttribute("RG",readGroupOne.getId());
        GATKSAMRecord read2 = ArtificialSAMUtils.createArtificialRead(header,"read2",0,1,10);
        read2.setAttribute("RG",readGroupTwo.getId());
View Full Code Here

Examples of htsjdk.samtools.SAMFileHeader.addReadGroup()

    public Object[][] createArtificialSingleSampleReadStreamTests() {
        SAMFileHeader header = ArtificialSAMUtils.createArtificialSamHeader(3, 1, 10000);
        String readGroupID = "testReadGroup";
        SAMReadGroupRecord readGroup = new SAMReadGroupRecord(readGroupID);
        readGroup.setSample("testSample");
        header.addReadGroup(readGroup);

        GenomeAnalysisEngine.resetRandomGenerator();

        // brute force testing!
        for ( int numContigs = 0; numContigs <= 2; numContigs++ ) {
View Full Code Here

Examples of htsjdk.samtools.SAMFileHeader.addReadGroup()

    @DataProvider(name = "ArtificialSingleSampleReadStreamInvalidArgumentsTestDataProvider")
    public Object[][] createInvalidArgumentsTests() {
        SAMFileHeader header = ArtificialSAMUtils.createArtificialSamHeader(3, 1, 10000);
        String readGroupID = "testReadGroup";
        header.addReadGroup(new SAMReadGroupRecord(readGroupID));

        return new Object[][] {
            {"testNullHeader", null, readGroupID, 1, 1, 1, 2, 1, 2, 1, 2, 0},
            {"testNullReadGroup", header, null, 1, 1, 1, 2, 1, 2, 1, 2, 0},
            {"testInvalidReadGroup", header, "foo", 1, 1, 1, 2, 1, 2, 1, 2, 0},
View Full Code Here

Examples of htsjdk.samtools.SAMFileHeader.addReadGroup()

        final SAMFileHeader header = ArtificialSAMUtils.createArtificialSamHeader(seq.getSequenceDictionary());
        final String rgID = "ID";
        final SAMReadGroupRecord rg = new SAMReadGroupRecord(rgID);
        if ( plField != null )
            rg.setPlatform(plField);
        header.addReadGroup(rg);
        final GATKSAMRecord read = ArtificialSAMUtils.createArtificialRead(header, "myRead", 0, 1, 10);
        read.setAttribute("RG", rgID);
        Assert.assertEquals(NGSPlatform.fromRead(read), expected);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.