[docs]@staticmethoddefrun(input_params:StepParams=None):assertisinstance(input_params,DataEncoderParams), \
"DataEncoder step: input_params have to be an instance of DataEncoderParams class."dataset=input_params.datasetencoder=input_params.encoderencoder_params=input_params.encoder_paramsprint_log(f"Encoding started...",include_datetime=True)encoded_dataset=encoder.encode(dataset,encoder_params)ifencoded_dataset.encoded_data.infoisNone:encoded_dataset.encoded_data.info={}if'sequence_type'notinencoded_dataset.encoded_data.info:encoded_dataset.encoded_data.info['sequence_type']=encoder_params.sequence_typeif'region_type'notinencoded_dataset.encoded_data.info:encoded_dataset.encoded_data.info['region_type']=encoder_params.region_typeprint_log(f"Encoding finished.",include_datetime=True)returnencoded_dataset