use of com.hartwig.hmftools.common.variant.structural.EnrichedStructuralVariantLeg in project hmftools by hartwigmedical.
the class StructuralVariantDAO method readEnrichedData.
@NotNull
List<EnrichedStructuralVariant> readEnrichedData(@NotNull final String sample) {
final List<EnrichedStructuralVariant> regions = Lists.newArrayList();
final Result<Record> result = context.select().from(STRUCTURALVARIANT).where(STRUCTURALVARIANT.SAMPLEID.eq(sample)).fetch();
for (Record record : result) {
final EnrichedStructuralVariantLeg start = ImmutableEnrichedStructuralVariantLeg.builder().chromosome(record.getValue(STRUCTURALVARIANT.STARTCHROMOSOME)).position(record.getValue(STRUCTURALVARIANT.STARTPOSITION)).orientation(record.getValue(STRUCTURALVARIANT.STARTORIENTATION)).homology(record.getValue(STRUCTURALVARIANT.STARTHOMOLOGYSEQUENCE)).alleleFrequency(record.getValue(STRUCTURALVARIANT.STARTAF)).adjustedAlleleFrequency(record.getValue(STRUCTURALVARIANT.ADJUSTEDSTARTAF)).adjustedCopyNumber(record.getValue(STRUCTURALVARIANT.ADJUSTEDSTARTCOPYNUMBER)).adjustedCopyNumberChange(record.getValue(STRUCTURALVARIANT.ADJUSTEDSTARTCOPYNUMBERCHANGE)).build();
final EnrichedStructuralVariantLeg end = ImmutableEnrichedStructuralVariantLeg.builder().chromosome(record.getValue(STRUCTURALVARIANT.ENDCHROMOSOME)).position(record.getValue(STRUCTURALVARIANT.ENDPOSITION)).orientation(record.getValue(STRUCTURALVARIANT.ENDORIENTATION)).homology(record.getValue(STRUCTURALVARIANT.ENDHOMOLOGYSEQUENCE)).alleleFrequency(record.getValue(STRUCTURALVARIANT.ENDAF)).adjustedAlleleFrequency(record.getValue(STRUCTURALVARIANT.ADJUSTEDENDAF)).adjustedCopyNumber(record.getValue(STRUCTURALVARIANT.ADJUSTEDENDCOPYNUMBER)).adjustedCopyNumberChange(record.getValue(STRUCTURALVARIANT.ADJUSTEDENDCOPYNUMBERCHANGE)).build();
final EnrichedStructuralVariant variant = ImmutableEnrichedStructuralVariant.builder().primaryKey(record.getValue(STRUCTURALVARIANT.ID)).id(record.getValue(STRUCTURALVARIANT.ID).toString()).start(start).end(end).insertSequence(record.getValue(STRUCTURALVARIANT.INSERTSEQUENCE)).type(StructuralVariantType.fromAttribute(record.getValue(STRUCTURALVARIANT.TYPE))).ploidy(record.getValue(STRUCTURALVARIANT.PLOIDY)).build();
regions.add(variant);
}
return regions;
}
Aggregations