Package net.sf.samtools

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


    SAMFileReader reader = new SAMFileReader(new File(inputSam));
    reader.setValidationStringency(ValidationStringency.SILENT);
   
    for (Feature region : regions) {
      int count = 0;
      SAMRecordIterator iter = reader.queryOverlapping(region.getSeqname(), (int) region.getStart(), (int) region.getEnd());
      while (iter.hasNext()) {
        iter.next();
        count += 1;
      }
      iter.close();
View Full Code Here


      long numReadsWithAmbiguousBases = 0;
      long numReadsIntersectLt20Ambiguous = 0;
      long minMapq = 1000;
      long totalMapq = 0;
     
      CloseableIterator<SAMRecord> iter = reader.queryOverlapping(region.getSeqname(), (int) region.getStart(), (int) region.getEnd());
     
      while (iter.hasNext()) {
        SAMRecord read = iter.next();
       
        if (read.getMappingQuality() >= 10) {
View Full Code Here

      SAMFileReader reader = new SAMFileReader(new File(input));
      reader.setValidationStringency(ValidationStringency.SILENT);

      int[] counts = new int[thresholds.length];
      System.err.println(region.getDescriptor());
      Iterator<SAMRecord> iter = reader.queryOverlapping(region.getSeqname(), (int) region.getStart(), (int) region.getEnd());
      while (iter.hasNext()) {
        SAMRecord read = iter.next();
        if (!read.getReadUnmappedFlag()) {
          for (int i=0; i<thresholds.length; i++) {
            if (read.getMappingQuality() <= thresholds[i]) {
View Full Code Here

          SAMFileReader reader = new SAMFileReader(new File(input));
          reader.setValidationStringency(ValidationStringency.SILENT);
         
          Iterator<SAMRecord> iter;
          if (region != null) {
            iter = reader.queryOverlapping(region.getSeqname(), (int) region.getStart(), (int) region.getEnd());
          } else {
            iter = reader.iterator();
          }
         
          int candidateReadCount = 0;
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.