Hello,

The first thing is absolutely new to the python.

  I am trying to integrate data-grid with GALAXY to host the pubchem data. For doing so I have created one .mako to add page and added one function in user.py. it adds one button as shown in the attachment. on click of the button it redirects to new page where the output is displayed as shown in the image file galaxy-op.png in attachment.

My requirment is to have check boxes against the list of the files and add one button upload in the page shown in the file attached galaxy-op.png, which when clicked upload the data from the data-grid using some python script to local point.

Kindly guide on that what to do.


The changes done so far i present down:

In the file /root/galaxy-dist/lib/galaxy/web/controllers/user.py

Added :

 def gsrm_data( self, trans, webapp='galaxy'):

        # session = trans.sa_session
        # user = session.query( model.User ).filter_by( username=username ).first()
         user = trans.get_user()
         prxy="/root/x509up_u3163"
         refresh_frames = [ 'masthead']
         os.environ["X509_USER_PROXY"]=prxy
         os.environ["PATH"]=os.environ["PATH"]+":/usr/local/GLOBUS-4.0.8/bin/:/usr/local/dpm/bin/:/usr/local/glite/bin"
         os.environ["LD_LIBRARY_PATH"]="/usr/local/GLOBUS-4.0.8/lib:/usr/local/dpm/lib:/usr/local/dpm/lib64:/usr/local/glite/lib"
         os.putenv('LD_LIBRARY_PATH', "/usr/local/GLOBUS-4.0.8/lib:/usr/local/dpm/lib:/usr/local/dpm/lib64:/usr/local/glite/lib")
         os.environ["DPM_HOST"]="gsrm"
         os.environ["DPNS_HOST"]="gsrm"
         proc = subprocess.Popen(['dpns-ls -l /dpm/ctsf.cdac.org.in/home/OSDD/pubchem',prxy], shell=True, stdout=subprocess.PIPE,stdin=subprocess.PIPE)
         gsrm_output=proc.communicate()[0]
         sub_str=gsrm_output.split()
         index=8
         count=0
         str1='<table><tr><td>'+user.email+user.username+"slno"+'</td><td>'+"Gsrm_FileName        "+'</td><td>'+"GSRM_URL"+'</td></tr><tr><td>'
         while (index < len(sub_str)):
             count=count+1
             str1=str1+str(count)+'</td><td>'+sub_str[index]+'</td><td></td><td>'+"/dpm/ctsf.cdac.org.in/home/OSDD/pubchem/"+sub_str[index]+'</td></tr><tr><td>'
             index = index + 9
         str1=str1+'</td></tr></table>'

   return trans.fill_template( '/sindex.mako',
                                    webapp=webapp,
                                    refresh_frames=refresh_frames,
                                    message=str1,
                                    status='done',
                                    active_view="user" )

    @web.expose


created  /root/galaxy-dist/templates/sindex.mako   

<%!
    def inherit(context):
        if context.get('webapp'):
            webapp = context.get('webapp')
        else:
            webapp = 'galaxy'
        return '/webapps/%s/base_panels.mako' % webapp
%>
<%inherit file="${inherit(context)}"/>
<%namespace file="/messagex.mako" import="render_msg" />


<%def name="init()">
<%
    self.has_left_panel=False
    self.has_right_panel=False
    self.message_box_visible=False
    self.active_view="user"
    self.overlay_visible=False
%>
</%def>

<%def name="stylesheets()">
    ${parent.stylesheets()}
    <style>
        div#center {
            padding: 10px;
        }
    </style>
</%def>
<%def name="title()">Galaxy :: Logout</%def>

<%def name="center_panel()">
    ${self.body()}
</%def>

<%def name="body()">
    %if message:
        ${render_msg( message, status )}
    %endif
</%def>



___________________________________________________________________________________________


Please help!!!!


Regards
Neetu Sharma