Examples of queryUnmapped()


Examples of htsjdk.samtools.SAMFileReader.queryUnmapped()

            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();
        }
        else {
            SAMFileWriter out = new SAMFileWriterFactory().makeSAMOrBAMWriter(outHeader, false, OUTPUT);
            writeReads(out, in.iterator(), newOrder, "All reads");
View Full Code Here

Examples of net.sf.samtools.SAMFileReader.queryUnmapped()

    }
    threads.waitForAllThreadsToComplete();
   
    // Now go back and retrieve the unmapped reads.
    System.err.println("Processing unmapped reads");
    Iterator<SAMRecord> iter = rdr.queryUnmapped();
    while (iter.hasNext()) {
      SAMRecord read = iter.next();
   
      // If this read is not assigned a position, but the mate is, include in the output BAM associated with mate's chromosome.
      if (read.getReferenceIndex() == SAMRecord.NO_ALIGNMENT_REFERENCE_INDEX && read.getMateReferenceIndex() != SAMRecord.NO_ALIGNMENT_REFERENCE_INDEX) {
View Full Code Here

Examples of net.sf.samtools.SAMFileReader.queryUnmapped()

    SAMRecordIterator it1, it2;
    if (params.location != null) {
      AlignmentSliceQuery query = new AlignmentSliceQuery(params.location);
      if (SAMRecord.NO_ALIGNMENT_REFERENCE_NAME.equals(query.sequence)) {
        it1 = r1.queryUnmapped();
        it2 = r2.queryUnmapped();
      } else {
        it1 = r1.queryContained(query.sequence, query.start, query.end);
        it2 = r2.queryContained(query.sequence, query.start, query.end);
      }
    } else {
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.