changeset 48:6803152ea92a draft

planemo upload for repository https://github.com/Yating-L/jbrowse_hub commit 073c8ceda5eddfb4ccd07cfa96a8353e5535ffaf-dirty
author yating-l
date Tue, 28 Mar 2017 18:13:27 -0400
parents b7bf45272ab7
children 193e94a43f0f
files TrackHub.py bedToGff3.pyc blastxmlToGff3.py blastxmlToGff3.pyc jbrowse_hub.xml tool_dependencies.xml utils.pyc
diffstat 7 files changed, 10 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/TrackHub.py	Wed Mar 22 15:20:56 2017 -0400
+++ b/TrackHub.py	Tue Mar 28 18:13:27 2017 -0400
@@ -116,8 +116,6 @@
         self.createTrackList()
         json_file = os.path.join(self.json, "trackList.json")
         bigwig_track = dict()
-        #color_setting = {"pos_color" : track['pos_color'], "neg_color" : track['neg_color']} 
-        #bigwig_track['style'] = {"pos_color" : track['pos_color'], "neg_color" : track['neg_color']} 
         bigwig_track['urlTemplate'] = os.path.join('../raw', track['fileName'])
         bigwig_track['type'] = 'JBrowse/View/Track/Wiggle/XYPlot'
         bigwig_track['storeClass'] = 'JBrowse/Store/SeqFeature/BigWig'
@@ -128,8 +126,6 @@
 
     #If the metadata is not set, use the default value
     def SetMetadata(self, track, metadata):
-        #print metadata
-        #track.update(metadata)
         if 'label' not in metadata.keys() or metadata['label'] == '':
             metadata['label'] = track['fileName']
         if 'color' not in metadata.keys() or metadata['color'] == '':
Binary file bedToGff3.pyc has changed
--- a/blastxmlToGff3.py	Wed Mar 22 15:20:56 2017 -0400
+++ b/blastxmlToGff3.py	Tue Mar 28 18:13:27 2017 -0400
@@ -137,12 +137,18 @@
             group['parent_field']['end'] = coords[1]
             group['parent_field']['score'] = group['parent_field']['strand'] = group['parent_field']['phase'] = '.'
             group['parent_attribute']['match_num'] = match_num
+            group['alignments'].sort(key=lambda x: (x['field']['start'], x['field']['end']))
             utils.write_features(group['parent_field'], group['parent_attribute'], gff3)
+            prev_end = -1
             for align in group['alignments']:
+                overlap = ''
+                if align['field']['start'] <= prev_end:
+                    overlap += str(align['field']['start']) + ',' + str(prev_end)
+                prev_end = align['field']['end']
+                align['attribute']['overlap'] = overlap
                 utils.write_features(align['field'], align['attribute'], gff3)
     gff3.close()
 
-
 def blastxml2gff3(xml_file, gff3_file):
     result_handle = open(xml_file)
     blast_records = NCBIXML.parse(result_handle)
Binary file blastxmlToGff3.pyc has changed
--- a/jbrowse_hub.xml	Wed Mar 22 15:20:56 2017 -0400
+++ b/jbrowse_hub.xml	Tue Mar 28 18:13:27 2017 -0400
@@ -68,8 +68,6 @@
             #end if
             #if $f.formatChoice.format_select == 'blastxml'
                 --blastxml $f.formatChoice.BlastXML
-                #set track_color = str($f.formatChoice.track_color)
-                #silent extra_data_dict.update({"color" : $track_color})
                 #silent $prepare_json($f.formatChoice.BlastXML, extra_data_dict)
             #end if
             #if $f.formatChoice.format_select == 'gtf'
@@ -160,13 +158,6 @@
                                 label="Blast Alignments File"
                         />
                         <param name="label" type="text" size="30" value="Blast Alignment" label="Track name" />
-                        <param name="track_color" type="color" label="Track color" value="#daa520">
-                            <sanitizer>
-                                <valid initial="string.letters,string.digits">
-                                    <add value="#"/>
-                                </valid>
-                            </sanitizer>
-                        </param>
                     </when>
                     <when value="bigwig">
                         <param
--- a/tool_dependencies.xml	Wed Mar 22 15:20:56 2017 -0400
+++ b/tool_dependencies.xml	Tue Mar 28 18:13:27 2017 -0400
@@ -3,9 +3,11 @@
     <package name="samtools" version="1.2">
         <repository changeset_revision="5b7172f9b230" name="package_samtools_1_2" owner="iuc" prior_installation_required="True" toolshed="https://testtoolshed.g2.bx.psu.edu" />
     </package>
+
     <package name="numpy" version="1.9">
         <repository changeset_revision="1e2b7e63dec2" name="package_numpy_1_9" owner="iuc" prior_installation_required="True" toolshed="https://testtoolshed.g2.bx.psu.edu" />
     </package>
+
     <package name="biopython" version="1.68">
         <readme>
 This package is based on package_biopython_1_67 owned by biopython. 
@@ -45,6 +47,7 @@
             </actions>
         </install>
     </package>
+    
      <package name="ucsc_tools_340" version="1.0">
         <install version="1.0">
             <actions_group>
Binary file utils.pyc has changed