本文整理了Java中htsjdk.samtools.util.Log.debug()
方法的一些代码示例,展示了Log.debug()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Log.debug()
方法的具体详情如下:
包路径:htsjdk.samtools.util.Log
类名称:Log
方法名:debug
[英]Logs a Throwable and optional message parts at level debug.
[中]在调试级别记录可丢弃和可选的消息部分。
代码示例来源:origin: PapenfussLab/gridss
@Override
public void close() throws IOException {
log.debug("close() called");
if (reference != null) reference.close();
}
代码示例来源:origin: enasequence/cramtools
public boolean cleanUp() {
log.debug("Cleaning up task ", fileNameBase);
inProgressMarkerFile.delete();
failedMarkerFile.delete();
successMarkerFile.delete();
outputFile.delete();
errorFile.delete();
if (outputFiles != null)
for (File file : outputFiles)
file.delete();
return STATUS.NONE == status();
}
代码示例来源:origin: enasequence/cramtools
private OrderedByteArray flushStripe(ByteArrayOutputStream baos) throws InterruptedException, IOException {
OrderedByteArray stripe = new OrderedByteArray();
stripe.bytes = baos.toByteArray();
log.debug(String.format("adding stripe: order=%d, ref=%d, records=%d, bytes=%d", order, refId, recordCounter,
stripe.bytes.length));
stripe.order = order++;
baos.reset();
recordCounter = 0;
return stripe;
}
}
代码示例来源:origin: PapenfussLab/gridss
private void syncEnsureNext() {
while (!isClosed.get() && buffer.isEmpty()) {
try {
log.debug(String.format("%d alignments outstanding", outstandingReads.get()));
Thread.sleep(POLL_INTERVAL);
} catch (InterruptedException e) {
log.warn(e);
return;
}
}
}
/**
代码示例来源:origin: PapenfussLab/gridss
private void remove(VariantContextDirectedBreakpoint bp) {
lookup.remove(bp);
byQual.remove(bp);
VariantContextDirectedBreakpoint mate = id.get(bp.getAttribute(VcfSvConstants.PARTNER_BREAKEND_ID_KEY));
if (mate != null) {
lookup.remove(mate);
byQual.remove(mate);
} else {
log.debug(String.format("%s missing mate", bp.getID()));
}
}
private void write(File output) throws IOException {
代码示例来源:origin: enasequence/cramtools
private static long seek(List<CramIndex.Entry> index, int seqId, int start, int end, SeekableStream cramStream)
throws IOException {
List<Entry> found = CramIndex.find(index, seqId, start, end - start + 1);
if (found == null || found.size() == 0)
return -1;
cramStream.seek(found.get(0).containerStartOffset);
log.debug("Found query at offset: " + found.get(0).containerStartOffset);
return found.get(0).containerStartOffset;
}
代码示例来源:origin: com.github.samtools/htsjdk
/**
* Prepare to compress at the given compression level
* @param compressionLevel 1 <= compressionLevel <= 9
* @param deflaterFactory custom factory to create deflaters (overrides the default)
*/
public BlockCompressedOutputStream(final Path path, final int compressionLevel, final DeflaterFactory deflaterFactory) {
this.file = path;
codec = new BinaryCodec(path, true);
deflater = deflaterFactory.makeDeflater(compressionLevel, true);
log.debug("Using deflater: " + deflater.getClass().getSimpleName());
}
代码示例来源:origin: samtools/htsjdk
/**
* Prepare to compress at the given compression level
* @param compressionLevel 1 <= compressionLevel <= 9
* @param deflaterFactory custom factory to create deflaters (overrides the default)
*/
public BlockCompressedOutputStream(final Path path, final int compressionLevel, final DeflaterFactory deflaterFactory) {
this.file = path;
codec = new BinaryCodec(path, true);
deflater = deflaterFactory.makeDeflater(compressionLevel, true);
log.debug("Using deflater: " + deflater.getClass().getSimpleName());
}
代码示例来源:origin: com.github.samtools/htsjdk
private Alignment getCurrentAlignment() throws ErrorMsg {
if (!isAligned) {
throw new RuntimeException("Should be called for aligned records only");
}
if (alignmentIterator == null) {
log.debug("Recovering SAM record after detaching from iterator. Alignment id: " + sraAlignmentId);
if (sraAlignmentId == null) {
throw new RuntimeException("Cannot recover SAM object after detaching from iterator: no alignment id");
}
alignmentIterator = getReadCollection().getAlignment(sraAlignmentId);
}
return alignmentIterator;
}
代码示例来源:origin: com.github.samtools/htsjdk
private ReadCollection getReadCollection() {
if (run != null) {
return run;
}
log.debug("Recovering SRA read collection. Accession: " + accession);
try {
return run = NGS.openReadCollection(accession.toString());
} catch (ErrorMsg e) {
throw new RuntimeException(e);
}
}
代码示例来源:origin: samtools/htsjdk
private ReadCollection getReadCollection() {
if (run != null) {
return run;
}
log.debug("Recovering SRA read collection. Accession: " + accession);
try {
return run = NGS.openReadCollection(accession.toString());
} catch (ErrorMsg e) {
throw new RuntimeException(e);
}
}
代码示例来源:origin: PapenfussLab/gridss
public static void ensureIndexed(File fa) throws IOException {
try (ReferenceSequenceFile reference = ReferenceSequenceFileFactory.getReferenceSequenceFile(fa)) {
if (!reference.isIndexed()) {
String msg = String.format("Unable to find index for %1$s. Please run 'samtools faidx %1$s' or picard tools BuildBamIndex to generate an index file.", fa);
log.error(msg);
throw new IOException(msg);
} else {
log.debug(fa, " is indexed.");
}
}
}
public void ensureDictionariesMatch() throws IOException {
代码示例来源:origin: enasequence/cramtools
protected byte[] findBasesByMD5(String md5) throws MalformedURLException, IOException {
for (PathPattern p : refPatterns) {
String path = p.format(md5);
byte[] data = loadFromPath(path, md5);
if (data == null)
continue;
log.debug("Reference found at the location ", path);
return data;
}
return null;
}
代码示例来源:origin: org.seqdoop/htsjdk
/**
* Reads through the records in the provided SAM reader and uses their quality scores to sanity check the expected
* quality passed in. If the expected quality format is sane we just hand this back otherwise we throw a
* {@link SAMException}.
*/
public static FastqQualityFormat detect(final SAMFileReader reader, final FastqQualityFormat expectedQualityFormat) {
//sanity check expectedQuality
final QualityEncodingDetector detector = new QualityEncodingDetector();
final long recordCount = detector.add(DEFAULT_MAX_RECORDS_TO_ITERATE, reader);
log.debug(String.format("Read %s records from %s.", recordCount, reader));
return detector.generateBestGuess(FileContext.SAM, expectedQualityFormat);
}
代码示例来源:origin: PapenfussLab/gridss
@Override
public void close() {
log.debug("Closing UntemplatedSequenceAnnotator");
// TODO: close feeding thread more cleanly than just shutting down the process
vcfStream.close();
try {
aligner.close();
} catch (IOException e) {
log.warn(e);
}
}
}
代码示例来源:origin: samtools/htsjdk
/**
* Reads through the records in the provided SAM reader and uses their quality scores to sanity check the expected
* quality passed in. If the expected quality format is sane we just hand this back otherwise we throw a
* {@link SAMException}.
*/
public static FastqQualityFormat detect(final SamReader reader, final FastqQualityFormat expectedQualityFormat) {
//sanity check expectedQuality
final QualityEncodingDetector detector = new QualityEncodingDetector();
final long recordCount = detector.add(DEFAULT_MAX_RECORDS_TO_ITERATE, reader.iterator());
log.debug(String.format("Read %s records from %s.", recordCount, reader));
return detector.generateBestGuess(FileContext.SAM, expectedQualityFormat);
}
代码示例来源:origin: com.github.samtools/htsjdk
/**
* Reads through the records in the provided SAM reader and uses their quality scores to sanity check the expected
* quality passed in. If the expected quality format is sane we just hand this back otherwise we throw a
* {@link SAMException}.
*/
public static FastqQualityFormat detect(final SamReader reader, final FastqQualityFormat expectedQualityFormat) {
//sanity check expectedQuality
final QualityEncodingDetector detector = new QualityEncodingDetector();
final long recordCount = detector.add(DEFAULT_MAX_RECORDS_TO_ITERATE, reader.iterator());
log.debug(String.format("Read %s records from %s.", recordCount, reader));
return detector.generateBestGuess(FileContext.SAM, expectedQualityFormat);
}
代码示例来源:origin: PapenfussLab/gridss
private void closeCurrentAssembler() {
if (currentAssembler.getExportTracker() != null) {
try {
currentAssembler.getExportTracker().close();
} catch (IOException e) {
log.debug(e);
}
}
currentAssembler = null;
}
private void ensureAssembler(boolean attemptRecovery) {
代码示例来源:origin: broadinstitute/picard
@Override
public boolean apply(final VariantContext vc) {
final boolean include = !intervalsOfInterestDetector.getOverlaps(new Interval(vc.getContig(), vc.getStart(), vc.getEnd())).isEmpty();
if (!include) LOG.debug("Filtering variant at ", vc.getContig(), ":", vc.getStart(), "-", vc.getEnd());
return include;
}
}
代码示例来源:origin: com.github.broadinstitute/picard
@Override
public boolean apply(final VariantContext vc) {
final boolean include = !intervalsOfInterestDetector.getOverlaps(new Interval(vc.getContig(), vc.getStart(), vc.getEnd())).isEmpty();
if (!include) LOG.debug("Filtering variant at ", vc.getContig(), ":", vc.getStart(), "-", vc.getEnd());
return include;
}
}
内容来源于网络,如有侵权,请联系作者删除!