
org.snpeff.ped.Sex Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of SnpEff Show documentation
Show all versions of SnpEff Show documentation
Variant annotation and effect prediction package.
The newest version!
package org.snpeff.ped;
import java.util.Random;
public enum Sex {
Male, Female, Unknown;
/**
* Random sex
* @return
*/
public static Sex rand(Random random) {
if( random.nextDouble() >= 0.5 ) return Sex.Female;
return Sex.Male;
}
/**
* Return the opposite sex
* @param sex
* @return
*/
public Sex opposite() {
return this == Sex.Male ? Sex.Female : Sex.Male;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy