Mercurial > repos > fubar > jbrowse2
annotate autogenJB2.py @ 46:4181e97c70a7 draft
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
author | fubar |
---|---|
date | Mon, 04 Mar 2024 09:47:19 +0000 |
parents | bc57164eb270 |
children | 460d5b6c5d98 |
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 |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
8 logging.basicConfig(level=logging.debug) |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
9 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
|
10 |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
11 |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
12 def makeDefaultLocation(): |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
13 |
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 refName = jc.genome_firstcontig |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
15 defloc = "%s:100..10000" % refName |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
16 return defloc |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
17 |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
18 |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
19 if __name__ == "__main__": |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
20 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
|
21 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
|
22 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
|
23 "--trackmeta", |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
24 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
|
25 default=[], |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
26 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
|
27 ) |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
28 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
|
29 "--referencemeta", |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
30 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
|
31 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
|
32 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
|
33 ) |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
34 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
|
35 "--pafmeta", |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
36 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
|
37 default=[], |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
38 action="append", |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
39 ) |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
40 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
|
41 "--pafreferencemeta", |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
42 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
|
43 default=[], |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
44 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
|
45 ) |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
46 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
|
47 "--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
|
48 ) |
39
bc57164eb270
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit ace841acd53be99494ed9bba8bb9e2ae212d3661
fubar
parents:
38
diff
changeset
|
49 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
|
50 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
|
51 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
|
52 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
|
53 # --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
|
54 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
|
55 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
|
56 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
|
57 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
|
58 # 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
|
59 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
|
60 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
|
61 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
|
62 guseuri = [] |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
63 for x in genome_paths: |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
64 if x.startswith('http://') or x.startswith('https://'): |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
65 guseuri.append('yes') |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
66 else: |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
67 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
|
68 jc = jbC( |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
69 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
|
70 jbrowse2path=args.jbrowse2path, |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
71 genomes=[ |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
72 { |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
73 "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
|
74 "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
|
75 "useuri": guseuri[i], |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
76 "meta": {"name": 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
|
77 "dataset_dname": 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
|
78 } |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
79 } |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
80 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
|
81 ], |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
82 ) |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
83 |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
84 jc.process_genomes() |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
85 default_session_data = { |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
86 "visibility": { |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
87 "default_on": [], |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
88 "default_off": [], |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
89 }, |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
90 "style": {}, |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
91 "style_labels": {}, |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
92 } |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
93 |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
94 listtracks = trackList |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
95 # 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
|
96 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
|
97 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
|
98 for i, track in enumerate(listtracks): |
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] |
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
100 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
|
101 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
|
102 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
|
103 if not refdat: |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
104 jc.logging.warn( |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
105 "!! 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
|
106 % (refname, trackname) |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
107 ) |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
108 sys.exit(3) |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
109 else: |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
110 track_conf = { |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
111 "conf": { |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
112 "options": { |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
113 "paf": {"genome": refdat, "genome_label": trackname} |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
114 } |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
115 } |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
116 } |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
117 elif trext == "bam": |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
118 ipath = track[3] |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
119 if not os.path.exists(ipath): |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
120 ipath = os.path.realpath(os.path.join(jc.outdir, trackname + '.bai')) |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
121 cmd = ["samtools", "index", "-b", "-o", ipath, os.path.realpath(track[0])] |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
122 sys.stdout.write('#### calling %s' % ' '.join(cmd)) |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
123 jc.subprocess_check_call(cmd) |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
124 track_conf = {"conf": {"options": {"bam": {"bam_index": ipath}}}} |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
125 elif trext == "cram": |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
126 ipath = track[3] |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
127 if not os.path.exists(ipath): |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
128 jc.logging.info('calling %s' % ' '.join(cmd)) |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
129 ipath = os.path.realpath(os.path.join('./', trackname + '.crai')) |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
130 cmd = ["samtools", "index", "-c", "-o", ipath, os.path.realpath(track[0])] |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
131 sys.stdout.write('#### calling %s' % ' '.join(cmd)) |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
132 jc.subprocess_check_call(cmd) |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
133 track_conf = {"conf": {"options": {"cram": {"cram_index": ipath}}}} |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
134 else: |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
135 track_conf = {} |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
136 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
|
137 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
|
138 track_conf["label"] = trackname |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
139 useu = tpath.startswith('http://') or tpath.startswith('https://') |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
140 useuri = 'no' |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
141 if useu: |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
142 useuri = 'yes' |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
143 track_conf["trackfiles"] = [ |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
144 (tpath, trext, useuri, trackname, {}), |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
145 ] |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
146 track_conf["category"] = "Autogenerated" |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
147 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
|
148 |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
149 if keys: |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
150 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
|
151 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
|
152 "bigwig", |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
153 "gff3", |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
154 "gff", |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
155 "vcf", |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
156 "maf", |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
157 ]: |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
158 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
|
159 else: |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
160 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
|
161 key |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
162 ) |
30
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
163 # general_data = { |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
164 # "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
|
165 # "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
|
166 # "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
|
167 # "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
|
168 # "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
|
169 # "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
|
170 # } |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
171 # jc.add_general_configuration(general_data) |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
172 trackconf = jc.config_json.get("tracks", None) |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
173 if trackconf: |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
174 jc.config_json["tracks"].update(jc.tracksToAdd) |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
175 else: |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
176 jc.config_json["tracks"] = jc.tracksToAdd |
8f02a84ee278
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 48bc917d34af182e9158915862c8a35723660919
fubar
parents:
diff
changeset
|
177 jc.write_config() |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
178 defLoc = makeDefaultLocation() |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
179 default_session_data.update( |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
180 {"defaultLocation": defLoc, "session_name": sessName} |
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
181 ) |
35
15da358c3108
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 80b849766a962bac4bd0bb8cb69c118cc42699cd-dirty
fubar
parents:
30
diff
changeset
|
182 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
|
183 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
|
184 # 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
|
185 else: |
46
4181e97c70a7
planemo upload for repository https://github.com/usegalaxy-eu/temporary-tools/tree/master/jbrowse2 commit 3a43e9e0ffce0966101203102e769d1ced28618a
fubar
parents:
39
diff
changeset
|
186 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
|
187 "!!!! 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
|
188 ) |