func fileNameToSampleInstance(filename string) (string, string, error) {
	parts := strings.Split(filename, "_")
	if len(parts) < 3 {
		return "", "", fmt.Errorf("Expected at least two '_' characters in the filename, but found %d", len(parts)-1)
	}

	return parts[0], parts[2], nil
}
// This is very UK Biobank-specific, but the files are stored as
// sample_field_instance_arrayidx and so we can extract metadata from them.
This is very UK Biobank-specific, but the files are stored as
sample_field_instance_arrayidx and so we can extract metadata from them.
// This is very UK Biobank - specific but the files are stored as // sample_field_instance_arrayidx and so we can extract metadata from them .
func fileNameToSampleInstance(filename string) (string, string, error) {
	parts := strings.Split(filename, "_")
	if len(parts) < 3 {
		return "", "", fmt.Errorf("Expected at least two '_' characters in the filename, but found %d", len(parts)-1)
	}
	return parts[0], parts[2], nil
}
func fileNameToSampleInstance ( filename string ) ( string , string , error ) { parts := strings . Split ( filename , " " ) if len ( parts ) < 3 { return " " , " " , fmt . Errorf ( " " , len ( parts ) - 1 ) } return parts [ 0 ] , parts [ 2 ] , nil }
This is very UK Biobank-specific, but the files are stored as
sample_field_instance_arrayidx and so we can extract metadata from them.
This is very UK Biobank - specific but the files are stored as sample_field_instance_arrayidx and so we can extract metadata from them .