use of com.hartwig.hmftools.common.variant.structural.StructuralVariantData in project hmftools by hartwigmedical.
the class LoadStructuralVariants method queryStructuralVariantData.
@NotNull
private static List<SvClusterData> queryStructuralVariantData(@NotNull DatabaseAccess dbAccess, @NotNull String sampleId) {
List<SvClusterData> svClusterDataItems = Lists.newArrayList();
List<StructuralVariantData> svRecords = dbAccess.readStructuralVariantData(sampleId);
for (final StructuralVariantData svRecord : svRecords) {
svClusterDataItems.add(new SvClusterData(svRecord));
}
return svClusterDataItems;
}
use of com.hartwig.hmftools.common.variant.structural.StructuralVariantData in project hmftools by hartwigmedical.
the class StructuralVariantDAO method read.
@NotNull
public final List<StructuralVariantData> read(@NotNull final String sample) {
List<StructuralVariantData> structuralVariants = Lists.newArrayList();
final Result<Record> result = context.select().from(STRUCTURALVARIANT).where(STRUCTURALVARIANT.SAMPLEID.eq(sample)).fetch();
for (Record record : result) {
structuralVariants.add(ImmutableStructuralVariantData.builder().id(String.valueOf(record.getValue(STRUCTURALVARIANT.ID))).startChromosome(record.getValue(STRUCTURALVARIANT.STARTCHROMOSOME)).endChromosome(record.getValue(STRUCTURALVARIANT.ENDCHROMOSOME)).startPosition(record.getValue(STRUCTURALVARIANT.STARTPOSITION)).endPosition(record.getValue(STRUCTURALVARIANT.ENDPOSITION)).startOrientation(record.getValue(STRUCTURALVARIANT.STARTORIENTATION)).endOrientation(record.getValue(STRUCTURALVARIANT.ENDORIENTATION)).startAF(record.getValue(STRUCTURALVARIANT.STARTAF)).adjustedStartAF(record.getValue(STRUCTURALVARIANT.ADJUSTEDSTARTAF)).adjustedStartCopyNumber(record.getValue(STRUCTURALVARIANT.ADJUSTEDSTARTCOPYNUMBER)).adjustedStartCopyNumberChange(record.getValue(STRUCTURALVARIANT.ADJUSTEDSTARTCOPYNUMBERCHANGE)).endAF(record.getValue(STRUCTURALVARIANT.ENDAF)).adjustedEndAF(record.getValue(STRUCTURALVARIANT.ADJUSTEDENDAF)).adjustedEndCopyNumber(record.getValue(STRUCTURALVARIANT.ADJUSTEDENDCOPYNUMBER)).adjustedEndCopyNumberChange(record.getValue(STRUCTURALVARIANT.ADJUSTEDENDCOPYNUMBERCHANGE)).ploidy(record.getValue(STRUCTURALVARIANT.PLOIDY)).type(StructuralVariantType.fromAttribute(record.getValue(STRUCTURALVARIANT.TYPE))).homology(record.getValue(STRUCTURALVARIANT.STARTHOMOLOGYSEQUENCE)).build());
}
return structuralVariants;
}
Aggregations