@Override protected void log(final String... message) { log.info((Object[])message); } }
/** ReaderImplementation */ @Override void enableFileSource(final SamReader reader, final boolean enabled) { log.info("enableFileSource is not supported"); }
/** ReaderImplementation */ @Override void enableFileSource(final SamReader reader, final boolean enabled) { log.info("enableFileSource is not supported"); }
/** * Print out some quick JVM memory stats. */ private void reportMemoryStats(final String stage) { System.gc(); final Runtime runtime = Runtime.getRuntime(); log.info(stage + " freeMemory: " + runtime.freeMemory() + "; totalMemory: " + runtime.totalMemory() + "; maxMemory: " + runtime.maxMemory()); }
private static void printConfigurationInfo() throws IOException { log.info("Executing as " + System.getProperty("user.name") + '@' + InetAddress.getLocalHost().getHostName() + " on " + System.getProperty("os.name") + ' ' + System.getProperty("os.version") + ' ' + System.getProperty("os.arch") + "; " + System.getProperty("java.vm.name") + ' ' + System.getProperty("java.runtime.version")); final List<String> list = Defaults.allDefaults().entrySet().stream().map(e -> e.getKey() + ':' + e.getValue()).collect(Collectors.toList()); log.info(String.join(" ", list)); } }
private static void printConfigurationInfo() throws IOException { log.info("Executing as " + System.getProperty("user.name") + '@' + InetAddress.getLocalHost().getHostName() + " on " + System.getProperty("os.name") + ' ' + System.getProperty("os.version") + ' ' + System.getProperty("os.arch") + "; " + System.getProperty("java.vm.name") + ' ' + System.getProperty("java.runtime.version")); final List<String> list = Defaults.allDefaults().entrySet().stream().map(e -> e.getKey() + ':' + e.getValue()).collect(Collectors.toList()); log.info(String.join(" ", list)); } }
private static File writeMetrics(final MetricsFile<MetricBase, Comparable<?>> metricsFile, final File outputDirectory, final String outputPrefix, final String outputExtension) { final File outputFile = new File(outputDirectory, String.format("%s.%s", outputPrefix, outputExtension)); LOG.info(String.format("Writing %s lane metrics to %s ...", metricsFile.getMetrics().size(), outputFile)); metricsFile.write(outputFile); return outputFile; }
public void logMemoryStats(final Log log) { System.gc(); final Runtime runtime = Runtime.getRuntime(); log.info("freeMemory: " + runtime.freeMemory() + "; totalMemory: " + runtime.totalMemory() + "; maxMemory: " + runtime.maxMemory() + "; output buffer size: " + outputBuffer.size() + "; duplicate queue size: " + toMarkQueue.size() ); }
public static void awaitThreadPoolTermination(final String executorName, final ThreadPoolExecutor executorService, final Duration timeBetweenChecks) { try { while (!executorService.awaitTermination(timeBetweenChecks.getSeconds(), TimeUnit.SECONDS)) { log.info(String.format("%s waiting for job completion. Finished jobs - %d : Running jobs - %d : Queued jobs - %d", executorName, executorService.getCompletedTaskCount(), executorService.getActiveCount(), executorService.getQueue().size())); } } catch (final InterruptedException e) { log.error("Interrupted exception caught: ", e); } } }
public void logMemoryStats(final Log log) { System.gc(); final Runtime runtime = Runtime.getRuntime(); log.info("freeMemory: " + runtime.freeMemory() + "; totalMemory: " + runtime.totalMemory() + "; maxMemory: " + runtime.maxMemory() + "; output buffer size: " + outputBuffer.size() + "; duplicate queue size: " + toMarkQueue.size() ); }
private Set<String> makeContextStrings(final int contextSize) { final Set<String> contexts = new HashSet<>(); for (final byte[] kmer : SequenceUtil.generateAllKmers(2 * contextSize + 1)) { if (kmer[contextSize] == 'C') { contexts.add(StringUtil.bytesToString(kmer)); } } log.info("Generated " + contexts.size() + " context strings."); return contexts; }
private void readAllAlignments(final SamReaderFactory readerFactory) { SamReader fromExternalProgram = readerFactory.open(SamInputResource.of(aligner.getInputStream())); SAMRecordIterator it = fromExternalProgram.iterator(); while (it.hasNext()) { SAMRecord r = it.next(); buffer.add(r); outstandingReads.decrementAndGet(); } log.info(String.format("Reader thread complete. %s reads in output buffer", buffer.size())); } /**
/** * Add record if it is primary or optionally secondary. */ private void addIfNotFiltered(final Sink out, final SAMRecord rec) { if (includeSecondaryAlignments || !rec.getNotPrimaryAlignmentFlag()) { out.add(rec); if (this.progress.record(rec) && crossSpeciesReads > 0) { log.info(String.format("%d Reads have been unmapped due to being suspected of being Cross-species contamination.", crossSpeciesReads)); } } }
/** * Add record if it is primary or optionally secondary. */ private void addIfNotFiltered(final Sink out, final SAMRecord rec) { if (includeSecondaryAlignments || !rec.getNotPrimaryAlignmentFlag()) { out.add(rec); if (this.progress.record(rec) && crossSpeciesReads > 0) { log.info(String.format("%d Reads have been unmapped due to being suspected of being Cross-species contamination.", crossSpeciesReads)); } } }
private void write(File output) throws IOException { log.info("Writing simplified variant calls to " + output.getName() + ". Only use this output if your pipeline is unable to process variants in VCF breakend notation."); File working = FileSystemContext.getWorkingFileFor(output); VariantContextWriter vcfWriter = processContext.getVariantContextWriter(working, true); Collections.sort(outputBuffer, IdsvVariantContext.ByLocationStart); for (IdsvVariantContext v : outputBuffer) { vcfWriter.add(v); } CloserUtil.close(vcfWriter); FileHelper.move(working, output, true); } private void load(File breakendCalls) {
@Override public int doWork(ExecutorService threadpool) throws IOException, InterruptedException, ExecutionException { IOUtil.assertFileIsWritable(OUTPUT_VCF); VariantCaller caller = new VariantCaller(getContext(), getSamEvidenceSources(), getAssemblySource()); caller.callBreakends(OUTPUT_VCF, threadpool); log.info("Raw variant calls written to " + OUTPUT_VCF); return 0; } }
CramToBam_OBA_Function(CramHeader header, ReferenceSource referenceSource) { this.header = header; parser = new ContainerParser(header.getSamFileHeader()); f = new Cram2SamRecordFactory(header.getSamFileHeader()); codec = new BAMRecordCodec(header.getSamFileHeader()); n = new CramNormalizer(header.getSamFileHeader(), referenceSource); log.info("converter created"); }