Skip to content

Commit

Permalink
making the extraction a parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
mwang87 committed Mar 13, 2024
1 parent bfc097b commit 7ac8970
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion massql/msql_extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ def main():
parser.add_argument('extracted_mzML', help='extracted_mgf')
parser.add_argument('extracted_result', help='extracted_mgf')

# Parameter for maximum extracted scans
parser.add_argument('--max_extracted_scans', help='max_extracted_scans', default=10000, type=int)

args = parser.parse_args()

if os.path.isdir(args.results_file):
Expand Down Expand Up @@ -248,7 +251,7 @@ def _extract_spectra(results_df, input_spectra_folder,
if output_summary is not None:
merged_summary_df.to_csv(output_summary, sep='\t', index=False)

if len(spectrum_list) > 10000:
if len(spectrum_list) > arg.max_extracted_scans:
print("Not Extracting, too many spectra")
return None

Expand Down
2 changes: 1 addition & 1 deletion workflow/GNPS2_DeploymentTooling

0 comments on commit 7ac8970

Please sign in to comment.