Skip to content

Commit

Permalink
replaced jbrowse make-pif with a working sort to bgzip to tabix
Browse files Browse the repository at this point in the history
couldn't get the inbuilt thing working in biocontainers testing.
no idea why.
  • Loading branch information
fubar2 committed Oct 7, 2024
1 parent 116b1a4 commit 2db94e3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions tools/jbrowse2/jbrowse2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1136,13 +1136,15 @@ def add_paf(self, data, trackData, pafOpts, **kwargs):
usePIF = False # much faster if indexed remotely or locally
useuri = data.startswith("http://") or data.startswith("https://")
if not useuri:
dest = os.path.join(self.outdir, url)
self.symlink_or_copy(os.path.realpath(data), dest)
cmd = ["jbrowse", "make-pif", dest]
# self.symlink_or_copy(os.path.realpath(data), url)
# cmd = ["jbrowse", "make-pif", url]
url = '%s.pif.gz' % tId
cmd = "sort -b -n -k1,1 -k2,3 -k3,4 '%s' | bgzip -c > '%s'" % (data, url)
self.subprocess_popen(cmd)
cmd = ["tabix", "-b", "3", "-e", "4", "-f", url]
self.subprocess_check_call(cmd)
usePIF = True
url = '%s.pif.gz' % tId
nrow = self.getNrow(dest)
nrow = 1
else:
url = data
if data.endswith(".pif.gz") or data.endswith(".paf.gz"): # is tabix
Expand Down Expand Up @@ -1731,7 +1733,7 @@ def parse_style_conf(item):
for trak in trakdat:
if trak["trackId"] == key:
stile = trak.get("style", {})
if track.find("options/style"):
if len(track.find("options/style")) > 0:
for item in track.find("options/style"):
if item.text:
stile[item.tag] = parse_style_conf(item)
Expand Down

0 comments on commit 2db94e3

Please sign in to comment.