Package org.broad.igv.sam

Examples of org.broad.igv.sam.PicardAlignment


    public boolean hasNext() {
        return iter.hasNext();
    }

    public PicardAlignment next() {
        return new PicardAlignment(iter.next());
    }
View Full Code Here


        if (wrappedIterator.hasNext()) {
            currentRecord = wrappedIterator.next();
        } else {
            currentRecord = null;
        }
        return new PicardAlignment(ret);

    }
View Full Code Here

        Iterator<PicardAlignment> inputAlignmentIterator = reader.iterator();
        ArrayList<PicardAlignment> inputAlignmentList = new ArrayList<PicardAlignment>();

        while (inputAlignmentIterator.hasNext()) {
            PicardAlignment al = inputAlignmentIterator.next();
            inputAlignmentList.add(al);
        }
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        FeatureEncoder<PicardAlignment> alignmentEncoder = new SamAlignmentEncoder();
        alignmentEncoder.encodeAll(bos, reader.iterator());
View Full Code Here

    private boolean headerSet = false;

    public Map<String, Object> encodeAll(OutputStream stream, Iterator<? extends PicardAlignment> alignments) {
        SAMFileWriterImpl writer = new SAMTextWriter(stream);
        while (alignments.hasNext()) {
            PicardAlignment samAl = alignments.next();
            if (!headerSet) {
                writer.setSortOrder(SAMFileHeader.SortOrder.unsorted, true);
                writer.setHeader(samAl.getRecord().getHeader());
                headerSet = true;
            }
            writer.addAlignment(samAl.getRecord());
        }
        writer.close();
        return null;
    }
View Full Code Here

TOP

Related Classes of org.broad.igv.sam.PicardAlignment

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.