Search in sources :

Example 1 with StructuralVariantData

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;
}
Also used : SvClusterData(com.hartwig.hmftools.svannotation.analysis.SvClusterData) StructuralVariantData(com.hartwig.hmftools.common.variant.structural.StructuralVariantData) NotNull(org.jetbrains.annotations.NotNull)

Example 2 with StructuralVariantData

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;
}
Also used : ImmutableStructuralVariantData(com.hartwig.hmftools.common.variant.structural.ImmutableStructuralVariantData) StructuralVariantData(com.hartwig.hmftools.common.variant.structural.StructuralVariantData) Record(org.jooq.Record) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

StructuralVariantData (com.hartwig.hmftools.common.variant.structural.StructuralVariantData)2 NotNull (org.jetbrains.annotations.NotNull)2 ImmutableStructuralVariantData (com.hartwig.hmftools.common.variant.structural.ImmutableStructuralVariantData)1 SvClusterData (com.hartwig.hmftools.svannotation.analysis.SvClusterData)1 Record (org.jooq.Record)1