Mercurial > repos > fubar > jbrowse2
comparison jbrowse2.py @ 121:478ee3e780de draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit a6f013087aa66546a843298e2584604668f9e140
author | fubar |
---|---|
date | Thu, 03 Oct 2024 06:07:18 +0000 |
parents | af482048ca1a |
children | ae07c55ab96b |
comparison
equal
deleted
inserted
replaced
120:af482048ca1a | 121:478ee3e780de |
---|---|
619 | 619 |
620 def text_index(self): | 620 def text_index(self): |
621 # Index tracks | 621 # Index tracks |
622 args = [ | 622 args = [ |
623 "jbrowse", | 623 "jbrowse", |
624 "text-index", | 624 "text-index" |
625 "--target", | |
626 self.outdir, | |
627 "--assemblies", | |
628 self.genome_name, | |
629 ] | 625 ] |
630 | 626 self.subprocess_check_call(args) |
631 tracks = ",".join(self.trackIdlist) | |
632 if tracks: | |
633 args += ["--tracks", tracks] | |
634 | |
635 self.subprocess_check_call(args) | |
636 | 627 |
637 def add_hic(self, data, trackData): | 628 def add_hic(self, data, trackData): |
638 """ | 629 """ |
639 HiC adapter. | 630 HiC adapter. |
640 https://github.com/aidenlab/hic-format/blob/master/HiCFormatV9.md | 631 https://github.com/aidenlab/hic-format/blob/master/HiCFormatV9.md |
1599 parser.add_argument("--outdir", help="Output directory", default="out") | 1590 parser.add_argument("--outdir", help="Output directory", default="out") |
1600 parser.add_argument("--version", "-V", action="version", version=JB2VER) | 1591 parser.add_argument("--version", "-V", action="version", version=JB2VER) |
1601 args = parser.parse_args() | 1592 args = parser.parse_args() |
1602 tree = ET.parse(args.xml) | 1593 tree = ET.parse(args.xml) |
1603 root = tree.getroot() | 1594 root = tree.getroot() |
1604 removeMe = string.punctuation.replace('.','').replace('/','').replace('-','') | 1595 removeMe = string.punctuation.replace('.', ' ').replace('/', '').replace('-', '') |
1596 # first is a space because space needs to be added here for removal from labels as paths. | |
1605 nopunct = str.maketrans(dict.fromkeys(removeMe)) | 1597 nopunct = str.maketrans(dict.fromkeys(removeMe)) |
1606 # This should be done ASAP | 1598 # This should be done ASAP |
1607 GALAXY_INFRASTRUCTURE_URL = root.find("metadata/galaxyUrl").text | 1599 GALAXY_INFRASTRUCTURE_URL = root.find("metadata/galaxyUrl").text |
1608 # Sometimes this comes as `localhost` without a protocol | 1600 # Sometimes this comes as `localhost` without a protocol |
1609 if not GALAXY_INFRASTRUCTURE_URL.startswith("http"): | 1601 if not GALAXY_INFRASTRUCTURE_URL.startswith("http"): |
1770 ) | 1762 ) |
1771 ) | 1763 ) |
1772 jc.write_config() | 1764 jc.write_config() |
1773 # note that this can be left in the config.json but has NO EFFECT if add_defsess_to_index is called. | 1765 # note that this can be left in the config.json but has NO EFFECT if add_defsess_to_index is called. |
1774 # jc.add_defsess_to_index(default_session_data) | 1766 # jc.add_defsess_to_index(default_session_data) |
1775 # jc.text_index() not sure what broke here. | 1767 # this command line tool appears currently broken - or at least not working here. |
1768 # jc.text_index() |