public static VariantFileMetadata readVariantFileMetadata ( VariantReader reader , VariantFileMetadata metadata ) throws IOException { Objects . requireNonNull ( reader ) ; if ( metadata == null ) { metadata = new VariantFileMetadata ( "" , "" ) ; } try { reader . open ( ) ; reader . pre ( ) ; metadata . setHeader ( reader . getVariantFileMetadata ( ) . getHeader ( ) ) ; metadata . setSampleIds ( reader . getVariantFileMetadata ( ) . getSampleIds ( ) ) ; metadata . setStats ( reader . getVariantFileMetadata ( ) . getStats ( ) ) ; reader . post ( ) ; } finally { reader . close ( ) ; } return metadata ; }
Reads the VariantSource from a Variant file given an initialized VariantReader