code: def _can_use_mem(fastq_file, data, read_min_size=None):
      
      min_size = 70
      if read_min_size and read_min_size >= min_size:
          return True
      thresh = 0.75
      tocheck = 5000
      shorter = 0
      for count, size in fastq_size_output(fastq_file, tocheck):
          if int(size) < min_size:
              shorter += int(count)
      return (float(shorter) / float(tocheck)) <= thresh
docs: bwa-mem handle longer (> 70bp) reads with improved piping.
      Randomly samples 5000 reads from the first two million.
      Default to no piping if more than 75% of the sampled reads are small.
      If we've previously calculated minimum read sizes (from rtg SDF output)
      we can skip the formal check.