public List < AlternateCoordinate > buildAltList ( Variant variant ) { AlternateCoordinate mainAlternate = getMainAlternate ( variant ) ; List < AlternateCoordinate > alternates = new ArrayList <> ( ) ; boolean emptyRefBlock = mainAlternate . getType ( ) . equals ( VariantType . NO_VARIATION ) && ( mainAlternate . getAlternate ( ) . isEmpty ( ) || mainAlternate . getAlternate ( ) . equals ( Allele . NO_CALL_STRING ) ) ; // Skip Reference Blocks (NO_VARIATION) where the alternate is empty if ( ! emptyRefBlock ) { alternates . add ( mainAlternate ) ; } StudyEntry se = getStudy ( variant ) ; if ( se . getSecondaryAlternates ( ) != null ) { se . getSecondaryAlternates ( ) . forEach ( alt -> alternates . add ( copyAlt ( variant , alt ) ) ) ; } return alternates ; }
Build a list of all the alternates from a variant . Includes the main and the secondary alternates .