Return true if the specified fastq is the left or first read of a paired end read.

@param fastq fastq, must not be null
@return true if the specified fastq is the left or first read of a paired end read
764426
static boolean isLeft(final Fastq fastq) {
        checkNotNull(fastq);
        return LEFT.matcher(fastq.getDescription()).matches();
    }
838975
public boolean hasNext()
  {
    if (tc.isEntryEnabled()) Tr.entry(tc, "hasNext",this);

    boolean hasNext = false;

    if ( (!_empty) && ( (_singleObject != null)                          ||
                        ((_iterator1 != null) && (_iterator1.hasNext())) ||
                        ((_iterator2 != null) && (_iterator2.hasNext()))  ) )
    {
      hasNext = true;
    }

    if (tc.isEntryEnabled()) Tr.exit(tc, "hasNext",new Boolean(hasNext));
    return hasNext;
  }
678433
def aligned_read_to_read(read, revcomp=True, qual=None, ignore_quality=False):
    ''''''
    if read.qual is None or ignore_quality:
        if qual is None or ignore_quality:
            seq = pyfastaq.sequences.Fasta(read.qname, common.decode(read.seq))
        else:
            seq = pyfastaq.sequences.Fastq(read.qname, common.decode(read.seq), qual * read.query_length)
    else:
        if qual is None:
            seq = pyfastaq.sequences.Fastq(read.qname, common.decode(read.seq), common.decode(read.qual))
        else:
            seq = pyfastaq.sequences.Fastq(read.qname, common.decode(read.seq), qual * read.query_length)

    if read.is_reverse and revcomp:
        seq.revcomp()

    return seq
243342
@Override
    public boolean hasNext() {
        if (answerIterator.hasNext()) return true;

        while (conjIterator.hasNext()) {
            answerIterator = conjunctionIterator(conjIterator.next(), tx);
            if (answerIterator.hasNext()) return true;
        }
        return false;
    }
1286087
def is_transformed(fastq):
    

    with open_fastq(fastq) as in_handle:
        for line in islice(in_handle, 400):
            if "UMI_" in line:
                return True
    return False
229663
private static boolean startsWith(String[] left, List<String> right) {
    // short circuit if a match isn't possible
    if (left.length < right.size()) {
      return false;
    }

    for (int i = 0; i < right.size(); i += 1) {
      if (!left[i].equals(right.get(i))) {
        return false;
      }
    }

    return true;
  }
557530
public static boolean isBlank(CharSequence sourceSequence) {
        int sequenceLength;
        if (sourceSequence == null || (sequenceLength = sourceSequence.length()) == 0) {
            return true;
        }
        for (int i = 0; i < sequenceLength; i++) {
            if ((Character.isWhitespace(sourceSequence.charAt(i)) == false)) {
                return false;
            }
        }
        return true;
    }
687055
public static boolean areEqualTrimmed(final String left, final String right)
   {
      if ((left != null) && (right != null))
      {
         return left.trim().equals(right.trim());
      }
      return areEqual(left, right);
   }
877535
private boolean readNextLine() throws IOException {
        boolean newLine = false;
        if (bufferLimit > 0 && !bufferLineEnd) {
            // check for "last line"
            if (bufferLimit < buffer.length) {
                return false;
            }
        } else {
            newLine = true;
        }

        bufferLineEnd = false;

        int off = 0;
        char[] b = new char[1];
        while (off < buffer.length && reader.read(b, 0, 1) > 0) {
            final char ch = b[0];
            buffer[off] = ch;
            ++off;
            if (ch == '\n') {
                bufferLineEnd = true;
                break;
            }
        }
        if (off > 0) {
            if (newLine) {
                ++lineNo;
                linePos = 0;
            }
            if (off < buffer.length) {
                buffer[off] = 0;
            }
            bufferOffset = -1;
            bufferLimit = off;
            return true;
        }
        return false;
    }
1062248
def bam_to_fastq(bam_file, is_paired):
    
    out_files, out_handles = _get_fastq_handles(bam_file,
            is_paired)
    if len(out_handles) > 0:
        in_bam = pysam.Samfile(bam_file, mode='rb')
        for read in in_bam:
            num = 1 if (not read.is_paired or read.is_read1) else 2
            # reverse the sequence and quality if mapped to opposite strand
            if read.is_reverse:
                seq = str(Seq.reverse_complement(Seq.Seq(read.seq)))
                qual = "".join(reversed(read.qual))
            else:
                seq = read.seq
                qual = read.qual
            out_handles[num].write("@%s\n%s\n+\n%s\n" % (read.qname,
                seq, qual))
    [h.close() for h in out_handles.values()]
    return out_files
931632
def __read_seq_header(fh, prev_line):
  
  seq_header = ""
  if prev_line is not None and not _isSequenceHead(prev_line):
    raise FastaFileFormatError("terminated on non-read header: " + prev_line)
  if prev_line is None:
    while seq_header.strip() == "":
      seq_header = fh.readline()
  else:
    seq_header = prev_line
  return seq_header
1127825
public boolean hasNext() {
        if (currentIndex == endIndex) {
            return false;
        }
              
        // Otherwise, see if nextElement is null. If so, try to load the next
        // element to make sure it exists.
        if (nextElement == null) {
            nextElement = getNextElement();
            if (nextElement == null) {
                return false;
            }
        }
        return true;
    }
1356477
private boolean isAllowedPermutation(List<Integer> permutation) {
		List<Integer> seqClusterId = subunits.getClusterIds();
		int selfaligned = 0;
		for (int i = 0; i < permutation.size(); i++) {
			int j = permutation.get(i);
			if ( seqClusterId.get(i) != seqClusterId.get(j)) {
				return false;
			}
			if(i == j ) {
				selfaligned++;
			}
		}
		// either identity (all self aligned) or all unique
		return selfaligned == 0 || selfaligned == permutation.size();
	}
1097348
public synchronized boolean hasNext()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "hasNext");

    if(next == null)
    {
      synchronized(index)
      {
        next = (Index.Entry) cursor.next();
        if(filter != null)
        {
          while(next != null && !filter.matches(next.type))
          {
            next = (Index.Entry) cursor.next();
          }
        }
      }
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "hasNext", new Boolean(next != null));

    return (next != null);
  }
291928
public static void quickSort(double[] arrayToSort, double[] linkedArray, int left, int right) {
    if (left < right) {
      int middle = partition(arrayToSort, linkedArray, left, right);
      quickSort(arrayToSort, linkedArray, left, middle);
      quickSort(arrayToSort, linkedArray, middle + 1, right);
    }
  }
610715
public static boolean hasQObject(final Reader reader) throws IOException {
    final MetaObjectParser parser = new MetaObjectParser();
    parser.parse(reader);
    return parser.hasQObject;

  }
623044
def has_end(self, stream):
        
        for token in self.end_tokens:
            if not self.has_next(token, stream):
                continue

            offset = len(token)

            if self.has_eof(stream, offset):
                return True

            if self.has_whitespace(stream, offset):
                return True

            if self.has_comment(stream, offset):
                return True

            if self.has_next(self.statement_delimiter, stream, offset):
                return True

        return self.has_eof(stream)