Package htsjdk.samtools

Examples of htsjdk.samtools.SAMFileReader.query()


        SAMRecordIterator rawIterator;
        if ( location == null )
            rawIterator = reader.iterator();
        else {
            final GenomeLoc loc = genomeLocParser.parseGenomeLoc(location);
            rawIterator = reader.query(loc.getContig(), loc.getStart(), loc.getStop(), false);
        }

        final GATKSAMRecordIterator iterator = new GATKSAMRecordIterator(rawIterator);

        final Set<String> samples = new HashSet<String>();
View Full Code Here


        if (in.hasIndex()) {
            final SAMFileWriter out = new SAMFileWriterFactory().makeSAMOrBAMWriter(outHeader, true, OUTPUT);

            // write the reads in contig order
            for (final SAMSequenceRecord contig : refDict.getSequences() ) {
                final SAMRecordIterator it = in.query(contig.getSequenceName(), 0, 0, false);
                writeReads(out, it, newOrder, contig.getSequenceName());
            }
            // don't forget the unmapped reads
            writeReads( out, in.queryUnmapped(), newOrder, "unmapped" );
            out.close();
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.