# HG changeset patch # User fubar # Date 1727150229 0 # Node ID af482048ca1a03fa981af5a8e627fa1e84b53887 # Parent 2fff478aca4beefe4598baf33b5e32bbe0f5fa32 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 59fe39774d791bc684811b6ce03e13ef093d074e diff -r 2fff478aca4b -r af482048ca1a __pycache__/jbrowse2.cpython-312.pyc Binary file __pycache__/jbrowse2.cpython-312.pyc has changed diff -r 2fff478aca4b -r af482048ca1a foo Binary file foo has changed diff -r 2fff478aca4b -r af482048ca1a foo.tbi Binary file foo.tbi has changed diff -r 2fff478aca4b -r af482048ca1a jbrowse2.py --- a/jbrowse2.py Sat Sep 21 06:13:01 2024 +0000 +++ b/jbrowse2.py Tue Sep 24 03:57:09 2024 +0000 @@ -10,6 +10,7 @@ import re import shutil import ssl +import string import struct import subprocess import tempfile @@ -1600,7 +1601,8 @@ args = parser.parse_args() tree = ET.parse(args.xml) root = tree.getroot() - + removeMe = string.punctuation.replace('.','').replace('/','').replace('-','') + nopunct = str.maketrans(dict.fromkeys(removeMe)) # This should be done ASAP GALAXY_INFRASTRUCTURE_URL = root.find("metadata/galaxyUrl").text # Sometimes this comes as `localhost` without a protocol @@ -1617,7 +1619,7 @@ genomes = [ { "path": x.attrib["path"], - "label": x.attrib["label"].split(" ")[0].replace(",", ""), + "label": x.attrib["label"].split(" ")[0].translate(nopunct), "useuri": x.attrib["useuri"], "meta": metadata_from_node(x.find("metadata")), } @@ -1655,7 +1657,7 @@ if x.attrib['ext'] == "bed": isBed = True track_conf["label"] = "%s_%d" % ( - x.attrib["label"].replace(" ", "_").replace(",", "_").replace("/", "_"), + x.attrib["label"].translate(nopunct), trackI, ) trackI += 1 @@ -1663,7 +1665,7 @@ if is_multi_bigwig: multi_bigwig_paths.append( ( - track_conf["label"], + track_conf["label"].translate(nopunct), track_conf["useuri"], os.path.realpath(x.attrib["path"]), ) diff -r 2fff478aca4b -r af482048ca1a test-data/vcf/merlin.vcf.2 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/vcf/merlin.vcf.2 Tue Sep 24 03:57:09 2024 +0000 @@ -0,0 +1,23 @@ +##fileformat=VCFv4.0 +##fileDate=20090805 +##source=myImputationProgramV3.1 +##reference=1000GenomesPilot-NCBI36 +##phasing=partial +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##FILTER= +##FILTER= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT NA00001 NA00002 NA00003 +Merlin 14370 rs6054257 G A 29 PASS NS=3;DP=14;AF=0.5;DB;H2 GT:GQ:DP:HQ 0|0:48:1:51,51 1|0:48:8:51,51 1/1:43:5:.,. +Merlin 17330 . T A 3 q10 NS=3;DP=11;AF=0.017 GT:GQ:DP:HQ 0|0:49:3:58,50 0|1:3:5:65,3 0/0:41:3 +Merlin 1110696 rs6040355 A G,T 67 PASS NS=2;DP=10;AF=0.333,0.667;AA=T;DB GT:GQ:DP:HQ 1|2:21:6:23,27 2|1:2:0:18,2 2/2:35:4 +Merlin 1230237 . T . 47 PASS NS=3;DP=13;AA=T GT:GQ:DP:HQ 0|0:54:7:56,60 0|0:48:4:51,51 0/0:61:2 +Merlin 1234567 microsat1 GTCT G,GTACT 50 PASS NS=3;DP=9;AA=G GT:GQ:DP 0/1:35:4 0/2:17:2 1/1:40:3 diff -r 2fff478aca4b -r af482048ca1a test-data/vcf/merlinold.vcf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/vcf/merlinold.vcf Tue Sep 24 03:57:09 2024 +0000 @@ -0,0 +1,23 @@ +##fileformat=VCFv4.0 +##fileDate=20090805 +##source=myImputationProgramV3.1 +##reference=1000GenomesPilot-NCBI36 +##phasing=partial +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##INFO= +##FILTER= +##FILTER= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT NA00001 NA00002 NA00003 +Merlin 61 rs6054257 G A 29 PASS NS=3;DP=14;AF=0.5;DB;H2 GT:GQ:DP:HQ 0|0:48:1:51,51 1|0:48:8:51,51 1/1:43:5:.,. +Merlin 122 . T A 3 q10 NS=3;DP=11;AF=0.017 GT:GQ:DP:HQ 0|0:49:3:58,50 0|1:3:5:65,3 0/0:41:3 +Merlin 488 rs6040355 A G,T 67 PASS NS=2;DP=10;AF=0.333,0.667;AA=T;DB GT:GQ:DP:HQ 1|2:21:6:23,27 2|1:2:0:18,2 2/2:35:4 +Merlin 549 . T . 47 PASS NS=3;DP=13;AA=T GT:GQ:DP:HQ 0|0:54:7:56,60 0|0:48:4:51,51 0/0:61:2 +Merlin 1098 microsat1 G,GTACT 50 PASS NS=3;DP=9;AA=G GT:GQ:DP 0/1:35:4 0/2:17:2 1/1:40:3