diff --git a/quantmsio/commands/psm_command.py b/quantmsio/commands/psm_command.py index 79659e4..d4d7068 100644 --- a/quantmsio/commands/psm_command.py +++ b/quantmsio/commands/psm_command.py @@ -26,6 +26,11 @@ required=False, is_flag=True, ) +@click.option( + "--protein_file", + help="the mzTab file, this will be used to extract the protein information", + required=False, +) @click.option( "--output_prefix_file", help="Prefix of the parquet file needed to generate the file name", @@ -36,6 +41,7 @@ def convert_psm_file( mztab_file: str, output_folder: str, use_cache: bool, + protein_file:str=None, output_prefix_file: str = None, verbose: bool = False, ): @@ -61,6 +67,7 @@ def convert_psm_file( parquet_path=psm_manager.parquet_path, verbose=verbose, use_cache=use_cache, + protein_file=protein_file, ) diff --git a/quantmsio/core/psm.py b/quantmsio/core/psm.py index 2643153..3209023 100644 --- a/quantmsio/core/psm.py +++ b/quantmsio/core/psm.py @@ -172,6 +172,7 @@ def convert_mztab_to_psm( parquet_path: str = None, verbose: bool = False, batch_size: int = 100000, + protein_file=None, use_cache: bool = False, ): """ @@ -221,7 +222,7 @@ def convert_mztab_to_psm( logger.info("The parquet file was generated in: {}".format(self.parquet_path)) else: convert = PsmInMemory(self.schema) - convert.write_feature_to_file(mztab_path, self.parquet_path, chunksize=batch_size) + convert.write_feature_to_file(mztab_path, self.parquet_path, chunksize=batch_size,protein_file=protein_file) logger.info("The parquet file was generated in: {}".format(self.parquet_path)) @staticmethod