public MalformedBAM(SAMRecord read, String message) { this(read.getFileSource() != null ? read.getFileSource().getReader().toString() : "(none)", message); }
public MisencodedBAM(SAMRecord read, String message) { this(read.getFileSource() != null ? read.getFileSource().getReader().toString() : "(none)", message); }
/** * Retrieves the id of the reader which built the given read. * @param read The read to test. * @return ID of the reader. */ public SAMReaderID getReaderID(SAMRecord read) { return resourcePool.getReaderID(read.getFileSource().getReader()); }
public MissortedBAM(SAMFileHeader.SortOrder order, SAMRecord read, String message) { super(String.format("Missorted input SAM/BAM/CRAM file %s: file sorted in %s order but %s is required. Please see " + HelpConstants.articlePost(1317) + "for more information. Error details: %s", read.getFileSource().getReader(), read.getHeader().getSortOrder(), order, message)); }
/** * Gets the reader associated with the given read. * @param readers Available readers. * @param read * @return */ private SAMReaderID getReaderID(SAMReaders readers, SAMRecord read) { for(SAMReaderID id: getReaderIDs()) { if(readers.getReader(id) == read.getFileSource().getReader()) return id; } throw new ReviewedGATKException("Unable to find id for reader associated with read " + read.getReadName()); }