/** * Creates a string representation of this chunk list. */ @Override public String toString() { return StringUtil.join(";", chunks); }
/** * Creates a string representation of this chunk list. */ @Override public String toString() { return StringUtil.join(";", chunks); }
public void verifyData(List<Integer> tiles, final int [] cycles) { final List<Integer> mapTiles = new ArrayList<Integer>(this.tileToFiles.keySet()); if(!mapTiles.containsAll(tiles)) { throw new PicardException("Missing tiles in PerTileParser expected(" + StringUtil.join(",", tiles) + ") but found (" + StringUtil.join(",", mapTiles) + ")"); } if(!tiles.containsAll(mapTiles)) { throw new PicardException("Extra tiles where found in PerTileParser expected(" + StringUtil.join(",", tiles) + ") but found (" + StringUtil.join(",", mapTiles) + ")"); } } }
public void verifyData(List<Integer> tiles, final int [] cycles) { final List<Integer> mapTiles = new ArrayList<Integer>(this.tileToFiles.keySet()); if(!mapTiles.containsAll(tiles)) { throw new PicardException("Missing tiles in PerTileParser expected(" + StringUtil.join(",", tiles) + ") but found (" + StringUtil.join(",", mapTiles) + ")"); } if(!tiles.containsAll(mapTiles)) { throw new PicardException("Extra tiles where found in PerTileParser expected(" + StringUtil.join(",", tiles) + ") but found (" + StringUtil.join(",", mapTiles) + ")"); } } }
@Override protected String getProbeSetName() { if (BAIT_SET_NAME != null) { return BAIT_SET_NAME; } else { final SortedSet<String> baitSetNames = new TreeSet<String>(); for (final File file : BAIT_INTERVALS) { baitSetNames.add(CollectTargetedMetrics.renderProbeNameFromFile(file)); } return StringUtil.join(".", baitSetNames); } }
/** * Get the contingency state array as a parse-able string */ public String getContingencyStateString(final TruthState truthState, final CallState callState) { final ContingencyState[] contingencyStateArray = getConcordanceStateArray(truthState, callState); return (contingencyStateArray.length == 0) ? "EMPTY" : StringUtil.join(",", contingencyStateArray); }
/** * Get the contingency state array as a parse-able string */ public String getContingencyStateString(final TruthState truthState, final CallState callState) { final ContingencyState[] contingencyStateArray = getConcordanceStateArray(truthState, callState); return (contingencyStateArray.length == 0) ? "EMPTY" : StringUtil.join(",", contingencyStateArray); }
public PerTileParser(final IlluminaFileMap tilesToFiles, final int nextTile) { this.tileToFiles = tilesToFiles; this.currentTile = null; this.nextTile = nextTile; if(!tilesToFiles.containsKey(nextTile)) { throw new IllegalArgumentException("NextTile (" + nextTile + ") is not contained by tilesToFiles (" + StringUtil.join(",", new ArrayList<Integer>(tilesToFiles.keySet()))); } }
public PerTileParser(final IlluminaFileMap tilesToFiles, final int nextTile) { this.tileToFiles = tilesToFiles; this.currentTile = null; this.nextTile = nextTile; if(!tilesToFiles.containsKey(nextTile)) { throw new IllegalArgumentException("NextTile (" + nextTile + ") is not contained by tilesToFiles (" + StringUtil.join(",", new ArrayList<Integer>(tilesToFiles.keySet()))); } }
/** * Execute the command and capture stdout and stderr. * @return Exit status of command, and both stderr and stdout interleaved into stdout attribute. */ public static ExitStatusAndOutput executeAndReturnInterleavedOutput(final String[] commandArray) { try { final Process process = Runtime.getRuntime().exec(commandArray); return interleaveProcessOutput(process); } catch (Throwable t) { throw new SAMException("Unexpected exception executing [" + StringUtil.join(" ", commandArray) + "]", t); } }
/** * Execute the command and capture stdout and stderr. * @return Exit status of command, and both stderr and stdout interleaved into stdout attribute. */ public static ExitStatusAndOutput executeAndReturnInterleavedOutput(final String[] commandArray) { try { final Process process = Runtime.getRuntime().exec(commandArray); return interleaveProcessOutput(process); } catch (Throwable t) { throw new SAMException("Unexpected exception executing [" + StringUtil.join(" ", commandArray) + "]", t); } }
/** * Execute the command and capture stdout and stderr. * @return Exit status of command, and both stderr and stdout interleaved into stdout attribute. */ public static ExitStatusAndOutput executeAndReturnInterleavedOutput(final String[] commandArray) { try { final Process process = Runtime.getRuntime().exec(commandArray); return interleaveProcessOutput(process); } catch (Throwable t) { throw new SAMException("Unexpected exception executing [" + StringUtil.join(" ", commandArray) + "]", t); } }
public void seekToTile(int oneBasedTileNumber) { nextTile = oneBasedTileNumber; if(!tileToFiles.containsKey(oneBasedTileNumber)) { throw new PicardException("PerTileParser does not contain key(" + oneBasedTileNumber +") keys available (" + StringUtil.join(",", new ArrayList<Integer>(tileToFiles.keySet())) + ")"); } if(currentIterator != null) { currentIterator.close(); } currentIterator = null; }
protected String getRGLine(final SAMReadGroupRecord readGroup) { final String[] fields = new String[2 + readGroup.getAttributes().size()]; fields[0] = HEADER_LINE_START + HeaderRecordType.RG; fields[1] = SAMReadGroupRecord.READ_GROUP_ID_TAG + TAG_KEY_VALUE_SEPARATOR + readGroup.getReadGroupId(); encodeTags(readGroup, fields, 2); return StringUtil.join(FIELD_SEPARATOR, fields); }
protected String getPGLine(final SAMProgramRecord programRecord) { final String[] fields = new String[2 + programRecord.getAttributes().size()]; fields[0] = HEADER_LINE_START + HeaderRecordType.PG; fields[1] = SAMProgramRecord.PROGRAM_GROUP_ID_TAG + TAG_KEY_VALUE_SEPARATOR + programRecord.getProgramGroupId(); encodeTags(programRecord, fields, 2); return StringUtil.join(FIELD_SEPARATOR, fields); }
protected String getRGLine(final SAMReadGroupRecord readGroup) { final String[] fields = new String[2 + readGroup.getAttributes().size()]; fields[0] = HEADER_LINE_START + HeaderRecordType.RG; fields[1] = SAMReadGroupRecord.READ_GROUP_ID_TAG + TAG_KEY_VALUE_SEPARATOR + readGroup.getReadGroupId(); encodeTags(readGroup, fields, 2); return StringUtil.join(FIELD_SEPARATOR, fields); }
protected String getSQLine(final SAMSequenceRecord sequenceRecord) { final int numAttributes = sequenceRecord.getAttributes() != null ? sequenceRecord.getAttributes().size() : 0; final String[] fields = new String[3 + numAttributes]; fields[0] = HEADER_LINE_START + HeaderRecordType.SQ; fields[1] = SAMSequenceRecord.SEQUENCE_NAME_TAG + TAG_KEY_VALUE_SEPARATOR + sequenceRecord.getSequenceName(); fields[2] = SAMSequenceRecord.SEQUENCE_LENGTH_TAG + TAG_KEY_VALUE_SEPARATOR + Integer.toString(sequenceRecord.getSequenceLength()); encodeTags(sequenceRecord, fields, 3); return StringUtil.join(FIELD_SEPARATOR, fields); }
protected String getSQLine(final SAMSequenceRecord sequenceRecord) { final int numAttributes = sequenceRecord.getAttributes() != null ? sequenceRecord.getAttributes().size() : 0; final String[] fields = new String[3 + numAttributes]; fields[0] = HEADER_LINE_START + HeaderRecordType.SQ; fields[1] = SAMSequenceRecord.SEQUENCE_NAME_TAG + TAG_KEY_VALUE_SEPARATOR + sequenceRecord.getSequenceName(); fields[2] = SAMSequenceRecord.SEQUENCE_LENGTH_TAG + TAG_KEY_VALUE_SEPARATOR + Integer.toString(sequenceRecord.getSequenceLength()); encodeTags(sequenceRecord, fields, 3); return StringUtil.join(FIELD_SEPARATOR, fields); }
private void writePGLine(final SAMProgramRecord programRecord) { if (programRecord == null) { return; } final String[] fields = new String[2 + programRecord.getAttributes().size()]; fields[0] = HEADER_LINE_START + HeaderRecordType.PG; fields[1] = SAMProgramRecord.PROGRAM_GROUP_ID_TAG + TAG_KEY_VALUE_SEPARATOR + programRecord.getProgramGroupId(); encodeTags(programRecord, fields, 2); println(StringUtil.join(FIELD_SEPARATOR, fields)); }
private void writeSQLine(final SAMSequenceRecord sequenceRecord) { final int numAttributes =sequenceRecord.getAttributes() != null ? sequenceRecord.getAttributes().size() : 0; final String[] fields = new String[3 + numAttributes]; fields[0] = HEADER_LINE_START + HeaderRecordType.SQ; fields[1] = SAMSequenceRecord.SEQUENCE_NAME_TAG + TAG_KEY_VALUE_SEPARATOR + sequenceRecord.getSequenceName(); fields[2] = SAMSequenceRecord.SEQUENCE_LENGTH_TAG + TAG_KEY_VALUE_SEPARATOR + Integer.toString(sequenceRecord.getSequenceLength()); encodeTags(sequenceRecord, fields, 3); println(StringUtil.join(FIELD_SEPARATOR, fields)); }