[docs]classAIRRExporter(DataExporter):""" Exports a RepertoireDataset of Repertoires in AIRR format. Things to note: - one filename_prefix is given, which is combined with the Repertoire identifiers for the filenames, to create one file per Repertoire - 'counts' is written into the field 'duplicate_counts' - 'sequence_identifiers' is written both into the fields 'sequence_id' and 'rearrangement_id' """
[docs]@staticmethoddefexport(dataset:Dataset,path:Path,number_of_processes:int=1,omit_columns:list=None):PathBuilder.build(path)try:ifisinstance(dataset,RepertoireDataset):AIRRExporter.export_repertoire_dataset(dataset,path,omit_columns=omit_columns)elifisinstance(dataset,ElementDataset):AIRRExporter.process_and_store_data_file(dataset.filename,path/dataset.filename.name)AIRRExporter.process_and_store_dataset_file(dataset.dataset_file,path/dataset.dataset_file.name)exceptshutil.SameFileErrorase:logging.warning(f"AIRRExporter: target and input path are the same. Skipping the copy operation...")
# TODO: add here export of full sequence if possible