Esempio n. 1
0
 def denovo_consensus(self):
     inpute_fasta_name = self.args.input 
     rid,s =best_template_by_blasr(inpute_fasta_name)
     prefix = self.args.out_file_name.split(".")
     if len(prefix) > 1:
         prefix = ".".join(prefix[:-1])
     else:
         prefix = ".".join(prefix)
     full_prefix = os.path.join(self.args.out_dir_name, prefix)
     with open("%s_ref.fa" % full_prefix, "w") as f:
         print >>f ,">%s_ref" % self.args.consensus_seq_name
         print >>f, s
     hp_corr = False if self.args.disable_hp_corr else True
     generate_haplotype_consensus(inpute_fasta_name, "%s_ref.fa" % full_prefix, full_prefix, self.args.consensus_seq_name, 
                                  hpFix = hp_corr,
                                  min_iteration = int(self.args.niter),
                                  max_num_reads = self.args.max_num_reads,
                                  entropy_th = self.args.entropy_th)
Esempio n. 2
0
    def denovoConsensus(self):
        prefix = self.args.out_file_name.split(".")
        input_fasta_name = self.args.input 

        rid,s =best_template_by_blasr(input_fasta_name)
        if len(prefix) > 1:
            prefix = ".".join(prefix[:-1])
        else:
            prefix = ".".join(prefix)
        full_prefix = os.path.join(self.args.out_dir_name, prefix)
        with open("%s_ref.fa" % full_prefix, "w") as f:
            print >>f ,">%s_ref" % self.args.consensus_seq_name
            print >>f, s
        hp_corr = False if self.args.disable_hp_corr else True
        generate_consensus(input_fasta_name, "%s_ref.fa" % full_prefix, full_prefix, self.args.consensus_seq_name, 
                           hp_corr, int(self.args.niter), 
                           int(self.args.max_num_reads), 
                           float(self.args.entropy_th),
                           self.args.dump_dag_info,
                           int(self.args.min_cov))