Mercurial > repos > iuc > data_manager_build_kraken2_database
comparison data_manager/kraken2_build_database.py @ 13:e9ee4d074d5d draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_build_kraken2_database/ commit bb6d9b53b197610c5dbbb40c8ab590761755d91a
author | iuc |
---|---|
date | Fri, 15 Nov 2024 22:31:29 +0000 |
parents | 90b4d4f0a3a4 |
children | 8c533e19b697 |
comparison
equal
deleted
inserted
replaced
12:90b4d4f0a3a4 | 13:e9ee4d074d5d |
---|---|
26 | 26 |
27 class KrakenDatabaseTypes(Enum): | 27 class KrakenDatabaseTypes(Enum): |
28 standard_local_build = 'standard_local_build' | 28 standard_local_build = 'standard_local_build' |
29 standard_prebuilt = 'standard_prebuilt' | 29 standard_prebuilt = 'standard_prebuilt' |
30 minikraken = 'minikraken' | 30 minikraken = 'minikraken' |
31 special_prebuilt = 'special_prebuilt' | |
31 special = 'special' | 32 special = 'special' |
32 custom = 'custom' | 33 custom = 'custom' |
33 | 34 |
34 def __str__(self): | 35 def __str__(self): |
35 return self.value | 36 return self.value |
62 pluspf_08gb = "pluspf_08gb" | 63 pluspf_08gb = "pluspf_08gb" |
63 pluspf_16gb = "pluspf_16gb" | 64 pluspf_16gb = "pluspf_16gb" |
64 pluspfp = "pluspfp" | 65 pluspfp = "pluspfp" |
65 pluspfp_08gb = "pluspfp_08gb" | 66 pluspfp_08gb = "pluspfp_08gb" |
66 pluspfp_16gb = "pluspfp_16gb" | 67 pluspfp_16gb = "pluspfp_16gb" |
68 eupathdb48 = "eupathdb48" | |
67 | 69 |
68 def __str__(self): | 70 def __str__(self): |
69 return self.value | 71 return self.value |
70 | 72 |
71 | 73 |
142 'pluspf': "PlusPF (Standard plus protozoa and fungi)", | 144 'pluspf': "PlusPF (Standard plus protozoa and fungi)", |
143 'pluspf_08gb': "PlusPF-8 (PlusPF with DB capped at 8 GB)", | 145 'pluspf_08gb': "PlusPF-8 (PlusPF with DB capped at 8 GB)", |
144 'pluspf_16gb': "PlusPF-16 (PlusPF with DB capped at 16 GB)", | 146 'pluspf_16gb': "PlusPF-16 (PlusPF with DB capped at 16 GB)", |
145 'pluspfp': "PlusPFP (Standard plus protozoa, fungi and plant)", | 147 'pluspfp': "PlusPFP (Standard plus protozoa, fungi and plant)", |
146 'pluspfp_08gb': "PlusPFP-8 (PlusPFP with DB capped at 8 GB)", | 148 'pluspfp_08gb': "PlusPFP-8 (PlusPFP with DB capped at 8 GB)", |
147 'pluspfp_16gb': "PlusPFP-16 (PlusPFP with DB capped at 16 GB)" | 149 'pluspfp_16gb': "PlusPFP-16 (PlusPFP with DB capped at 16 GB)", |
150 'eupathdb48': "EuPathDB-46", | |
148 } | 151 } |
149 | 152 |
150 database_value = "_".join([ | 153 database_value = "_".join([ |
151 now, | 154 now, |
152 "standard_prebuilt", | 155 "standard_prebuilt", |
406 parser.add_argument('--minimizer-spaces', dest='minimizer_spaces', default=6, help='minimizer spaces') | 409 parser.add_argument('--minimizer-spaces', dest='minimizer_spaces', default=6, help='minimizer spaces') |
407 parser.add_argument('--load-factor', dest='load_factor', type=float, default=0.7, help='load factor') | 410 parser.add_argument('--load-factor', dest='load_factor', type=float, default=0.7, help='load factor') |
408 parser.add_argument('--threads', dest='threads', default=1, help='threads') | 411 parser.add_argument('--threads', dest='threads', default=1, help='threads') |
409 parser.add_argument('--database-type', dest='database_type', type=KrakenDatabaseTypes, choices=list(KrakenDatabaseTypes), required=True, help='type of kraken database to build') | 412 parser.add_argument('--database-type', dest='database_type', type=KrakenDatabaseTypes, choices=list(KrakenDatabaseTypes), required=True, help='type of kraken database to build') |
410 parser.add_argument('--minikraken2-version', dest='minikraken2_version', type=Minikraken2Versions, choices=list(Minikraken2Versions), help='MiniKraken2 version (only applies to --database-type minikraken)') | 413 parser.add_argument('--minikraken2-version', dest='minikraken2_version', type=Minikraken2Versions, choices=list(Minikraken2Versions), help='MiniKraken2 version (only applies to --database-type minikraken)') |
411 parser.add_argument('--prebuilt-db', dest='prebuilt_db', type=StandardPrebuiltSizes, choices=list(StandardPrebuiltSizes), help='Prebuilt database to download. Only applies to --database-type standard_prebuilt.') | 414 parser.add_argument('--prebuilt-db', dest='prebuilt_db', type=StandardPrebuiltSizes, choices=list(StandardPrebuiltSizes), help='Prebuilt database to download. Only applies to --database-type standard_prebuilt or special_prebuilt.') |
412 parser.add_argument('--prebuilt-date', dest='prebuilt_date', help='Database build date (YYYY-MM-DD). Only applies to --database-type standard_prebuilt.') | 415 parser.add_argument('--prebuilt-date', dest='prebuilt_date', help='Database build date (YYYY-MM-DD). Only applies to --database-type standard_prebuilt.') |
413 parser.add_argument('--special-database-type', dest='special_database_type', type=SpecialDatabaseTypes, choices=list(SpecialDatabaseTypes), help='type of special database to build (only applies to --database-type special)') | 416 parser.add_argument('--special-database-type', dest='special_database_type', type=SpecialDatabaseTypes, choices=list(SpecialDatabaseTypes), help='type of special database to build (only applies to --database-type special)') |
414 parser.add_argument('--custom-fasta', dest='custom_fasta', help='fasta file for custom database (only applies to --database-type custom)') | 417 parser.add_argument('--custom-fasta', dest='custom_fasta', help='fasta file for custom database (only applies to --database-type custom)') |
415 parser.add_argument('--custom-database-name', dest='custom_database_name', help='Name for custom database (only applies to --database-type custom)') | 418 parser.add_argument('--custom-database-name', dest='custom_database_name', help='Name for custom database (only applies to --database-type custom)') |
416 parser.add_argument('--custom-source-info', dest='custom_source_info', help='Description of how this build has been sourced (only applies to --database-type custom)') | 419 parser.add_argument('--custom-source-info', dest='custom_source_info', help='Description of how this build has been sourced (only applies to --database-type custom)') |
444 } | 447 } |
445 data_manager_output = kraken2_build_standard( | 448 data_manager_output = kraken2_build_standard( |
446 kraken2_args, | 449 kraken2_args, |
447 target_directory, | 450 target_directory, |
448 ) | 451 ) |
449 elif str(args.database_type) == 'standard_prebuilt': | 452 elif str(args.database_type) in ('standard_prebuilt', 'special_prebuilt'): |
450 data_manager_output = kraken2_build_standard_prebuilt( | 453 data_manager_output = kraken2_build_standard_prebuilt( |
451 str(args.prebuilt_db), | 454 str(args.prebuilt_db), |
452 str(args.prebuilt_date), | 455 str(args.prebuilt_date), |
453 target_directory | 456 target_directory |
454 ) | 457 ) |