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 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 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 writeRGLine(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); println(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 writeHDLine(final boolean keepExistingVersionNumber) { final SAMFileHeader newHeader; if (keepExistingVersionNumber) { newHeader = mFileHeader; } else { // Make a copy of the header, excluding the version from the input header, so that // output get CURRENT_VERSION instead of whatever the version of the input header was. newHeader = new SAMFileHeader(); for (final Map.Entry<String, String> entry : mFileHeader.getAttributes()) { if (!entry.getKey().equals(SAMFileHeader.VERSION_TAG)) { newHeader.setAttribute(entry.getKey(), entry.getValue()); } } } final String[] fields = new String[1 + newHeader.getAttributes().size()]; fields[0] = HEADER_LINE_START + HeaderRecordType.HD; encodeTags(newHeader, fields, 1); println(StringUtil.join(FIELD_SEPARATOR, fields)); }
private void writeHDLine(final boolean keepExistingVersionNumber) { final SAMFileHeader newHeader; if (keepExistingVersionNumber) { newHeader = mFileHeader; } else { // Make a copy of the header, excluding the version from the input header, so that // output get CURRENT_VERSION instead of whatever the version of the input header was. newHeader = new SAMFileHeader(); for (final Map.Entry<String, String> entry : mFileHeader.getAttributes()) { if (!entry.getKey().equals(SAMFileHeader.VERSION_TAG)) { newHeader.setAttribute(entry.getKey(), entry.getValue()); } } } final String[] fields = new String[1 + newHeader.getAttributes().size()]; fields[0] = HEADER_LINE_START + HeaderRecordType.HD; encodeTags(newHeader, fields, 1); println(StringUtil.join(FIELD_SEPARATOR, fields)); }
private void writeHDLine(final boolean keepExistingVersionNumber) { final SAMFileHeader newHeader; if (keepExistingVersionNumber) { newHeader = mFileHeader; } else { // Make a copy of the header, excluding the version from the input header, so that // output get CURRENT_VERSION instead of whatever the version of the input header was. newHeader = new SAMFileHeader(); for (final Map.Entry<String, String> entry : mFileHeader.getAttributes()) { if (!entry.getKey().equals(SAMFileHeader.VERSION_TAG)) { newHeader.setAttribute(entry.getKey(), entry.getValue()); } } } final String[] fields = new String[1 + newHeader.getAttributes().size()]; fields[0] = HEADER_LINE_START + HeaderRecordType.HD; encodeTags(newHeader, fields, 1); 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)); }