public static List < String > getSampleNames ( VariantStudyMetadata variantStudyMetadata ) { if ( variantStudyMetadata == null ) { return null ; } List < String > sampleNames = new ArrayList <> ( ) ; if ( variantStudyMetadata . getIndividuals ( ) != null ) { for ( org . opencb . biodata . models . metadata . Individual individual : variantStudyMetadata . getIndividuals ( ) ) { for ( Sample sample : individual . getSamples ( ) ) { if ( ! StringUtils . isEmpty ( sample . getId ( ) ) ) { sampleNames . add ( sample . getId ( ) ) ; } } } } return sampleNames ; }
Get sample names form a variant study metadata .