Skip to content

Commit

Permalink
Revert "dont run phylop on inserts in leaves. they will just be 0 any…
Browse files Browse the repository at this point in the history
…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
glennhickey committed Nov 2, 2013
1 parent 3f5fcc7 commit 216ab30
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions phyloP/halTreePhyloP.py
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 216ab30

Please sign in to comment.