@Deprecated public static StructuralVariantType getCNVSubtype(Integer copyNumber) { return VariantBuilder.getCNVSubtype(copyNumber); }
public VariantBuilder setCopyNumber(int copyNumber) { initSv(); sv.setCopyNumber(copyNumber); sv.setType(getCNVSubtype(copyNumber)); return this; }
sv.setType(getCNVSubtype(copyNumber));
@Deprecated public static StructuralVariation getStructuralVariation(Variant variant, StructuralVariantType tandemDuplication) { int[] impreciseStart = getImpreciseStart(variant); int[] impreciseEnd = getImpreciseEnd(variant); String[] svInsSeq = getSvInsSeq(variant); StructuralVariation sv = new StructuralVariation(); sv.setCiStartLeft(impreciseStart[0]); sv.setCiStartRight(impreciseStart[1]); sv.setCiEndLeft(impreciseEnd[0]); sv.setCiEndRight(impreciseEnd[1]); sv.setLeftSvInsSeq(svInsSeq[0]); sv.setRightSvInsSeq(svInsSeq[1]); // If it's not a tandem duplication, this will set the type to null sv.setType(tandemDuplication); // Will properly set the type if it's a CNV if (variant.getType().equals(VariantType.CNV)) { Integer copyNumber = getCopyNumberFromAlternate(variant.getAlternate()); if (copyNumber != null) { sv.setCopyNumber(copyNumber); sv.setType(getCNVSubtype(copyNumber)); } } return sv; }
private Variant newVariant(Variant variant, VariantKeyFields keyFields, StructuralVariation sv) { Variant normalizedVariant = new Variant(variant.getChromosome(), keyFields.getStart(), keyFields.getEnd(), keyFields.getReference(), keyFields.getAlternate()) .setId(variant.getId()) .setNames(variant.getNames()) .setStrand(variant.getStrand()); if (sv != null) { if (normalizedVariant.getSv() != null) { // CI positions may change during the normalization. Update them. normalizedVariant.getSv().setCiStartLeft(sv.getCiStartLeft()); normalizedVariant.getSv().setCiStartRight(sv.getCiStartRight()); normalizedVariant.getSv().setCiEndLeft(sv.getCiEndLeft()); normalizedVariant.getSv().setCiEndRight(sv.getCiEndRight()); } else { normalizedVariant.setSv(sv); } // Variant will never have CopyNumber, because the Alternate is normalized from <CNxx> to <CNV> normalizedVariant.getSv().setCopyNumber(keyFields.getCopyNumber()); normalizedVariant.getSv().setType(VariantBuilder.getCNVSubtype(keyFields.getCopyNumber())); } return normalizedVariant; // normalizedVariant.setAnnotation(variant.getAnnotation()); // if (isSymbolic(variant)) { // StructuralVariation sv = getStructuralVariation(normalizedVariant, keyFields, null); // normalizedVariant.setSv(sv); // } }