Examples of queryOverlapping()


Examples of htsjdk.samtools.SAMFileReader.queryOverlapping()

        SAMFileReader writtenReader = new SAMFileReader(new File(outPath));
        writtenReader.setValidationStringency(ValidationStringency.SILENT);
        SAMRecordIterator iter = null;
        if(createIndex){
            iter = writtenReader.queryOverlapping(sequence, start + 1, end);
        }else{
            iter = writtenReader.iterator();
        }

        int readCount = 0;
View Full Code Here

Examples of htsjdk.samtools.SAMFileReader.queryOverlapping()

        reader = new SAMFileReader(bamFile);
        reader.setValidationStringency(ValidationStringency.SILENT);
        reader.enableIndexCaching(true);
        index = reader.getIndex();

        reader.queryOverlapping(contigName,1,reader.getFileHeader().getSequence(contigName).getSequenceLength()).close();

        int numBins = 0;
        int numChunks = 0;
        int numLinearIndexEntries = 0;
View Full Code Here

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

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

      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

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

      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

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

          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.