29
29
from shutil import rmtree
30
30
31
31
from proksee import utilities
32
+ from proksee .utilities import InputType
32
33
from proksee .utilities import get_time
33
34
35
+
34
36
from proksee .assembly_database import AssemblyDatabase
35
37
from proksee .assembly_measurer import AssemblyMeasurer
36
38
from proksee .contamination_handler import ContaminationHandler
@@ -206,11 +208,11 @@ def determine_platform(reads, platform_name=None):
206
208
help = "The species to assemble. This will override species estimation. Must be spelled correctly." )
207
209
@click .option ('-p' , '--platform' , required = False , default = None ,
208
210
help = "The sequencing platform used to generate the reads. 'Illumina', 'Ion Torrent', or 'Pac Bio'." )
209
- @click .option ('--min-contig-length' , required = False , default = 1000 ,
211
+ @click .option ('--min-contig-length' , required = False , default = 1000 , type = click . IntRange ( min = 1 , max = None ),
210
212
help = "The minimum contig length to include in analysis and output. The default is 1000." )
211
- @click .option ('-t' , '--threads' , required = False , default = 4 ,
213
+ @click .option ('-t' , '--threads' , required = False , default = 4 , type = click . IntRange ( min = 1 , max = None ),
212
214
help = "Specifies the number of threads programs in the pipeline should use. The default is 4." )
213
- @click .option ('-m' , '--memory' , required = False , default = 4 ,
215
+ @click .option ('-m' , '--memory' , required = False , default = 4 , type = click . IntRange ( min = 1 , max = None ),
214
216
help = "Specifies the amount of memory in gigabytes programs in the pipeline should use. The default is 4" )
215
217
@click .pass_context
216
218
def cli (ctx , forward , reverse , output , force , species , platform , min_contig_length , threads , memory ):
@@ -299,7 +301,7 @@ def assemble(reads, output_directory, force, mash_database_path, resource_specif
299
301
output_directory (string): the location to place all program output and temporary files
300
302
force (bool): whether or not to force the assembly to continue, even when it's evaluated as being poor
301
303
mash_database_path (string): optional; the file path of the Mash database
302
- resource_specification (ResourceSpecification): the resources that sub-programs should use
304
+ resource_specification (ResourceSpecification): the computational resources available
303
305
species_name (string): optional; the name of the species being assembled
304
306
platform_name (string): optional; the name of the sequencing platform that generated the reads
305
307
minimum_contig_length (int): optional; the minimum contig length to use for assembly and analysis
@@ -337,8 +339,9 @@ def assemble(reads, output_directory, force, mash_database_path, resource_specif
337
339
338
340
# Estimate species
339
341
filtered_filenames = filtered_reads .get_file_locations ()
340
- species_list = utilities .determine_species (filtered_filenames , assembly_database , output_directory ,
341
- mash_database_path , id_mapping_filename , species_name )
342
+ species_list = utilities .determine_major_species (filtered_filenames , assembly_database , output_directory ,
343
+ mash_database_path , id_mapping_filename , InputType .READS ,
344
+ resource_specification , species_name )
342
345
species = species_list [0 ]
343
346
report_species (species_list )
344
347
@@ -359,7 +362,8 @@ def assemble(reads, output_directory, force, mash_database_path, resource_specif
359
362
360
363
# Check for contamination at the contig level:
361
364
contamination_handler = ContaminationHandler (species , assembler .contigs_filename , output_directory ,
362
- mash_database_path , id_mapping_filename )
365
+ mash_database_path , id_mapping_filename ,
366
+ resource_specification )
363
367
evaluation = contamination_handler .estimate_contamination ()
364
368
report_contamination (evaluation )
365
369
0 commit comments