public StudyEntry(String studyId, List<AlternateCoordinate> secondaryAlternates, List<String> format) { this.impl = new org.opencb.biodata.models.variant.avro.StudyEntry(studyId, new ArrayList<>(), null, format, new ArrayList<>(), new LinkedHashMap<>(), new ArrayList<>()); setSecondaryAlternates(secondaryAlternates); }
se.setSecondaryAlternates(new ArrayList<>()); for (FileEntry fe : se.getFiles()) { Map<String, String> feAttr = fe.getAttributes();
AlternateCoordinate alternateCoordinate = convertToAlternateCoordinate(alternateDocument); if (study.getSecondaryAlternates() == null) { study.setSecondaryAlternates(new ArrayList<>(list.size()));
currentStudy.setSecondaryAlternates(altList.subList(1, altList.size()));
.setSv(variant.getSv()); StudyEntry se = new StudyEntry("0"); se.setSecondaryAlternates(getAlternateCoordinates(secondaryAlternates)); se.setFormat(studyEntry.getFormat()); se.setSamplesData(new ArrayList<>(fileIds.size())); studyEntry.setSecondaryAlternates(alternateCoordinates);
secondaryAlternates.add(new AlternateCoordinate(chromosome, start, end, reference, alternates.get(i), inferType(reference, alternates.get(i)))); studyEntry.setSecondaryAlternates(secondaryAlternates);
normalizedEntry.setSecondaryAlternates(getSecondaryAlternates(chromosome, keyFields, reorderedKeyFields));
private Variant createVariantSecAlt(String varString, String secAlt) { Variant secAltVar = new Variant(secAlt); Variant variant = new Variant(varString); StudyEntry se = new StudyEntry("1"); AlternateCoordinate ac = new AlternateCoordinate( secAltVar.getChromosome(), secAltVar.getStart(), secAltVar.getEnd(), secAltVar.getReference(), secAltVar.getAlternate(), secAltVar.getType()); se.setSecondaryAlternates(Collections.singletonList(ac)); variant.setStudies(Collections.singletonList(se)); return variant; }
public Variant convert(VcfSliceProtos.VcfRecord vcfRecord, String chromosome, int slicePosition) { int start = getStart(vcfRecord, slicePosition); int end = getEnd(vcfRecord, slicePosition); Variant variant = new Variant(chromosome, start, end, vcfRecord.getReference(), vcfRecord.getAlternate()); variant.setType(getVariantType(vcfRecord.getType())); variant.setIds(vcfRecord.getIdNonDefaultList()); variant.resetLength(); FileEntry fileEntry = new FileEntry(); fileEntry.setFileId(fileId); Map<String, String> attributes = getFileAttributes(vcfRecord); fileEntry.setAttributes(attributes); fileEntry.setCall(vcfRecord.getCall().isEmpty() ? null : vcfRecord.getCall()); if (vcfRecord.getType().equals(VariantProto.VariantType.NO_VARIATION)) { attributes.put("END", Integer.toString(end)); } StudyEntry studyEntry = new StudyEntry(studyId); studyEntry.setFiles(Collections.singletonList(fileEntry)); studyEntry.setFormat(getFormat(vcfRecord)); studyEntry.setSamplesData(getSamplesData(vcfRecord, studyEntry.getFormatPositions())); studyEntry.setSamplesPosition(retrieveSamplePosition()); studyEntry.getFormatPositions(); // Initialize the map List<VariantProto.AlternateCoordinate> alts = vcfRecord.getSecondaryAlternatesList(); studyEntry.setSecondaryAlternates(getAlternateCoordinates(alts)); variant.addStudyEntry(studyEntry); studyEntry.getFormatPositions(); // Initialize the map return variant; }