# HG changeset patch # User yating-l # Date 1491583126 14400 # Node ID ed17bb465bde0ddb404c8813a01d9d581700c2ba # Parent caf649fc310b88adf7a2506b8cb2ac848be3fb18 planemo upload for repository https://github.com/Yating-L/jbrowse_hub commit 8386544cbce1efb5e9dd1f805a2099b3e214363f-dirty diff -r caf649fc310b -r ed17bb465bde TrackHub.py --- a/TrackHub.py Fri Mar 31 17:11:11 2017 -0400 +++ b/TrackHub.py Fri Apr 07 12:38:46 2017 -0400 @@ -8,7 +8,7 @@ class TrackHub: - def __init__(self, inputFiles, reference, outputDirect, tool_dir, genome, extra_files_path, metaData): + def __init__(self, inputFiles, reference, outputDirect, tool_dir, genome, extra_files_path, metaData, jbrowse_host): self.input_files = inputFiles.tracks self.outfile = outputDirect self.outfolder = extra_files_path @@ -18,6 +18,7 @@ self.metaData = metaData self.raw = os.path.join(self.out_path, 'raw') self.json = os.path.join(self.out_path, 'json') + self.jbrowse_host = jbrowse_host try: if os.path.exists(self.json): shutil.rmtree(self.json) @@ -107,7 +108,8 @@ with open(self.outfile, 'w') as htmlfile: htmlstr = 'The JBrowse Hub is created:
' zipfiles = '
  • Download
  • ' - jbrowse_hub = '
  • View JBrowse Hub
  • ' + url = self.jbrowse_host + "/JBrowse-1.12.1/index.html?data=%s" + jbrowse_hub = '
  • View JBrowse Hub
  • ' % url filedir_abs = os.path.abspath(self.outfile) filedir = os.path.dirname(filedir_abs) filedir = os.path.join(filedir, self.outfolder) diff -r caf649fc310b -r ed17bb465bde jbrowse_hub.py --- a/jbrowse_hub.py Fri Mar 31 17:11:11 2017 -0400 +++ b/jbrowse_hub.py Fri Apr 07 12:38:46 2017 -0400 @@ -60,6 +60,9 @@ # Metadata json format parser.add_argument('-j', '--data_json', help='Json containing the metadata of the inputs') + #JBrowse host + parser.add_argument('--jbrowse_host', help="JBrowse Host") + args = parser.parse_args() all_datatype_dictionary = dict() @@ -72,6 +75,7 @@ out_path = 'unknown.html' extra_files_path = '.' tool_directory = '.' + jbrowse_host = args.jbrowse_host if args.genome_name: genome = args.genome_name if args.out: @@ -148,7 +152,7 @@ #Convert tracks into gff3 format all_tracks.addToRaw(f, datatype) - jbrowseHub = TrackHub.TrackHub(all_tracks, reference, out_path, tool_directory, genome, extra_files_path, inputs_data) + jbrowseHub = TrackHub.TrackHub(all_tracks, reference, out_path, tool_directory, genome, extra_files_path, inputs_data, jbrowse_host) jbrowseHub.createHub() """ diff -r caf649fc310b -r ed17bb465bde jbrowse_hub.xml --- a/jbrowse_hub.xml Fri Mar 31 17:11:11 2017 -0400 +++ b/jbrowse_hub.xml Fri Apr 07 12:38:46 2017 -0400 @@ -19,6 +19,10 @@ --fasta '$reference' --genome_name '$genome_name' + #set galaxy_url = str($GALAXY_URL) + #set $jbrowse_url = galaxy_url.replace("8080", "80") + --jbrowse_host '$jbrowse_url' + ## json metadata recording from Remi's hub-archive-creator.xml #import json #set global data_parameter_dict = {} @@ -100,6 +104,7 @@ ]]> +