return line; String description= vcfHdr.getDescription(); Map<Integer, String> hdrIndexToName= new HashMap<Integer, String>(); List<String> header= Splitter.on("|").splitToList(description.replaceAll(".*Format: ", ""));
public static void assertHeadersEquals(VCFHeader header0, VCFHeader header1) { assertEquals(header0.getColumnCount(), header1.getColumnCount()); assertEquals(header0.getGenotypeSamples(), header1.getGenotypeSamples()); assertEquals(header0.getContigLines(), header1.getContigLines()); for (VCFInfoHeaderLine line0 : header0.getInfoHeaderLines()) { VCFInfoHeaderLine line1 = header1.getInfoHeaderLine(line0.getID()); assertEquals(line0.getCount(), line1.getCount()); assertEquals(line0.getType(), line1.getType()); assertEquals(line0.getDescription(), line1.getDescription()); assertEquals(0, line0.compareTo(line1)); } } }
hInfo.add(new VCFInfoHeaderLine(expression.fullName, targetHeaderLine.getCount(), targetHeaderLine.getType(), targetHeaderLine.getDescription())); else hInfo.add(new VCFInfoHeaderLine(expression.fullName, targetHeaderLine.getCountType(), targetHeaderLine.getType(), targetHeaderLine.getDescription())); } else { hInfo.add(new VCFInfoHeaderLine(expression.fullName, VCFHeaderLineCount.UNBOUNDED, VCFHeaderLineType.String, "Value transferred from another external VCF resource"));
Assert.assertEquals(originalEscapingQuoteInfoLine.getDescription(), "This description has an escaped \" quote in it"); Assert.assertEquals(originalEscapingBackslashInfoLine.getDescription(), "This description has an escaped \\ backslash in it"); Assert.assertEquals(originalEscapingNonQuoteOrBackslashInfoLine.getDescription(), "This other value has a \\n newline in it"); Assert.assertEquals(firstCopyEscapingQuoteInfoLine.getDescription(), "This description has an escaped \" quote in it"); Assert.assertEquals(firstCopyEscapingBackslashInfoLine.getDescription(), "This description has an escaped \\ backslash in it"); Assert.assertEquals(firstCopyEscapingNonQuoteOrBackslashInfoLine.getDescription(), "This other value has a \\n newline in it"); Assert.assertEquals(secondCopyEscapingQuoteInfoLine.getDescription(), "This description has an escaped \" quote in it"); Assert.assertEquals(secondCopyEscapingBackslashInfoLine.getDescription(), "This description has an escaped \\ backslash in it"); Assert.assertEquals(secondCopyEscapingNonQuoteOrBackslashInfoLine.getDescription(), "This other value has a \\n newline in it");