def __init__(self, model_file, bl_scaler=1.0, alphabet=('A', 'T','G','C')): self.model_file = model_file self.alphabet = alphabet self.epsilon = 10.0**-10 # A small value. self.model = self.read_model(model_file) self.bl_scaler = bl_scaler u.check_cmd('R')
def __init__(self, model_file, bl_scaler=1.0, alphabet=('A', 'T', 'G', 'C')): self.model_file = model_file self.alphabet = alphabet self.epsilon = 10.0**-10 # A small value. self.model = self.read_model(model_file) self.bl_scaler = bl_scaler u.check_cmd('R')
def __init__(self, run_file, read_length, insert_size, log, rts): self.fq_tmp = 'tmp' self.log = log self.run_file = run_file self.read_length = read_length self.insert_size = insert_size self.isize = insert_size - 2 * read_length self.sim_cmd = self._build_sim_cmd() self.rts = rts u.check_cmd('simLibrary') u.check_cmd('simNGS')
def __init__(self, run_file, read_length, insert_size, log, rts): self.fq_tmp = 'tmp' self.log = log self.run_file = run_file self.read_length= read_length self.insert_size= insert_size self.isize = insert_size - 2 * read_length self.sim_cmd = self._build_sim_cmd() self.rts = rts u.check_cmd('simLibrary') u.check_cmd('simNGS')
def __init__(self, fqs, kmer_length, min_ctgl, ins_len, max_div, rts, log, clean=False, asm_dir="assembly"): self.log = log self.rts = rts self.fqs = fqs self.kmer_length= kmer_length self.min_ctgl = min_ctgl self.ins_len = ins_len self.max_div = max_div self.clean = clean self.asm_rts = self.rts.subdir(asm_dir) self.asm_dir = self.asm_rts.base u.check_cmd('velveth') u.check_cmd('velvetg')
def plot(self, plotdir, partition, annotations, reco_info=None, cpath=None, no_mds_plots=False): if self.args.only_csv_plots: print ' --only-csv-plots not implemented for partition plots, so returning without plotting' return if not utils.check_cmd('R', options=['--slave', '--version'], return_bool=True): no_mds_plots = True print ' note: R does not seem to be installed, so skipping mds partition plots' print ' plotting partitions' sys.stdout.flush() start = time.time() fnames = [] self.remove_failed_clusters(partition, annotations) sorted_clusters = sorted(partition, key=lambda c: len(c), reverse=True) fnames += self.make_shm_vs_cluster_size_plots(sorted_clusters, annotations, plotdir) if not no_mds_plots: fnames += self.make_mds_plots(sorted_clusters, annotations, plotdir, reco_info=reco_info, run_in_parallel=True) #, color_rule='wtf') # fnames += self.make_laplacian_spectra_plots(sorted_clusters, annotations, plotdir, cpath=cpath) # fnames += self.make_sfs_plots(sorted_clusters, annotations, plotdir) csfns = self.make_cluster_size_distribution(plotdir, partition) fnames[0] += csfns[0] if not self.args.only_csv_plots: self.plotting.make_html(plotdir, fnames=fnames, new_table_each_row=True, htmlfname=plotdir + '/overview.html', extra_links=[(subd, '%s/%s.html' % (plotdir, subd)) for subd in ['shm-vs-size', 'mds', 'laplacian-spectra']]) # , 'sfs print ' partition plotting time: %.1f sec' % (time.time()-start)
def __init__(self, fqs, kmer_length, min_ctgl, ins_len, max_div, rts, log, clean=False, asm_dir="assembly"): self.log = log self.rts = rts self.fqs = fqs self.kmer_length = kmer_length self.min_ctgl = min_ctgl self.ins_len = ins_len self.max_div = max_div self.clean = clean self.asm_rts = self.rts.subdir(asm_dir) self.asm_dir = self.asm_rts.base u.check_cmd('velveth') u.check_cmd('velvetg')
def __init__(self, log, rts): u.check_cmd('muscle') self.log = log self.rts = rts.subdir('muscle')
def __init__(self, log, rts): self.log = log self.rts = rts u.check_cmd('exonerate')