def check_options(self, supply=[]): if (options().reference_pkg is not None): self.load_reference(os.path.join(options().reference.path, 'refpkg/%s.refpkg/' % options().reference_pkg)) if (options().taxonomy_file is None): supply = supply + ["taxonomy file"] if (options().taxonomy_name_mapping_file is None): supply = supply + ["taxonomy name mapping file"] ExhaustiveAlgorithm.check_options(self, supply)
def check_options(self): options().info_file = "A_dummy_value" if options().tree_file is None or options().alignment_file is None: _LOG.error("Specify the backbone alignment and tree and query sequences") exit(-1) sequences = MutableAlignment() sequences.read_file_object(open(self.options.alignment_file.name)) return ExhaustiveAlgorithm.check_options(self)
def check_options(self): options().info_file = "A_dummy_value" #Check to see if tree/alignment/fragment file provided, if not, generate it #from sequence file if not options().tree_file is None and not options().alignment_file is None and not options().sequence_file is None: options().fragment_file = options().sequence_file elif options().tree_file is None and options().alignment_file is None and not options().sequence_file is None: self.generate_backbone() else: _LOG.error("Either specify the backbone alignment and tree and query sequences or only the query sequences. Any other combination is invalid") exit(-1) sequences = MutableAlignment() sequences.read_file_object(open(self.options.alignment_file.name)) backbone_size = sequences.get_num_taxa() if options().backbone_size is None: options().backbone_size = backbone_size assert options().backbone_size == backbone_size, ("Backbone parameter needs to match actual size of backbone; backbone parameter:%s backbone_size:%s" %(options().backbone_size, backbone_size)) if options().placement_size is None: options().placement_size = options().backbone_size return ExhaustiveAlgorithm.check_options(self)
def check_options(self): options().info_file = "A_dummy_value" #Check to see if tree/alignment/fragment file provided, if not, generate it #from sequence file if not options().tree_file is None and not options().alignment_file is None and not options().sequence_file is None: options().fragment_file = options().sequence_file elif options().tree_file is None and options().alignment_file is None and not options().sequence_file is None: self.generate_backbone() else: _LOG.error("Either specify the backbone alignment and tree and query sequences or only the query sequences. Any other combination is invalid") exit(-1) sequences = MutableAlignment() sequences.read_file_object(open(self.options.alignment_file.name)) backbone_size = sequences.get_num_taxa() if options().backbone_size is None: options().backbone_size = backbone_size assert options().backbone_size == backbone_size, ("Backbone parameter needs to match actual size of backbone; backbone parameter:%s backbone_size:%s" %(options().backbone_size, backbone_size)) if options().placement_size is None: options().placement_size = options().backbone_size if options().alignment_size is None: _LOG.info("Alignment subset size not given. Calculating subset size. ") alignment = MutableAlignment() alignment.read_file_object(open(self.options.alignment_file.name)) if (options().molecule == 'amino'): _LOG.warning("Automated alignment subset selection not implemented for protein alignment. Setting to 10.") options().alignment_size = 10 else: (averagep,maxp) = alignment.get_p_distance() align_size = 10 if (averagep > .60): while (align_size*2 < alignment.get_num_taxa()): align_size = align_size * 2 _LOG.info("Average p-distance of backbone is %f0.2. Alignment subset size set to %d. " % (averagep,align_size)) options().alignment_size = align_size return ExhaustiveAlgorithm.check_options(self)
def check_options(self): self.check_outputprefix() options().info_file = "A_dummy_value" # Check to see if tree/alignment/fragment file provided, if not, # generate it from sequence file if ( (not options().tree_file is None) and (not options().alignment_file is None) and (not options().sequence_file is None) ): options().fragment_file = options().sequence_file elif ( (options().tree_file is None) and (options().alignment_file is None) and (not options().sequence_file is None) ): self.generate_backbone() else: _LOG.error( ("Either specify the backbone alignment and tree and query " "sequences or only the query sequences. Any other " "combination is invalid")) exit(-1) sequences = MutableAlignment() sequences.read_file_object(open(self.options.alignment_file.name)) backbone_size = sequences.get_num_taxa() if options().backbone_size is None: options().backbone_size = backbone_size assert options().backbone_size == backbone_size, ( ("Backbone parameter needs to match actual size of backbone; " "backbone parameter:%s backbone_size:%s") % (options().backbone_size, backbone_size)) if options().placement_size is None: options().placement_size = options().backbone_size return ExhaustiveAlgorithm.check_options(self)
def check_options(self, supply=[]): if (options().taxonomy_file is None): supply = supply + ["taxonomy file"] if (options().taxonomy_name_mapping_file is None): supply = supply + ["taxonomy name mapping file"] ExhaustiveAlgorithm.check_options(self, supply)