本文整理了Java中org.broadinstitute.gatk.utils.Utils.warnUser()
方法的一些代码示例,展示了Utils.warnUser()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.warnUser()
方法的具体详情如下:
包路径:org.broadinstitute.gatk.utils.Utils
类名称:Utils
方法名:warnUser
暂无
代码示例来源:origin: broadgsa/gatk
public static void warnUser(final String msg) {
warnUser(logger, msg);
}
代码示例来源:origin: broadgsa/gatk-protected
/**
* Checks whether the last-modification-time of the inputs is consistent with their relative roles.
*
* This routine does not thrown an exception but may output a warning message if inconsistencies are spotted.
*
* @param beforeFile the before report file.
* @param afterFile the after report file.
*/
private void checkInputReportFileLMT(final File beforeFile, final File afterFile) {
if (ignoreLastModificationTime || beforeFile == null || afterFile == null) {
return; // nothing to do here
} else if (beforeFile.lastModified() > afterFile.lastModified()) {
Utils.warnUser("Last modification timestamp for 'Before' and 'After'"
+ "recalibration reports are in the wrong order. Perhaps, have they been swapped?");
}
}
代码示例来源:origin: broadgsa/gatk
@Override
public Feature decodeLoc(final LineIterator lineIterator) {
final String line = lineIterator.next();
if (line.startsWith("#")) return null;
String fields[] = line.split("\t");
if (fields.length < 3) throw new TribbleException("RefSeq (decodeLoc) : Unable to parse line -> " + line + ", we expected at least 3 columns, we saw " + fields.length);
String contig_name = fields[2];
try {
return new RefSeqFeature(genomeLocParser.createGenomeLoc(contig_name, Integer.parseInt(fields[4])+1, Integer.parseInt(fields[5])));
} catch ( UserException.MalformedGenomeLoc e ) {
Utils.warnUser("RefSeq file is potentially incorrect, as some transcripts or exons have a negative length ("+fields[2]+")");
return null;
} catch ( NumberFormatException e ) {
throw new UserException.MalformedFile("Could not parse location from line: " + line);
}
}
代码示例来源:origin: broadgsa/gatk
Utils.warnUser("RefSeq file contains transcripts with zero coding length. "+
"Such transcripts will be ignored (this warning is printed only once)");
zero_coding_length_user_warned = true;
代码示例来源:origin: broadgsa/gatk-protected
Utils.warnUser(logger, String.format(
"Rscript not found in environment path. %s will be generated but PDF plots will not.",
RSCRIPT_FILE));
代码示例来源:origin: broadgsa/gatk-protected
Utils.warnUser(logger, "cycle caused at merging haplotypes with different kmerSizes: active region " + assemblyResultSet.getRegionForGenotyping() + " will be skipped");
代码示例来源:origin: broadgsa/gatk-protected
/**
* Construct a haplotype graph given the haplotype list and the elected kmerSize.
*
* @param haplotypes whose path to add to the graph.
* @param kmerSize the kmerSize use to compose the graph.
*/
public HaplotypeGraph(final int kmerSize, final List<Haplotype> haplotypes) {
super(kmerSize);
referenceHaplotype = findReferenceHaplotypeOrFail(haplotypes);
this.haplotypes = new LinkedHashSet<>(haplotypes);
addSequence("anonymous", referenceHaplotype.getBases(), true);
for (final Haplotype h : haplotypes) {
if (h.isReference())
continue;
if (h.length() < kmerSize) {
Utils.warnUser(logger, "haplotype shorter than kmerSize " + h.length() + " < " + kmerSize + " will be dropped");
} else
addSequence("anonymous", h.getBases(), false);
}
buildGraphIfNecessary();
}
代码示例来源:origin: broadgsa/gatk
/**
* Section of code shared between the two recalibration walkers which uses the command line arguments to adjust attributes of the read such as quals or platform string
*
* @param read The read to adjust
* @param RAC The list of shared command line arguments
*/
public static void parsePlatformForRead(final GATKSAMRecord read, final RecalibrationArgumentCollection RAC) {
GATKSAMReadGroupRecord readGroup = read.getReadGroup();
if (RAC.FORCE_PLATFORM != null && (readGroup.getPlatform() == null || !readGroup.getPlatform().equals(RAC.FORCE_PLATFORM))) {
readGroup.setPlatform(RAC.FORCE_PLATFORM);
}
if (readGroup.getPlatform() == null) {
if (RAC.DEFAULT_PLATFORM != null) {
if (!warnUserNullPlatform) {
Utils.warnUser("The input .bam file contains reads with no platform information. " +
"Defaulting to platform = " + RAC.DEFAULT_PLATFORM + ". " +
"First observed at read with name = " + read.getReadName());
warnUserNullPlatform = true;
}
readGroup.setPlatform(RAC.DEFAULT_PLATFORM);
}
else {
throw new UserException.MalformedBAM(read, "The input .bam file contains reads with no platform information. First observed at read with name = " + read.getReadName());
}
}
}
内容来源于网络,如有侵权,请联系作者删除!