Mercurial > repos > fubar > jbrowse2
annotate autogenJB2.py @ 71:e26a8a6d2d2e draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit cf208cecf0140ff43d145a44713ab7108057fb8b
author | fubar |
---|---|
date | Sat, 30 Mar 2024 07:15:04 +0000 |
parents | 7230a2422507 |
children | 2bdb748df098 |
rev | line source |
---|---|
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
1 import argparse |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
2 import logging |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
3 import os |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
4 import sys |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
5 |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
6 from jbrowse2 import JbrowseConnector as jbC |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
7 |
67
cefe9dbf1d80
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 6dac6d6debf44c68eae2785e926fb8420f76958e-dirty
fubar
parents:
66
diff
changeset
|
8 |
cefe9dbf1d80
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 6dac6d6debf44c68eae2785e926fb8420f76958e-dirty
fubar
parents:
66
diff
changeset
|
9 logging.basicConfig(level=logging.DEBUG) |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
10 log = logging.getLogger("jbrowse") |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
11 |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
12 if __name__ == "__main__": |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
13 parser = argparse.ArgumentParser(description="", epilog="") |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
14 parser.add_argument("--sessName", help="Session name", default="AutoJBrowse") |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
15 parser.add_argument( |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
16 "--trackmeta", |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
17 help="Repeatable 'filename,filext,filepath,[bai/crai path for filesystem bam/cram]' for JBrowse2 tracks", |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
18 default=[], |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
19 action="append", |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
20 ) |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
21 parser.add_argument( |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
22 "--referencemeta", |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
23 help="Repeatable 'filename, filext, filepath, ... ,' for JBrowse2 reference tracks - usually only one needed", |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
24 default=[], |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
25 action="append", |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
26 ) |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
27 parser.add_argument( |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
28 "--pafmeta", |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
29 help="Repeatable. Each is a 'pafname, filext, filepath, ... ,' for a JBrowse2 paf track", |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
30 default=[], |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
31 action="append", |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
32 ) |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
33 parser.add_argument( |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
34 "--pafreferencemeta", |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
35 help="Repeatable. Each is a 'pafname,refpath,refname' Every pafname must have one or more", |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
36 default=[], |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
37 action="append", |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
38 ) |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
39 parser.add_argument( |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
40 "--jbrowse2path", help="Path to JBrowse2 directory in biocontainer or Conda" |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
41 ) |
39
bc57164eb270
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit ace841acd53be99494ed9bba8bb9e2ae212d3661
fubar
parents:
38
diff
changeset
|
42 parser.add_argument("--outdir", help="Output directory", required=True) |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
43 parser.add_argument("--version", "-V", action="version", version="%(prog)s 2.10.2") |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
44 args = parser.parse_args() |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
45 sessName = args.sessName |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
46 # --trackmeta $jbrowseme[$key],$jbrowseme[$key].ext,'$key' |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
47 trackList = [x.strip().split(",") for x in args.trackmeta if x > ""] |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
48 refList = [x.strip().split(",") for x in args.referencemeta if x > ""] |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
49 if len(refList) > 0: |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
50 listgenomes = [f for f in refList if f[1] in ["fasta", "fasta.gz"]] |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
51 # assume no pafs here |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
52 if len(listgenomes) > 0: |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
53 genome_paths = [x[0] for x in listgenomes] |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
54 genome_names = [x[2] for x in listgenomes] |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
55 guseuri = [] |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
56 for x in genome_paths: |
57
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
57 if x.startswith("http://") or x.startswith("https://"): |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
58 guseuri.append("yes") |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
59 else: |
57
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
60 guseuri.append("no") |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
61 jc = jbC( |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
62 outdir=args.outdir, |
39
bc57164eb270
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit ace841acd53be99494ed9bba8bb9e2ae212d3661
fubar
parents:
38
diff
changeset
|
63 jbrowse2path=args.jbrowse2path, |
62
ab0d6782a95f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 2b6d4a24585beb1ba5055e5d34aacb3b299b1943-dirty
fubar
parents:
60
diff
changeset
|
64 ) |
67
cefe9dbf1d80
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 6dac6d6debf44c68eae2785e926fb8420f76958e-dirty
fubar
parents:
66
diff
changeset
|
65 genomes = ( |
cefe9dbf1d80
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 6dac6d6debf44c68eae2785e926fb8420f76958e-dirty
fubar
parents:
66
diff
changeset
|
66 [ |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
67 { |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
68 "path": x, |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
69 "label": genome_names[i], |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
70 "useuri": guseuri[i], |
57
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
71 "meta": { |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
72 "name": genome_names[i], |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
73 "dataset_dname": genome_names[i], |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
74 }, |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
75 } |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
76 for i, x in enumerate(genome_paths) |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
77 ], |
67
cefe9dbf1d80
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 6dac6d6debf44c68eae2785e926fb8420f76958e-dirty
fubar
parents:
66
diff
changeset
|
78 ) |
71
e26a8a6d2d2e
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit cf208cecf0140ff43d145a44713ab7108057fb8b
fubar
parents:
69
diff
changeset
|
79 logging.debug("#!!! paths=%s, genomes=%s" % (genome_paths, genomes)) |
62
ab0d6782a95f
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 2b6d4a24585beb1ba5055e5d34aacb3b299b1943-dirty
fubar
parents:
60
diff
changeset
|
80 assref_name = jc.process_genomes(genomes[0]) |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
81 default_session_data = { |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
82 "visibility": { |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
83 "default_on": [], |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
84 "default_off": [], |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
85 }, |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
86 "style": {}, |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
87 "style_labels": {}, |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
88 } |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
89 listtracks = trackList |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
90 # foo.paf must have a foo_paf.fasta or fasta.gz to match |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
91 tnames = [x[2] for x in listtracks] |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
92 texts = [x[1] for x in listtracks] |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
93 for i, track in enumerate(listtracks): |
67
cefe9dbf1d80
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 6dac6d6debf44c68eae2785e926fb8420f76958e-dirty
fubar
parents:
66
diff
changeset
|
94 track_conf = { |
cefe9dbf1d80
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 6dac6d6debf44c68eae2785e926fb8420f76958e-dirty
fubar
parents:
66
diff
changeset
|
95 "trackfiles": [], |
cefe9dbf1d80
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 6dac6d6debf44c68eae2785e926fb8420f76958e-dirty
fubar
parents:
66
diff
changeset
|
96 "category": "autogenerated", |
cefe9dbf1d80
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 6dac6d6debf44c68eae2785e926fb8420f76958e-dirty
fubar
parents:
66
diff
changeset
|
97 "assemblyNames": assref_name, |
cefe9dbf1d80
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 6dac6d6debf44c68eae2785e926fb8420f76958e-dirty
fubar
parents:
66
diff
changeset
|
98 } |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
99 tpath, trext, trackname = track[:3] |
48
460d5b6c5d98
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a-dirty
fubar
parents:
46
diff
changeset
|
100 track_conf["dataset_id"] = trackname |
52
ae12977c0e5e
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 44df75b3714aa9e02983e0b67ef43fc0eee4a8d4-dirty
fubar
parents:
48
diff
changeset
|
101 useuri = "no" |
57
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
102 if tpath.startswith("http://") or tpath.startswith("https://"): |
52
ae12977c0e5e
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 44df75b3714aa9e02983e0b67ef43fc0eee4a8d4-dirty
fubar
parents:
48
diff
changeset
|
103 useuri = "yes" |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
104 if trext == "paf": |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
105 refname = trackname + "_paf.fasta" |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
106 refdat = [x[2] for x in listtracks if x[2] == refname] |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
107 if not refdat: |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
108 jc.logging.warn( |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
109 "!! No reference file %s corresponding to paf file %s found. Not building - there must be a corresponding fasta for each paf" |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
110 % (refname, trackname) |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
111 ) |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
112 sys.exit(3) |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
113 else: |
57
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
114 track_conf.update( |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
115 { |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
116 "conf": { |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
117 "options": { |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
118 "paf": { |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
119 "genome": refdat, |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
120 "genome_label": trackname, |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
121 } |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
122 } |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
123 } |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
124 } |
57
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
125 ) |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
126 elif trext == "bam": |
57
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
127 ipath = track[3] |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
128 if not os.path.exists(ipath): |
57
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
129 ipath = os.path.realpath( |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
130 os.path.join(jc.outdir, trackname + ".bai") |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
131 ) |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
132 cmd = [ |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
133 "samtools", |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
134 "index", |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
135 "-b", |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
136 "-o", |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
137 ipath, |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
138 os.path.realpath(track[0]), |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
139 ] |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
140 sys.stdout.write("#### calling %s" % " ".join(cmd)) |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
141 jc.subprocess_check_call(cmd) |
57
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
142 track_conf.update( |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
143 {"conf": {"options": {"bam": {"bam_index": ipath}}}} |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
144 ) |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
145 elif trext == "cram": |
57
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
146 ipath = track[3] |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
147 if not os.path.exists(ipath): |
57
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
148 ipath = os.path.realpath( |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
149 os.path.join("./", trackname + ".crai") |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
150 ) |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
151 cmd = [ |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
152 "samtools", |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
153 "index", |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
154 "-c", |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
155 "-o", |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
156 ipath, |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
157 os.path.realpath(track[0]), |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
158 ] |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
159 jc.subprocess_check_call(cmd) |
57
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
160 track_conf.update( |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
161 {"conf": {"options": {"cram": {"cram_index": ipath}}}} |
94264fe60478
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 4b5df41484f6bdf316edaf95b53c92d328ec1674-dirty
fubar
parents:
53
diff
changeset
|
162 ) |
48
460d5b6c5d98
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a-dirty
fubar
parents:
46
diff
changeset
|
163 track_conf["path"] = tpath |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
164 track_conf["format"] = trext |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
165 track_conf["name"] = trackname |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
166 track_conf["label"] = trackname |
52
ae12977c0e5e
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 44df75b3714aa9e02983e0b67ef43fc0eee4a8d4-dirty
fubar
parents:
48
diff
changeset
|
167 track_conf["trackfiles"].append((tpath, trext, useuri, trackname, {})) |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
168 keys = jc.process_annotations(track_conf) |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
169 |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
170 if keys: |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
171 for key in keys: |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
172 if trext in [ |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
173 "bigwig", |
67
cefe9dbf1d80
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 6dac6d6debf44c68eae2785e926fb8420f76958e-dirty
fubar
parents:
66
diff
changeset
|
174 "gff", |
cefe9dbf1d80
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 6dac6d6debf44c68eae2785e926fb8420f76958e-dirty
fubar
parents:
66
diff
changeset
|
175 "gff3", |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
176 "vcf", |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
177 "maf", |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
178 ]: |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
179 default_session_data["visibility"]["default_on"].append(key) |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
180 else: |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
181 default_session_data["visibility"]["default_off"].append( |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
182 key |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
183 ) |
60
81d535970196
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 403a35e1245fa5e62f4be6116a725b9e4d9c353a
fubar
parents:
57
diff
changeset
|
184 if trext in ["gff", "gff3", "bed", "vcf", "maf", "blastxml"]: |
81d535970196
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 403a35e1245fa5e62f4be6116a725b9e4d9c353a
fubar
parents:
57
diff
changeset
|
185 ttype = "LinearBasicDisplay" |
81d535970196
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 403a35e1245fa5e62f4be6116a725b9e4d9c353a
fubar
parents:
57
diff
changeset
|
186 if trext == "vcf": |
81d535970196
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 403a35e1245fa5e62f4be6116a725b9e4d9c353a
fubar
parents:
57
diff
changeset
|
187 ttype = "LinearVariantDisplay" |
81d535970196
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 403a35e1245fa5e62f4be6116a725b9e4d9c353a
fubar
parents:
57
diff
changeset
|
188 style_json = { |
67
cefe9dbf1d80
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 6dac6d6debf44c68eae2785e926fb8420f76958e-dirty
fubar
parents:
66
diff
changeset
|
189 "type": ttype, |
cefe9dbf1d80
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 6dac6d6debf44c68eae2785e926fb8420f76958e-dirty
fubar
parents:
66
diff
changeset
|
190 "trackShowLabels": False, |
cefe9dbf1d80
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 6dac6d6debf44c68eae2785e926fb8420f76958e-dirty
fubar
parents:
66
diff
changeset
|
191 "trackShowDescriptions": False, |
60
81d535970196
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 403a35e1245fa5e62f4be6116a725b9e4d9c353a
fubar
parents:
57
diff
changeset
|
192 } |
81d535970196
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 403a35e1245fa5e62f4be6116a725b9e4d9c353a
fubar
parents:
57
diff
changeset
|
193 default_session_data["style"][key] = style_json |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
194 # general_data = { |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
195 # "analytics": root.find("metadata/general/analytics").text, |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
196 # "primary_color": root.find("metadata/general/primary_color").text, |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
197 # "secondary_color": root.find("metadata/general/secondary_color").text, |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
198 # "tertiary_color": root.find("metadata/general/tertiary_color").text, |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
199 # "quaternary_color": root.find("metadata/general/quaternary_color").text, |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
200 # "font_size": root.find("metadata/general/font_size").text, |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
201 # } |
66
bc10ad1dfb98
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 6dac6d6debf44c68eae2785e926fb8420f76958e-dirty
fubar
parents:
65
diff
changeset
|
202 jc.add_general_configuration({}) |
65
c81902830900
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 6dac6d6debf44c68eae2785e926fb8420f76958e
fubar
parents:
62
diff
changeset
|
203 trackconf = jc.config_json.get("tracks", []) |
c81902830900
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 6dac6d6debf44c68eae2785e926fb8420f76958e
fubar
parents:
62
diff
changeset
|
204 for gnome in jc.genome_names: |
c81902830900
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 6dac6d6debf44c68eae2785e926fb8420f76958e
fubar
parents:
62
diff
changeset
|
205 trackconf += jc.tracksToAdd[gnome] |
71
e26a8a6d2d2e
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit cf208cecf0140ff43d145a44713ab7108057fb8b
fubar
parents:
69
diff
changeset
|
206 logging.debug( |
69
7230a2422507
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 2c7d6c19a42c421de987ebfdf927c64062ebd79f-dirty
fubar
parents:
67
diff
changeset
|
207 "++++ adding trackconf=%s for gnome %s" % (trackconf, gnome) |
67
cefe9dbf1d80
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 6dac6d6debf44c68eae2785e926fb8420f76958e-dirty
fubar
parents:
66
diff
changeset
|
208 ) |
65
c81902830900
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 6dac6d6debf44c68eae2785e926fb8420f76958e
fubar
parents:
62
diff
changeset
|
209 jc.config_json["tracks"] = trackconf |
69
7230a2422507
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 2c7d6c19a42c421de987ebfdf927c64062ebd79f-dirty
fubar
parents:
67
diff
changeset
|
210 assconf = jc.config_json.get("assemblies", []) |
7230a2422507
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 2c7d6c19a42c421de987ebfdf927c64062ebd79f-dirty
fubar
parents:
67
diff
changeset
|
211 assconf += jc.assemblies |
7230a2422507
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 2c7d6c19a42c421de987ebfdf927c64062ebd79f-dirty
fubar
parents:
67
diff
changeset
|
212 jc.config_json["assemblies"] = assconf |
71
e26a8a6d2d2e
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit cf208cecf0140ff43d145a44713ab7108057fb8b
fubar
parents:
69
diff
changeset
|
213 logging.debug("+++assemblies=%s, gnames=%s" % (assconf, jc.genome_names)) |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
214 jc.write_config() |
67
cefe9dbf1d80
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 6dac6d6debf44c68eae2785e926fb8420f76958e-dirty
fubar
parents:
66
diff
changeset
|
215 default_session_data.update({"session_name": sessName}) |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
216 track_conf.update(default_session_data) |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
217 jc.add_default_session(default_session_data) |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
218 # jc.text_index() not sure what broke here. |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
219 else: |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
220 sys.stderr.write( |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
221 "!!!! Collection has no suitable trackfiles for autogenJB2 - nothing to process" |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
222 ) |