Mercurial > repos > recetox > ipapy2_ms1_annotation
view ipapy2_compute_all_adducts.py @ 0:7f84a8a5edde draft default tip
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/ipapy2 commit 64b61ff2823b4f54868c0ab7a4c0dc49eaf2979a
author | recetox |
---|---|
date | Fri, 16 May 2025 08:00:41 +0000 |
parents | |
children |
line wrap: on
line source
from ipaPy2 import ipa from utils import CustomArgumentParser def main( input_dataset_adducts, input_dataset_database, ionisation, output_dataset, ncores ): write_func, file_path = output_dataset adducts_df = ipa.compute_all_adducts( input_dataset_adducts, input_dataset_database, ionisation, ncores ) write_func(adducts_df, file_path) if __name__ == "__main__": parser = CustomArgumentParser( description=" Clustering MS1 features based on correlation across samples." ) parser.add_argument( "--input_dataset_adducts", nargs=2, action="load_data", required=True, help="A dataset containing information on all possible adducts.", ) parser.add_argument( "--input_dataset_database", nargs=2, action="load_data", required=True, help="The MS1 database.", ) parser.add_argument( "--ionisation", type=int, default=1, choices=[1, -1], help="Default value 1. positive = 1, negative = -1", ) parser.add_argument( "--ncores", type=int, default=1, help="Number of cores to use for parallel processing.", ) args = parser.parse_args() main( args.input_dataset_adducts, args.input_dataset_database, args.ionisation, args.output_dataset, args.ncores, )