use of org.molgenis.vcf.meta.VcfMeta in project molgenis by molgenis.
the class VcfToEntityTest method testToEntityMissingValues.
// https://github.com/molgenis/molgenis/issues/5329
@Test
public void testToEntityMissingValues() throws IOException {
String vcfHeaders = "##fileformat=VCFv4.1\n" + "##INFO=<ID=GoNL_AF,Number=.,Type=Float,Description=\"The allele frequency for variants seen in the population used for the GoNL project\">\n" + "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\n";
VcfMeta vcfMeta = parseHeaders(vcfHeaders);
VcfToEntity vcfToEntity = new VcfToEntity("entityTypeName", vcfMeta, vcfAttrs, entityTypeFactory, attrMetaFactory);
VcfRecord record = new VcfRecord(vcfMeta, new String[] { "1", "54728", ".", "G", "T,C", ".", ".", "GoNL_AF=0.01,." });
Entity entity = vcfToEntity.toEntity(record);
assertEquals(entity.getString("GoNL_AF"), "0.01,.");
}
Aggregations