Permalink
Browse files

Revert "dont run phylop on inserts in leaves. they will just be 0 any…

…way"

(I changed my mind.  We want those zeros.  Keeping them allows us to have fewer headers, which can be a bigger win in terms of size of resulting wigs and bigwigs)
This reverts commit e789f92.
  • Loading branch information...
1 parent 3f5fcc7 commit 216ab30d7a4c2a76a030d3dcc3ce16096f5517dc @glennhickey glennhickey committed Nov 2, 2013
Showing with 4 additions and 9 deletions.
  1. +4 −9 phyloP/halTreePhyloP.py
@@ -42,20 +42,14 @@ def computeTreePhyloP(args):
bigwigCmds = []
while len(visitQueue) > 0:
genome = visitQueue.pop()
- children = getHalChildrenNames(args.hal, genome)
bedFlags = ""
# Generate a bed file of all regions of
# genome that dont align to parent
bedInsertsFile = outFileName(args, genome, "bed", "inserts", True)
if genome != args.root:
- if True or len(children) > 0:
- runShellCommand(
- "halAlignedExtract %s %s --alignedFile %s --complement" % (
- args.hal, genome, bedInsertsFile))
- else:
- #empty file for leaves (ie we dont want to phyloP anything
- #-- it all gets lifted down)
- runShellCommand("rm -f %s && touch %s" % (bedInsertsFile, bedInsertsFile))
+ runShellCommand(
+ "halAlignedExtract %s %s --alignedFile %s --complement" % (
+ args.hal, genome, bedInsertsFile))
bedFlags = "--refBed %s" % bedInsertsFile
# Run halPhyloP on the inserts
@@ -91,6 +85,7 @@ def computeTreePhyloP(args):
bigwigCmds.append(bwCmd)
# Recurse on children.
+ children = getHalChildrenNames(args.hal, genome)
for child in children:
visitQueue.append(child)

0 comments on commit 216ab30

Please sign in to comment.