# HG changeset patch
# User yating-l
# Date 1529445591 14400
# Node ID 43a700afd45734ab524dab27c26e214e9306c2cc
# Parent 9161beae834fb4193288ea49a19ccb1c1752c996
planemo upload for repository https://github.com/goeckslab/jbrowse-archive-creator.git commit bcb239c4045d2c47a8acad5fbd29eea03663e187
diff -r 9161beae834f -r 43a700afd457 README.md
--- a/README.md Sat Jun 02 13:08:46 2018 -0400
+++ b/README.md Tue Jun 19 17:59:51 2018 -0400
@@ -1,5 +1,5 @@
# JBrowse Hub Creator
-This Galaxy tool permits to prepare your files to be ready for JBrowse visualization.
+This Galaxy tool is used to prepare your files to be ready for JBrowse visualization.
## Features
1. Similar interface to Hub Archive Creator.
@@ -7,33 +7,36 @@
3. Group the tracks
4. Set the color for each track
5. Set the label for each track
-6. Create workflows within Galaxy to automatize pipeline analysis and get them ready to visualization inside JBrowse...in a few clicks!
+6. Support generating Tabix Indexed CanVasFeatures tracks
+7. Create workflows within Galaxy to automatize pipeline analysis and get them ready to visualization inside JBrowse...in a few clicks!
At the moment, Supported datatypes are:
-- Bam
-- Bed
+- BAM
+- BED
+ - Generic BED
- Splice Junctions (BED 12+1)
- Simple Repeats (BED 4+12)
+ - BLAT alignment (BigPsl)
+ - BLAST alignment (BED 12+12)
- BigWig
-- Gff3
-- Gtf
-- Blastxml
-- BigPsl
+- GFF3
+- GTF
+- Blast XML output
## Installation:
-1. You would need to add this tool into your Galaxy.
- 1. (strongly preferred) **ToolShed Installation**: Tool is in [testtoolshed](https://testtoolshed.g2.bx.psu.edu/view/yating-l/jbrowse_hub/b7bf45272ab7)
- 2. OR **Local Installation**: See https://wiki.galaxyproject.org/Admin/Tools/AddToolTutorial
-2. The tool can be used with or without Conda (activate it in your galaxy.ini)
-3. If installed without TS (by downloading on GitHub), you need to have all the binaries accessible within Galaxy.
- You can use the script [install_linux_binaries](util/install_linux_binaries) with a linux x86-64 (64bits)
+
+**ToolShed Installation**:
+- The JBrowse Archive Creator tool is published at [ToolShed Repository](https://toolshed.g2.bx.psu.edu/view/yating-l/jbrowsearchivecreator)
+
+- Refer to [Installing Tools into Galaxy](https://galaxyproject.org/admin/tools/add-tool-from-toolshed-tutorial) tutorial if you want to learn how to install a tool from ToolShed.
+
## Future
See [TODO.md](todo.md) for more information
## Contribute
-- Source Code: https://github.com/Yating-L/jbrowse_hub
+- Source Code: https://github.com/goeckslab/jbrowse-archive-creator.git
## Support
@@ -41,7 +44,7 @@
- For more information about how to use G-OnRamp:
- [Wilson Leung](wleung@wustl.edu) - Product owner and developer
- - [Yating Liu](yliu41@wustl.edu) - Community manager and Developer
+ - [Yating Liu](yliu41@wustl.edu) - Community manager and developer
- For more information about the project vision, or for partneship:
- [Elgin, Sarah](selgin@wustl.edu) - PI
diff -r 9161beae834f -r 43a700afd457 TrackHub.py
--- a/TrackHub.py Sat Jun 02 13:08:46 2018 -0400
+++ b/TrackHub.py Tue Jun 19 17:59:51 2018 -0400
@@ -51,10 +51,12 @@
if Datatype.trackType == 'HTMLFeatures':
self.myTrackStyle = TrackStyles(self.tool_directory, self.mySpecieFolderPath, self.trackList)
self.logger = logging.getLogger(__name__)
+ self.nameIndexTrackList = []
-
def addTrack(self, trackDbObject):
+ if trackDbObject['nameIndex'] == "true":
+ self.nameIndexTrackList.append(trackDbObject['trackLabel'])
if trackDbObject['dataType'].lower() == 'bam':
subtools.add_track_json(self.trackList, trackDbObject['options'])
elif trackDbObject['dataType'].lower() == 'bigwig':
@@ -104,8 +106,9 @@
subtools.prepare_refseqs(self.reference_genome.false_path, self.mySpecieFolderPath)
def _indexName(self):
- subtools.generate_names(self.mySpecieFolderPath)
- print "finished name index \n"
+ if self.nameIndexTrackList:
+ subtools.generate_names(self.mySpecieFolderPath, self.nameIndexTrackList)
+ print "finished name index \n"
def _outHtml(self):
mylookup = TemplateLookup(directories=[os.path.join(self.tool_directory, 'templates')],
diff -r 9161beae834f -r 43a700afd457 datatypes/Datatype.py
--- a/datatypes/Datatype.py Sat Jun 02 13:08:46 2018 -0400
+++ b/datatypes/Datatype.py Tue Jun 19 17:59:51 2018 -0400
@@ -98,6 +98,8 @@
self.extraSettings["category"] = self.trackSettings["group_name"]
if "track_color" in self.trackSettings and self.trackSettings["track_color"]:
self.extraSettings["color"] = self.trackSettings["track_color"]
+ #store information of whether to generate name index for the track
+ self.extraSettings["nameIndex"] = self.trackSettings["nameIndex"]
@abc.abstractmethod
diff -r 9161beae834f -r 43a700afd457 datatypes/Datatype.pyc
Binary file datatypes/Datatype.pyc has changed
diff -r 9161beae834f -r 43a700afd457 datatypes/converters/DataConversion.pyc
Binary file datatypes/converters/DataConversion.pyc has changed
diff -r 9161beae834f -r 43a700afd457 datatypes/converters/bedToGff3.pyc
Binary file datatypes/converters/bedToGff3.pyc has changed
diff -r 9161beae834f -r 43a700afd457 datatypes/converters/blastxmlToGff3.pyc
Binary file datatypes/converters/blastxmlToGff3.pyc has changed
diff -r 9161beae834f -r 43a700afd457 datatypes/interval/Bed.pyc
Binary file datatypes/interval/Bed.pyc has changed
diff -r 9161beae834f -r 43a700afd457 datatypes/interval/Interval.pyc
Binary file datatypes/interval/Interval.pyc has changed
diff -r 9161beae834f -r 43a700afd457 datatypes/interval/__init__.pyc
Binary file datatypes/interval/__init__.pyc has changed
diff -r 9161beae834f -r 43a700afd457 jbrowse-archive-creator.iml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jbrowse-archive-creator.iml Tue Jun 19 17:59:51 2018 -0400
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r 9161beae834f -r 43a700afd457 jbrowseArchiveCreator.xml
--- a/jbrowseArchiveCreator.xml Sat Jun 02 13:08:46 2018 -0400
+++ b/jbrowseArchiveCreator.xml Tue Jun 19 17:59:51 2018 -0400
@@ -1,4 +1,4 @@
-
+
This Galaxy tool is used to prepare your files to be ready for displaying on JBrowse with Apollo plugin
@@ -81,6 +81,7 @@
#set track_color = str($f.formatChoice.track_color)
#set group_name = str($g.group_name)
#set longLabel = str($f.formatChoice.longLabel)
+
#set extra_data_dict = {"track_color": $track_color,
"group_name": $group_name,
"long_label": $longLabel}
@@ -88,11 +89,12 @@
#set bam_index = $f.formatChoice.BAM.metadata.bam_index
## Add Bam format specific fields
- #silent $extra_data_dict.update({"index": $bam_index})
+ #silent $extra_data_dict.update({"index": $bam_index, "nameIndex": str($f.formatChoice.nameIndex)})
#silent $prepare_json("Bam", $f.formatChoice.BAM, $index_track_final, $extra_data_dict)
#end if
#if $f.formatChoice.format_select == "bed"
+ #silent $extra_data_dict.update({"nameIndex": str($f.formatChoice.bedChoice.nameIndex)})
#if $f.formatChoice.bedChoice.bed_select == "bed_generic"
#silent $prepare_json("Bed", $f.formatChoice.bedChoice.BED_generic, $index_track_final,
$extra_data_dict)
@@ -119,18 +121,22 @@
#end if
#end if
#if $f.formatChoice.format_select == "blastxml"
- #silent $prepare_json("BlastXml", $f.formatChoice.BlastXML, $index_track_final,
+ #silent $extra_data_dict.update({"nameIndex": str($f.formatChoice.nameIndex)})
+ #silent $prepare_json("BlastXml", $f.formatChoice.BlastXML, $index_track_final,
extra_data_dict)
#end if
#if $f.formatChoice.format_select == "bigwig"
+ #silent $extra_data_dict.update({"nameIndex": str($f.formatChoice.nameIndex)})
#silent $prepare_json("BigWig", $f.formatChoice.BIGWIG, $index_track_final,
$extra_data_dict)
#end if
#if $f.formatChoice.format_select == 'gff3'
+ #silent $extra_data_dict.update({"nameIndex": str($f.formatChoice.nameIndex)})
#silent $prepare_json("Gff3", $f.formatChoice.GFF3, $index_track_final,
$extra_data_dict)
#end if
#if $f.formatChoice.format_select == "gtf"
+ #silent $extra_data_dict.update({"nameIndex": str($f.formatChoice.nameIndex)})
## Add also GTF from Agustus? See https://github.com/ENCODE-DCC/kentUtils/issues/8
#silent $prepare_json("Gtf", $f.formatChoice.GTF, $index_track_final,
$extra_data_dict)
@@ -200,11 +206,12 @@
+
-
+
@@ -217,6 +224,7 @@
type="data"
label="Bed File"
/>
+
+
+
+
+
@@ -275,6 +287,7 @@
+
+
+
-
+
+
diff -r 9161beae834f -r 43a700afd457 tracks/BamFeatures.pyc
Binary file tracks/BamFeatures.pyc has changed
diff -r 9161beae834f -r 43a700afd457 tracks/BigwigFeatures.pyc
Binary file tracks/BigwigFeatures.pyc has changed
diff -r 9161beae834f -r 43a700afd457 tracks/CanvasFeatures.pyc
Binary file tracks/CanvasFeatures.pyc has changed
diff -r 9161beae834f -r 43a700afd457 tracks/HTMLFeatures.pyc
Binary file tracks/HTMLFeatures.pyc has changed
diff -r 9161beae834f -r 43a700afd457 tracks/TrackDb.py
--- a/tracks/TrackDb.py Sat Jun 02 13:08:46 2018 -0400
+++ b/tracks/TrackDb.py Tue Jun 19 17:59:51 2018 -0400
@@ -40,7 +40,8 @@
("dataType", self.dataType),
("trackType", self.trackType)]
)
-
+
+ self.track_db["nameIndex"] = self.extraSettings['nameIndex']
extraConfigs = self.prepareExtraSetting()
self.logger.debug("Generate extraConfigs = %s", json.dumps(extraConfigs))
diff -r 9161beae834f -r 43a700afd457 tracks/TrackDb.pyc
Binary file tracks/TrackDb.pyc has changed
diff -r 9161beae834f -r 43a700afd457 tracks/__init__.pyc
Binary file tracks/__init__.pyc has changed
diff -r 9161beae834f -r 43a700afd457 util/Reader.py
--- a/util/Reader.py Sat Jun 02 13:08:46 2018 -0400
+++ b/util/Reader.py Tue Jun 19 17:59:51 2018 -0400
@@ -120,11 +120,15 @@
# TODO: Optimize this double loop
for input_data in array_inputs:
input_false_path = input_data["false_path"]
- input_data["name"] = santitizer.sanitize_name_input(input_data["name"])
- extensionObject = ExtensionClass(input_false_path, input_data)
- extensionObject.generateCustomTrack()
- datatype_dictionary.update({input_data["order_index"]: extensionObject})
- self.logger.debug("%s object: %s has been created", ExtensionClass, input_data["name"])
+ # if the file is empty, skip the rest
+ if os.path.isfile(input_false_path) and os.path.getsize(input_false_path) > 0:
+ input_data["name"] = santitizer.sanitize_name_input(input_data["name"])
+ extensionObject = ExtensionClass(input_false_path, input_data)
+ extensionObject.generateCustomTrack()
+ datatype_dictionary.update({input_data["order_index"]: extensionObject})
+ self.logger.debug("%s object: %s has been created", ExtensionClass, input_data["name"])
+ else:
+ self.logger.info("The input file: %s is empty, skip creating the track for this data", input_data["name"])
return datatype_dictionary
diff -r 9161beae834f -r 43a700afd457 util/santitizer.pyc
Binary file util/santitizer.pyc has changed
diff -r 9161beae834f -r 43a700afd457 util/subtools.py
--- a/util/subtools.py Sat Jun 02 13:08:46 2018 -0400
+++ b/util/subtools.py Tue Jun 19 17:59:51 2018 -0400
@@ -382,8 +382,10 @@
p = _handleExceptionAndCheckCall(array_call)
return p
-def generate_names(outputFolder, hashBits=4):
- array_call = ['generate-names.pl', '--hashBits', '4', '-v', '--out', outputFolder]
+def generate_names(outputFolder, nameIndexTrackList, hashBits=4):
+ array_call = ['generate-names.pl', '--hashBits', str(hashBits), '-v', '--completionLimit', '0', '--out', outputFolder]
+ array_call.append('--tracks')
+ array_call.append(','.join(nameIndexTrackList))
p = _handleExceptionAndCheckCall(array_call)
return p
diff -r 9161beae834f -r 43a700afd457 util/subtools.pyc
Binary file util/subtools.pyc has changed