comparison dapars.py @ 3:aca85eb3eb5b draft

planemo upload for repository https://github.com/mvdbeek/dapars commit a02ced0b40d8946aa78a58321bd8f9771148391e-dirty
author mvdbeek
date Wed, 28 Oct 2015 06:05:21 -0400
parents 47b0044bc7f8
children 73b932244237
comparison
equal deleted inserted replaced
2:47b0044bc7f8 3:aca85eb3eb5b
80 """ 80 """
81 coverage_files = [] 81 coverage_files = []
82 cmds = [] 82 cmds = []
83 for alignment_file in self.all_alignments: 83 for alignment_file in self.all_alignments:
84 cmd = "sort -k1,1 -k2,2n tmp_bedfile.bed | " 84 cmd = "sort -k1,1 -k2,2n tmp_bedfile.bed | "
85 cmd = cmd + "~/bin/bedtools coverage -d -s -abam {alignment_file} -b stdin |" \ 85 cmd = cmd + "bedtools coverage -d -s -abam {alignment_file} -b stdin |" \
86 " cut -f 4,7,8 > coverage_file_{alignment_name}".format( 86 " cut -f 4,7,8 > coverage_file_{alignment_name}".format(
87 alignment_file = alignment_file, alignment_name= self.alignment_names[alignment_file] ) 87 alignment_file = alignment_file, alignment_name= self.alignment_names[alignment_file] )
88 cmds.append(cmd) 88 cmds.append(cmd)
89 pool = Pool(self.n_cpus) 89 pool = Pool(self.n_cpus)
90 subprocesses = [subprocess.Popen([cmd], shell=True) for cmd in cmds] 90 subprocesses = [subprocess.Popen([cmd], shell=True) for cmd in cmds]