org.opencb.biodata.models.clinical.ClinicalProperty Maven / Gradle / Ivy
The newest version!
/*
*
*
*/
package org.opencb.biodata.models.clinical;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.security.InvalidParameterException;
import java.util.HashMap;
import java.util.Map;
public class ClinicalProperty {
public enum ModeOfInheritance {
AUTOSOMAL_DOMINANT("monoallelic"),
AUTOSOMAL_RECESSIVE("biallelic"),
X_LINKED_DOMINANT,
X_LINKED_RECESSIVE,
Y_LINKED,
MITOCHONDRIAL,
DE_NOVO,
MENDELIAN_ERROR("me"),
COMPOUND_HETEROZYGOUS("ch"),
UNKNOWN;
private static Map namesMap;
static {
namesMap = new HashMap<>();
for (ModeOfInheritance mode : values()) {
namesMap.put(mode.name().toLowerCase(), mode);
namesMap.put(mode.name().replace("_", "").toLowerCase(), mode);
if (mode.names != null) {
for (String name : mode.names) {
namesMap.put(name.toLowerCase(), mode);
}
}
}
}
private final String[] names;
ModeOfInheritance(String... names) {
this.names = names;
}
@Nullable
public static ModeOfInheritance parseOrNull(String name) {
return namesMap.get(name.toLowerCase());
}
@Nonnull
public static ModeOfInheritance parse(String name) {
ModeOfInheritance moi = namesMap.get(name.toLowerCase());
if (moi == null) {
throw new InvalidParameterException("Unknown ModeOfInheritance value: '" + name + "'");
}
return moi;
}
}
public enum ClinicalSignificance {
PATHOGENIC,
LIKELY_PATHOGENIC,
UNCERTAIN_SIGNIFICANCE,
LIKELY_BENIGN,
BENIGN,
NOT_ASSESSED
}
public enum Penetrance {
COMPLETE,
INCOMPLETE,
UNKNOWN
}
public enum Imprinted {
NOT,
MATERNALLY,
PATERNALLY,
UNKNOWN
}
public enum Confidence {
HIGH,
MEDIUM,
LOW,
REJECTED
}
public enum RoleInCancer {
ONCOGENE,
TUMOR_SUPPRESSOR_GENE,
FUSION,
// BOTH has to be deprecated (in previous versios BOTH = ONCOGENE + TUMOR_SUPPRESSOR_GENE when only these two values were supported)
BOTH,
NA,
UNKNOWN
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy