Skip to content

Commit

Permalink
update: psm
Browse files Browse the repository at this point in the history
  • Loading branch information
zprobot committed May 30, 2024
1 parent 3c0b59a commit 06abcfc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions quantmsio/commands/psm_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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,
):
Expand All @@ -61,6 +67,7 @@ def convert_psm_file(
parquet_path=psm_manager.parquet_path,
verbose=verbose,
use_cache=use_cache,
protein_file=protein_file,
)


Expand Down
3 changes: 2 additions & 1 deletion quantmsio/core/psm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
):
"""
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 06abcfc

Please sign in to comment.