Commits

Joel Rivera  committed 6fe303a

Add first implementation of the globus authentication integrated in galaxy.

  • Participants
  • Parent commits b2b2b1c
  • Branches gauth

Comments (0)

Files changed (6)

File lib/galaxy/web/framework/ext/__init__.py

Empty file added.

File lib/galaxy/web/framework/ext/globus/__init__.py

+from . import middleware
+
+__all__ = ['middleware', ]

File lib/galaxy/web/framework/ext/globus/middleware.py

+import logging
+from Cookie import BaseCookie
+from cgi import parse_qs
+
+import nexus
+
+log = logging.getLogger(__name__)
+
+class UserAuthentication(object):
+    use_https = False
+    default_nexus_server = 'nexus.api.globusonline.org'
+    auth_page = """\
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+    <head>
+        <title>Galaxycloud</title>
+        <style type="text/css">
+        body {
+            min-width: 500px;
+            text-align: center;
+        }
+        .errormessage {
+            font: 75%% verdana, "Bitstream Vera Sans", geneva, arial, helvetica, helve, sans-serif;
+            padding: 10px;
+            margin: 100px auto;
+            min-height: 32px;
+            max-width: 500px;
+            border: 1px solid #AA6666;
+            background-color: #FFCCCC;
+            text-align: center;
+            font-size: 14px;
+        }
+        </style>
+    </head>
+    <body>
+        <div class="errormessage">
+        <a href="%s">Please authenticate using globus online</a>
+            
+        </div>
+    </body>
+</html>
+"""
+    LOGOUT = 1
+    LOGIN = 2
+    AUTHENTICATED = 3
+    NOT_AUTHORIZED = 4
+
+    def __init__(self, app, nexclient, nexsecret, nexserver=None):
+        if nexclient is None or nexsecret is None:
+            raise Exception("Unable to set Globus User Authentication middlerware. "
+                            "The nexus client 'globus_nexus_client' and client secret "
+                            "'globus_nexus_secret' are required.")
+        if nexserver is None:
+            nexserver = self.default_nexus_server
+        self.nexus_client = nexus.Client({'server': nexserver,
+                                          'client': nexclient,
+                                          'client_secret': nexsecret})
+        self.app = app
+        self.active_users = {}
+        self.handlers = {self.LOGOUT: self._do_logout,
+                         self.LOGIN: self._do_login,
+                         self.AUTHENTICATED: self._authenticate,
+                         self.NOT_AUTHORIZED: self._not_authorized}
+        
+    def __call__(self, environ, start_response):
+        session = self._session(environ)
+        qs = parse_qs(environ['QUERY_STRING'])
+        name, params = self._detect_type_of_request(session, qs)
+        handler = self.handlers[name]
+        return handler(session, start_response, environ, *params)
+
+    def _detect_type_of_request(self, session, qs):
+        """Always return a type of request and the arguments
+        required for the handler.
+        
+        :returns: handler_name, (params)
+        """
+        if 'action' in qs and qs['action'][0] == 'logout' and \
+               session in self.active_users:
+            return self.LOGOUT, ()
+        user = self._user_in_session(session)
+        if user is not None:
+            return self.AUTHENTICATED, (user, )
+        if 'code' in qs:
+            code = qs['code'][0]
+            return self.LOGIN, (code,)
+        return self.NOT_AUTHORIZED, ()
+
+    def _not_authorized(self, session, start_response, environ):
+        start_response( '403 Forbidden', [('Content-type', 'text/html')] )
+        return self.auth_page % self.globus_url(environ)
+
+    def _authenticate(self, session, start_response, environ, user):
+        environ['HTTP_REMOTE_USER'] = user['username']
+        return self.app(environ, start_response)
+        
+    def _do_logout(self, session, start_response, *args):
+        del self.active_users[session]
+        start_response( '303 See other', [('Content-type', 'text/html'),
+                                          ('Location', '/')])
+        return ''
+
+    def _do_login(self, session, start_response, environ, code):
+        atoken = self._fetch_access_token(code)
+        user = self.nexus_client.get_user_using_access_token(atoken)
+        environ['HTTP_REMOTE_USER'] = user['username']
+        def custom_start_response(status, headers, exc_info=None):
+            """This is closure to bind Galaxy Session with Globus User.
+            Look for the Set-Cookie header in the next middleware.
+            """
+            if session is None:
+                for name, value in headers:
+                    if name == 'Set-Cookie':
+                        cookie = BaseCookie()
+                        cookie.load(value)
+                        if 'galaxysession' in cookie:
+                            sess = cookie['galaxysession'].value
+                            self.active_users[sess] = (user, atoken)
+                        break
+            else:
+                self.active_users[session] = (user, atoken)
+            headers  += [('Content-type', 'text/html'),
+                         ('Location', '/')]
+            return start_response('303 See Other', headers, exc_info)
+        
+        return self.app(environ, custom_start_response)
+
+    def _user_in_session(self, session):
+        if session is not None and \
+               session in self.active_users:
+            user, token = self.active_users[session]
+            log.debug('Loged in user %s with atoken %s' % (user, token))
+            return user
+        return None
+
+    def _fetch_access_token(self, code):
+        token, rtoken, exp = self.nexus_client.get_access_token_from_code(code)
+        return token
+        
+    def _req_cookie(self, environ):
+        cookie = BaseCookie()
+        cookie.load(environ.get('HTTP_COOKIE', ''))
+        return cookie
+
+    def _session(self, environ):
+        cookie = self._req_cookie(environ)
+        if cookie:
+            try:
+                session = cookie['galaxysession']
+            except KeyError:
+                return None
+            else:
+                return session.value
+
+    def globus_url(self, env):
+        if self.use_https:
+            prefx = 'https'
+        else:
+            prefx = 'http'
+        host = env['HTTP_HOST']
+        return (('https://www.globusonline.org/OAuth?response_type=code&'
+                'redirect_uri={0}://{1}&client_id={2}') 
+                .format(prefx, host, self.nexus_client.client))
+        
+        

File lib/galaxy/webapps/galaxy/buildapp.py

 import galaxy.model.mapping
 import galaxy.datatypes.registry
 import galaxy.web.framework
+from  galaxy.web.framework.ext import globus
 
 class GalaxyWebApplication( galaxy.web.framework.WebApplication ):
     pass
     # Various debug middleware that can only be turned on if the debug
     # flag is set, either because they are insecure or greatly hurt
     # performance
+    gparams = (conf.get('globus_nexus_client', None),
+               conf.get('globus_nexus_secret', None),
+               conf.get('globus_nexus_server', None))
+    app = globus.middleware.UserAuthentication(app, *gparams)
     if debug:
         # Middleware to check for WSGI compliance
         if asbool( conf.get( 'use_lint', False ) ):

File tool_conf.xml

 <?xml version="1.0"?>
 <toolbox>
   <!-- keep our tools at the top for now? -->
-  <label text="Data Transfer" id="data_transfer" />
-  <section name="Globus Data Transfer" id="globus">
+  <section name="Globus" id="globus">
+    <tool file="globus/transfer.xml" />
     <tool file="globus/from_go.xml" />
     <tool file="globus/to_go.xml" />
-    <tool file="globus/from_go_plain.xml" />
-    <tool file="globus/to_go_plain.xml" />
-    <tool file="globus/transfer.xml" />
+    <tool file="globus/condor_blastp_wrapper.xml" />
     <tool file="globus/directory_dataset_hack.xml" />
   </section>
-  <section name="Get Data" id="getext">
-    <tool file="data_source/upload.xml"/>
-    <tool file="data_source/ucsc_tablebrowser.xml" />
-    <tool file="data_source/ucsc_tablebrowser_test.xml" />
-    <tool file="data_source/ucsc_tablebrowser_archaea.xml" />
-    <tool file="data_source/bx_browser.xml" />
-    <tool file="data_source/ebi_sra.xml"/>
-    <tool file="data_source/microbial_import.xml" />
-    <tool file="data_source/biomart.xml" />
-    <tool file="data_source/biomart_test.xml" />
-    <tool file="data_source/cbi_rice_mart.xml" />
-    <tool file="data_source/gramene_mart.xml" />
-    <tool file="data_source/fly_modencode.xml" />
-    <tool file="data_source/flymine.xml" />
-    <tool file="data_source/flymine_test.xml" />
-    <tool file="data_source/modmine.xml" />
-    <tool file="data_source/ratmine.xml" />
-    <tool file="data_source/yeastmine.xml" />
-    <tool file="data_source/metabolicmine.xml" />
-    <tool file="data_source/worm_modencode.xml" />
-    <tool file="data_source/wormbase.xml" />
-    <tool file="data_source/wormbase_test.xml" />
-    <tool file="data_source/eupathdb.xml" />
-    <tool file="data_source/encode_db.xml" />
-    <tool file="data_source/epigraph_import.xml" />
-    <tool file="data_source/epigraph_import_test.xml" />
-    <tool file="data_source/hbvar.xml" />
-    <tool file="data_source/genomespace_file_browser_prod.xml" />
-    <!-- <tool file="data_source/genomespace_file_browser_test.xml" />
-    <tool file="data_source/genomespace_file_browser_dev.xml" /> -->
-    <tool file="validation/fix_errors.xml" />
-  </section>
-  <section name="Send Data" id="send">
-    <tool file="data_destination/epigraph.xml" />
-    <tool file="data_destination/epigraph_test.xml" />
-  </section>
-
-
-  <label text="NGS Applications" id="ngs_apps" />
-  <section name="NGS: QC and manipulation" id="NGS_QC">    
-    <label text="FastQC: fastq/sam/bam" id="fastqcsambam" />
-    <tool file="rgenetics/rgFastQC.xml" />
-    
-    <label text="Illumina fastq" id="illumina" />
-    <tool file="fastq/fastq_groomer.xml" />
-    <tool file="fastq/fastq_paired_end_splitter.xml" />
-    <tool file="fastq/fastq_paired_end_joiner.xml" />
-    <tool file="fastq/fastq_stats.xml" />
-    
-    <label text="Roche-454 data" id="454" />
-    <tool file="metag_tools/short_reads_figure_score.xml" />
-    <tool file="metag_tools/short_reads_trim_seq.xml" />
-    <tool file="fastq/fastq_combiner.xml" />
-    
-    <label text="AB-SOLiD data" id="solid" />
-    <tool file="next_gen_conversion/solid2fastq.xml" />
-    <tool file="solid_tools/solid_qual_stats.xml" />
-    <tool file="solid_tools/solid_qual_boxplot.xml" />
-    
-    <label text="Generic FASTQ manipulation" id="generic_fastq" />
-    <tool file="fastq/fastq_filter.xml" />
-    <tool file="fastq/fastq_trimmer.xml" />
-    <tool file="fastq/fastq_trimmer_by_quality.xml" />
-    <tool file="fastq/fastq_masker_by_quality.xml" />
-    <tool file="fastq/fastq_paired_end_interlacer.xml" />
-    <tool file="fastq/fastq_paired_end_deinterlacer.xml" />
-    <tool file="fastq/fastq_manipulation.xml" />
-    <tool file="fastq/fastq_to_fasta.xml" />
-    <tool file="fastq/fastq_to_tabular.xml" />
-    <tool file="fastq/tabular_to_fastq.xml" />
-    
-    <label text="FASTX-Toolkit for FASTQ data" id="fastx_toolkit" />
-    <tool file="fastx_toolkit/fastq_quality_converter.xml" />
-    <tool file="fastx_toolkit/fastx_quality_statistics.xml" />
-    <tool file="fastx_toolkit/fastq_quality_boxplot.xml" />
-    <tool file="fastx_toolkit/fastx_nucleotides_distribution.xml" />
-    <tool file="fastx_toolkit/fastq_to_fasta.xml" />
-    <tool file="fastx_toolkit/fastq_quality_filter.xml" />
-    <tool file="fastx_toolkit/fastq_to_fasta.xml" />
-    <tool file="fastx_toolkit/fastx_artifacts_filter.xml" />
-    <tool file="fastx_toolkit/fastx_barcode_splitter.xml" />
-    <tool file="fastx_toolkit/fastx_clipper.xml" />
-    <tool file="fastx_toolkit/fastx_collapser.xml" />
-    <tool file="fastx_toolkit/fastx_renamer.xml" />
-    <tool file="fastx_toolkit/fastx_reverse_complement.xml" />
-    <tool file="fastx_toolkit/fastx_trimmer.xml" />
-
-    <label text="fastq Demultiplexer" id="demultiplexer"/>
+<!--
+  <section name="demultiplexer" id="demultiplexer">
     <tool file="demultiplexer/demultiplexer.xml"/>
     <tool file="demultiplexer/demultiplexOneSample.xml"/>
   </section>
-
-  <!--
-  Keep this section commented until it includes tools that
-  will be hosted on test/main.  The velvet wrappers have been
-  included in the distribution but will not be hosted on our
-  public servers for the current time.
-  <section name="NGS: Assembly" id="ngs_assembly">
-  <label text="Velvet" id="velvet"/>
-  <tool file="sr_assembly/velvetg.xml" />
-  <tool file="sr_assembly/velveth.xml" />
-  </section>
-  -->
-  <section name="NGS: Mapping" id="solexa_tools">
-    <label text="Illumina" id="mapping_illumina" />
-    <tool file="sr_mapping/bowtie_wrapper.xml" />
-    <tool file="sr_mapping/bwa_wrapper.xml" />
-    <!-- <tool file="snap/snap-index.xml"/>  -->
-    <tool file="snap/snap-alignment.xml"/>
+  <section name="Novoalign" id="Novoalign">
     <tool file="novoalign/novoalign.xml"/>
-    <label text="SOLiD" id="mapping_solid" />
-    <tool file="sr_mapping/bowtie_color_wrapper.xml" />
-    <tool file="sr_mapping/bwa_color_wrapper.xml" />    
-    <label text="ROCHE-454" id="mapping_454" />
-    <tool file="metag_tools/megablast_wrapper.xml" />
-    <tool file="metag_tools/megablast_xml_parser.xml" />
-<!--    <tool file="sr_mapping/lastz_wrapper.xml" />
-    <tool file="sr_mapping/lastz_paired_reads_wrapper.xml" />
-    <tool file="sr_mapping/bfast_wrapper.xml" />
-    <tool file="sr_mapping/PerM.xml" />
-    <tool file="sr_mapping/srma_wrapper.xml" />
-    <tool file="sr_mapping/mosaik.xml"/> -->
   </section>
 
-  <section name="NGS: Mapping QC" id="cov_qc">
+  <section name="Kent tools" id="kent_tools">
+    <tool file="kent_tools/bedItemOverlapCount.xml" />
+    <tool file="kent_tools/bedIntersect.xml" />
+  </section>
+
+  <section name="BEDTools" id="bedtools">
+    <tool file="bedtools/intersectBed_bed.xml" />
+  </section>
+
+  <section name="Coverage QC" id="cov_qc">
     <tool file="coverage/findLowCovPositions.xml" />
     <tool file="coverage/summarizeLowCovAreas.xml" />
     <tool file="coverage/coverageStats.xml" />
   </section>
 
+  <section name="Annotate Variants" id="sseq">
+    <tool file="annotate_variants/formatSNPs.xml" />
+    <tool file="annotate_variants/indelFormat.xml" />
+    <tool file="annotate_variants/submit_to_SS.xml" />
+    <tool file="annotate_variants/seattleSNPparser.xml" />
+    <tool file="annotate_variants/snp_Annotated2xmlV3.xml" />
+  </section>
+
+  <section name="Atlas2" id="Atlas2">
+    <tool file="atlas2/Atlas-Indel2.xml"/>
+    <tool file="atlas2/Atlas-SNP2.xml"/>
+    <tool file="atlas2/SOLiD-SNP-caller.xml"/>
+    <tool file="atlas2/vcfPrinter.xml"/>
+  </section>
+  <section name="Polymutt" id="Polymutt">
+    <tool file="polymutt/polymutt.xml"/>
+  </section>
+
+  <section name="Proteomics" id="proteomics">
+    <tool file="proteonics/validator.xml"/>
+  </section>
+
+  <section name="SNAP" id="SNAP">
+    <tool file="snap/snap-index.xml"/>
+    <tool file="snap/snap-alignment.xml"/>
+  </section>
+
+  <section name="FreeBayes" id="FreeBayes">
+    <tool file="freebayes/freebayes.xml"/>
+    <tool file="freebayes/freebayes_DirectoryInput.xml"/>
+  </section>
+
+  <section name="Groovy" id="Groovy">
+    <tool file="groovy/groovy.xml"/>
+  </section>
+
   <section name="NGS: RNA Analysis" id="ngs-rna-tools">
-    <label text="Transcriptome Alignment" id="rna_seq_alignment" />
+    <label text="RNA-seq" id="rna_seq" />
     <tool file="ngs_rna/tophat_wrapper.xml" />
+    <tool file="ngs_rna/tophat_wrapper_condor.xml" />
     <tool file="ngs_rna/tophat_color_wrapper.xml" />
-    <label text="Cufflinks Package " id="rna_seq_tools" />
     <tool file="ngs_rna/cufflinks_wrapper.xml" />
     <tool file="ngs_rna/cuffcompare_wrapper.xml" />
     <tool file="ngs_rna/cuffmerge_wrapper.xml" />
     <tool file="ngs_rna/cuffdiff_wrapper.xml" />
-    <label text="MISO" id="miso"/>
+    
+    <label text="Filtering" id="filtering" />
+    <tool file="ngs_rna/filter_transcripts_via_tracking.xml" />
+
+    <tool file="ngs_rna/cummerbund_wrapper.xml" />
+
+  </section>
+
+  <section name="Miso" id="Miso">
     <tool file="miso/miso_index_GFF.xml"/>
     <tool file="miso/miso_compute_genes_psi.xml"/>
     <tool file="miso/miso_compute_events_psi.xml"/>
     <tool file="miso/miso_summarize_samples.xml"/>
     <tool file="miso/miso_compare_samples.xml"/>
-    <!-- Trinity is very memory-intensive and should only be enabled/run
-    on instances with sufficient resources. 
-    <label text="De novo Assembly" id="de_novo_assembly "/>
-    <tool file="ngs_rna/trinity_all.xml" />
-    -->
-    <label text="Filtering" id="filtering" />
-    <tool file="ngs_rna/filter_transcripts_via_tracking.xml" />
-    <label text="Visualization" id="visualization" />
-    <tool file="ngs_rna/cummerbund_wrapper.xml" />
   </section>
 
-  <section name="NGS: Peak Calling" id="peak_calling">
-    <tool file="peak_calling/macs_wrapper.xml" />
-    <tool file="peak_calling/sicer_wrapper.xml" />
-    <tool file="peak_calling/ccat_wrapper.xml" />
-    <tool file="genetrack/genetrack_indexer.xml" />
-    <tool file="genetrack/genetrack_peak_prediction.xml" />
+
+  <section name="NCBO services" id="NCBO_services">
+    <tool file="NCBO_services/get_ontology.xml"/>
+    <tool file="NCBO_services/extract.xml"/>
+    <tool file="NCBO_services/get_ontology_view.xml"/>
+    <tool file="NCBO_services/ncbo_annotator.xml"/>
+    <tool file="NCBO_services/ncbo_recommender.xml"/>
+    <tool file="NCBO_services/ncbo_search.xml"/>
+    <tool file="NCBO_services/ncbo_resourceIndex.xml"/>
   </section>
 
-  <section name="NGS: SAM Tools" id="samtools">
-    <tool file="samtools/sam_bitwise_flag_filter.xml" />
-    <tool file="samtools/sam2interval.xml" />
-    <tool file="samtools/sam_to_bam.xml" />
-    <tool file="samtools/bam_to_sam.xml" />
-    <tool file="samtools/sam_merge.xml" />
-    <tool file="samtools/samtools_mpileup.xml" />
-    <tool file="samtools/sam_pileup.xml" />
-    <tool file="samtools/pileup_parser.xml" />
-    <tool file="samtools/pileup_interval.xml" />
-    <tool file="samtools/samtools_flagstat.xml" />
-    <tool file="samtools/samtools_rmdup.xml" />
-    <tool file="samtools/samtools_slice_bam.xml" />
-    <tool file="samtools/samtools_sort.xml" />
-    <tool file="samtools/samtools_varfilter.xml" />
-    <tool file="samtools/samtools_index.xml" />
-  </section>
-
-  <section name="NGS: BAM Tools" id="bamtools">
-    <tool file="bamtools/splitChromosome.xml" />
-  </section>
 
   <section name="NGS: Picard" id="picard">
     <label text="Conversion" id="picard_conversion"/>
     <tool file="picard/picard_CleanSam.xml" />
   </section>
 
-  <section name="NGS: Indel Analysis" id="indel_analysis">
-    <tool file="indels/sam_indel_filter.xml" />
-    <tool file="indels/indel_sam2interval.xml" />
-    <tool file="indels/indel_table.xml" />
-    <tool file="indels/indel_analysis.xml" />
+  <section name="NGS: Picard via Condor" id="picard_via_condor">
+    <label text="Conversion" id="picard_conversion"/>
+    <tool file="picard-condor/condor_picard_FastqToSam.xml" />
+    <tool file="picard-condor/condor_picard_SamToFastq.xml" />
+    
+    <label text="QC/Metrics for sam/bam" id="qcsambam"/>
+    <tool file="picard-condor/condor_picard_BamIndexStats.xml" />
+    <tool file="picard-condor/condor_rgPicardASMetrics.xml" />
+    <tool file="picard-condor/condor_rgPicardGCBiasMetrics.xml" />
+    <tool file="picard-condor/condor_rgPicardLibComplexity.xml" />
+    <tool file="picard-condor/condor_rgPicardInsertSize.xml" />
+    <tool file="picard-condor/condor_rgPicardHsMetrics.xml" />
+    
+    <label text="bam/sam Cleaning" id="picard-clean" />
+    <tool file="picard-condor/condor_picard_AddOrReplaceReadGroups.xml" />
+    <tool file="picard-condor/condor_picard_ReorderSam.xml" />
+    <tool file="picard-condor/condor_picard_ReplaceSamHeader.xml" />
+    <tool file="picard-condor/condor_rgPicardFixMate.xml" />
+    <tool file="picard-condor/condor_rgPicardMarkDups.xml" />
+    <tool file="picard-condor/condor_picard_SamFormatConverter.xml" />
+
+    <tool file="picard-condor/condor_picard_BuildBamIndex.xml" />
+    <tool file="picard-condor/condor_picard_SortSam.xml" />
+    <tool file="picard-condor/condor_picard_CleanSam.xml" />
+
   </section>
-
+  
   <section name="NGS: GATK Tools" id="gatk">
     <label text="Alignment Utilities" id="gatk_bam_utilities"/>
     <tool file="gatk/depth_of_coverage.xml" />
     <tool file="gatk/variant_combine.xml" />
   </section>
 
-  <section name="NGS: Variant Detection" id="variant_detection">
-    <label text="Atlas2" id="atlas2"/>
-    <tool file="atlas2/Atlas-Indel2.xml"/>
-    <tool file="atlas2/Atlas-SNP2.xml"/>
-    <tool file="atlas2/SOLiD-SNP-caller.xml"/>
-    <tool file="atlas2/vcfPrinter.xml"/>
-
-    <label text="FreeBayes" id="freeBayes"/>
-    <tool file="freebayes/freebayes.xml"/>
-    <!-- <tool file="variant_detection/freebayes.xml" /> -->
-    <tool file="freebayes/freebayes_DirectoryInput.xml"/>
-
-    <label text="Polymutt" id="polymutt"/>
-    <tool file="polymutt/polymutt.xml"/>
+  <section name="NGS: GATK Tools via Condor" id="gatk_via_condor">
+    <label text="Alignment Utilities" id="gatk_bam_utilities"/>
+    <tool file="gatk-condor/condor_depth_of_coverage.xml" />
+    <tool file="gatk-condor/condor_print_reads.xml" />
+    
+    <label text="Realignment" id="gatk_realignment" />
+    <tool file="gatk-condor/condor_realigner_target_creator.xml" />
+    <tool file="gatk-condor/condor_indel_realigner.xml" />
+    
+    <label text="Base Recalibration" id="gatk_recalibration" />
+    <tool file="gatk-condor/condor_count_covariates.xml" />
+    <tool file="gatk-condor/condor_table_recalibration.xml" />
+    <tool file="gatk-condor/condor_analyze_covariates.xml" />
+    
+    <label text="Genotyping" id="gatk_genotyping" />
+    <tool file="gatk-condor/condor_unified_genotyper.xml" />
+    
+    <label text="Annotation" id="gatk_annotation" />
+    <tool file="gatk-condor/condor_variant_annotator.xml" />
+    
+    <label text="Filtration" id="gatk_filtration" />
+    <tool file="gatk-condor/condor_variant_filtration.xml" />
+    <tool file="gatk-condor/condor_variant_select.xml" />
+    
+    <label text="Variant Quality Score Recalibration" id="gatk_variant_quality_score_recalibration" />
+    <tool file="gatk-condor/condor_variant_recalibrator.xml" />
+    <tool file="gatk-condor/condor_variant_apply_recalibration.xml" />
+    
+    <label text="Variant Utilities" id="gatk_variant_utilities"/>
+    <tool file="gatk-condor/condor_variants_validate.xml" />
+    <tool file="gatk-condor/condor_variant_eval.xml" />
+    <tool file="gatk-condor/condor_variant_combine.xml" />
   </section>
 
-  <section name="NGS: Interval Tools" id="interval_tools">
-    <!-- <tool file="kent_tools/bedItemOverlapCount.xml" />
-    <tool file="kent_tools/bedIntersect.xml" /> -->
-    <label text="BEDTools" id="bedtools"/>
-    <tool file="bedtools/intersectBed_bed.xml" />
-  </section>
 
-  <section name="NGS: VCF Tools" id="vcf_tools">
-    <label text="Formatting" id="vcf_formatting" /> 
-    <tool file="variant_detection/pileup2vcf.xml" />
-
-    <label text="Filtering" id="vcf_filtering" /> 
-    <tool file="vcf_tools/intersect.xml" />
-    <tool file="vcf_tools/extract.xml" />
-    <tool file="vcf_tools/filter.xml" />
-    <tool file="variant_detection/filterVarByQual.xml" />
-    <tool file="variant_detection/filterVarByDepth.xml" />
-
-    <label text="Annotation" id="vcf_annotation" /> 
-    <tool file="vcf_tools/annotate.xml" />
-    <tool file="annotate_variants/formatSNPs.xml" />
-    <tool file="annotate_variants/indelFormat.xml" />
-    <tool file="annotate_variants/submit_to_SS.xml" />
-    <tool file="annotate_variants/seattleSNPparser.xml" />
-    <tool file="annotate_variants/snp_Annotated2xmlV3.xml" />
-    <tool file="seattleseq/seattleseq.xml"/>
-  </section>
-
-  <section name="NGS: CGA Tools" id="CGA_tools">
+  <section name="CGA Tools" id="CGA_tools">
    <tool file="cga_tools/cgatools_map2sam.xml" />
    <tool file="cga_tools/cgatools_map2bam.xml" />
    <tool file="globus/create_cga_dataset.xml" />
    <tool file="globus/cga_demuxer.xml" />
    <tool file="globus/map2sam_condor_run.xml"/>
   </section>
-
-  <section name="NGS: Simulation" id="ngs-simulation">
-    <tool file="ngs_simulation/ngs_simulation.xml" />
+  <section name="BLAST Parser and Filtering" id="blast_parser_and_filtering">
+   <tool file="myTools/filter_blast_results.xml" />
   </section>
-  <section name="SNP/WGA: Data; Filters" id="rgdat">
-    
-    <!-- <label text="Data: Import and upload" id="rgimport" /> 
-    <tool file="data_source/upload.xml"/>
-    <tool file="data_source/access_libraries.xml" /> -->
-    
-    <label text="Data: Filter and Clean" id="rgfilter" />
-    <tool file="rgenetics/rgClean.xml"/>
-    <tool file="rgenetics/rgPedSub.xml"/>
-    <tool file="rgenetics/rgLDIndep.xml"/>
-    
-    <label text="Simulate" id="rgsim" />
-    <tool file="rgenetics/rgfakePhe.xml"/>
-    <tool file="rgenetics/rgfakePed.xml"/>
-  </section>
-  <section name="SNP/WGA: QC; LD; Plots" id="rgqcplot">
-    
-    <label text="QC; Eigenstrat" id="rgvisual" />
-    <tool file="rgenetics/rgQC.xml"/>
-    <tool file="rgenetics/rgEigPCA.xml"/>
-    
-    <label text="LD; Manhattan/QQ; GRR" id="rgld" />
-    <tool file="rgenetics/rgHaploView.xml"/>
-    <tool file="rgenetics/rgManQQ.xml"/>
-    <tool file="rgenetics/rgGRR.xml"/>
-  </section>
-  <section name="SNP/WGA: Statistical Models" id="rgmodel">
-    <tool file="rgenetics/rgCaCo.xml"/>
-    <tool file="rgenetics/rgTDT.xml"/>
-    <tool file="rgenetics/rgGLM.xml"/>
-    <tool file="rgenetics/rgManQQ.xml"/>
+  <section name="NGS: BAM Tools" id="bamtools">
+   <tool file="bamtools/splitChromosome.xml" />
   </section>
 
-  <section name="Phenotype Association" id="hgv">
-    <tool file="evolution/codingSnps.xml" />
-    <tool file="evolution/add_scores.xml" />
-    <tool file="phenotype_association/sift.xml" />
-    <tool file="phenotype_association/linkToGProfile.xml" />
-    <tool file="phenotype_association/linkToDavid.xml"/>
-    <tool file="phenotype_association/ctd.xml" />
-    <tool file="phenotype_association/funDo.xml" />
-    <tool file="phenotype_association/snpFreq.xml" />
-    <tool file="phenotype_association/ldtools.xml" />
-    <tool file="phenotype_association/pass.xml" />
-    <tool file="phenotype_association/gpass.xml" />
-    <tool file="phenotype_association/beam.xml" />
-    <tool file="phenotype_association/lps.xml" />
-    <tool file="phenotype_association/hilbertvis.xml" />
-    <tool file="phenotype_association/freebayes.xml" />
-    <tool file="phenotype_association/master2pg.xml" />
-    <tool file="phenotype_association/vcf2pgSnp.xml" />
-    <tool file="phenotype_association/dividePgSnpAlleles.xml" />
+  <label text="Default Galaxy TOOLBOX" id="default_galaxy_toolbox" />
+
+
+
+  <section name="Get Data" id="getext">
+    <tool file="data_source/upload.xml"/>
+    <tool file="data_source/ucsc_tablebrowser.xml" />
+    <tool file="data_source/ucsc_tablebrowser_test.xml" />
+    <tool file="data_source/ucsc_tablebrowser_archaea.xml" />
+    <tool file="data_source/bx_browser.xml" />
+    <tool file="data_source/ebi_sra.xml"/>
+    <tool file="data_source/microbial_import.xml" />
+    <tool file="data_source/biomart.xml" />
+    <tool file="data_source/biomart_test.xml" />
+    <tool file="data_source/cbi_rice_mart.xml" />
+    <tool file="data_source/gramene_mart.xml" />
+    <tool file="data_source/fly_modencode.xml" />
+    <tool file="data_source/flymine.xml" />
+    <tool file="data_source/flymine_test.xml" />
+    <tool file="data_source/modmine.xml" />
+    <tool file="data_source/ratmine.xml" />
+    <tool file="data_source/yeastmine.xml" />
+    <tool file="data_source/metabolicmine.xml" />
+    <tool file="data_source/worm_modencode.xml" />
+    <tool file="data_source/wormbase.xml" />
+    <tool file="data_source/wormbase_test.xml" />
+    <tool file="data_source/eupathdb.xml" />
+    <tool file="data_source/encode_db.xml" />
+    <tool file="data_source/epigraph_import.xml" />
+    <tool file="data_source/epigraph_import_test.xml" />
+    <tool file="data_source/hbvar.xml" />
+    <tool file="data_source/genomespace_file_browser_prod.xml" />
+
+    <tool file="validation/fix_errors.xml" />
   </section>
-
-
-
-
-<!--
-  <section name="Proteomics" id="proteomics">
-    <tool file="proteonics/validator.xml"/>
+  <section name="Send Data" id="send">
+    <tool file="data_destination/epigraph.xml" />
+    <tool file="data_destination/epigraph_test.xml" />
   </section>
-
-  <section name="Groovy" id="Groovy">
-    <tool file="groovy/groovy.xml"/>
-  </section>
--->
-
-
-  
-<!--  <label text="Default Galaxy TOOLBOX" id="default_galaxy_toolbox" /> -->
-
-
-  <!-- Standard galaxy tools below: -->
-  <label text="Data Manipulation" id="data_manipulation" />
   <section name="ENCODE Tools" id="EncodeTools">
     <tool file="encode/gencode_partition.xml" />
     <tool file="encode/random_intervals.xml" />
     <tool file="new_operations/flanking_features.xml" />
     <tool file="annotation_profiler/annotation_profiler.xml" />
   </section>
-
-  <label text="Statistical Tools" id="statistical_tools" />
   <section name="Statistics" id="stats">
     <tool file="stats/gsummary.xml" />
     <tool file="filters/uniq.xml" />
   </section>
   <section name="Wavelet Analysis" id="dwt">
     <tool file="discreteWavelet/execute_dwt_var_perFeature.xml" />
-    <!--
-    Keep this section/tools commented until all of the tools have functional tests
-    <tool file="discreteWavelet/execute_dwt_IvC_all.xml" />
-    <tool file="discreteWavelet/execute_dwt_cor_aVa_perClass.xml" />
-    <tool file="discreteWavelet/execute_dwt_cor_aVb_all.xml" />
-    <tool file="discreteWavelet/execute_dwt_var_perClass.xml" />
-    -->
   </section>
   <section name="Graph/Display Data" id="plots">
     <tool file="plotting/histogram2.xml" />
     <tool file="regVariation/compute_motif_frequencies_for_all_motifs.xml" />
     <tool file="regVariation/categorize_elements_satisfying_criteria.xml" />s
     <tool file="regVariation/draw_stacked_barplots.xml" />
-    <!-- <tool file="regVariation/multispecies_MicrosatDataGenerator_interrupted_GALAXY.xml" />
-    <tool file="regVariation/microsatellite_birthdeath.xml" /> -->
   </section>
   <section name="Multiple regression" id="multReg">
     <tool file="regVariation/linear_regression.xml" />
     <tool file="multivariate_stats/kpca.xml" />
     <tool file="multivariate_stats/kcca.xml" />
   </section>
-  
-  <label text="Fasta Tools" id="fasta_tools" />
   <section name="Evolution" id="hyphy">
     <tool file="hyphy/hyphy_branch_lengths_wrapper.xml" />
     <tool file="hyphy/hyphy_nj_tree_wrapper.xml" />
     <tool file="ncbi_blast_plus/ncbi_tblastn_wrapper.xml" />
     <tool file="ncbi_blast_plus/ncbi_tblastx_wrapper.xml" />
     <tool file="ncbi_blast_plus/blastxml_to_tabular.xml" />
-    <tool file="globus/condor_blastp_wrapper.xml" />
-    <tool file="myTools/filter_blast_results.xml" />
   </section>
-  <section name="Ontology services" id="ontology_services">
-    <label text="NCBO Services" id="ncbo" />
-    <tool file="NCBO_services/get_ontology.xml"/>
-    <tool file="NCBO_services/extract.xml"/>
-    <tool file="NCBO_services/get_ontology_view.xml"/>
-    <tool file="NCBO_services/ncbo_annotator.xml"/>
-    <tool file="NCBO_services/ncbo_recommender.xml"/>
-    <tool file="NCBO_services/ncbo_search.xml"/>
-    <tool file="NCBO_services/ncbo_resourceIndex.xml"/>
+  <section name="NGS: QC and manipulation" id="NGS_QC">
+    
+    <label text="FastQC: fastq/sam/bam" id="fastqcsambam" />
+    <tool file="rgenetics/rgFastQC.xml" />
+    
+    <label text="Illumina fastq" id="illumina" />
+    <tool file="fastq/fastq_groomer.xml" />
+    <tool file="fastq/fastq_paired_end_splitter.xml" />
+    <tool file="fastq/fastq_paired_end_joiner.xml" />
+    <tool file="fastq/fastq_stats.xml" />
+    
+    <label text="Roche-454 data" id="454" />
+    <tool file="metag_tools/short_reads_figure_score.xml" />
+    <tool file="metag_tools/short_reads_trim_seq.xml" />
+    <tool file="fastq/fastq_combiner.xml" />
+    
+    <label text="AB-SOLiD data" id="solid" />
+    <tool file="next_gen_conversion/solid2fastq.xml" />
+    <tool file="solid_tools/solid_qual_stats.xml" />
+    <tool file="solid_tools/solid_qual_boxplot.xml" />
+    
+    <label text="Generic FASTQ manipulation" id="generic_fastq" />
+    <tool file="fastq/fastq_filter.xml" />
+    <tool file="fastq/fastq_trimmer.xml" />
+    <tool file="fastq/fastq_trimmer_by_quality.xml" />
+    <tool file="fastq/fastq_masker_by_quality.xml" />
+    <tool file="fastq/fastq_paired_end_interlacer.xml" />
+    <tool file="fastq/fastq_paired_end_deinterlacer.xml" />
+    <tool file="fastq/fastq_manipulation.xml" />
+    <tool file="fastq/fastq_to_fasta.xml" />
+    <tool file="fastq/fastq_to_tabular.xml" />
+    <tool file="fastq/tabular_to_fastq.xml" />
+    
+    <label text="FASTX-Toolkit for FASTQ data" id="fastx_toolkit" />
+    <tool file="fastx_toolkit/fastq_quality_converter.xml" />
+    <tool file="fastx_toolkit/fastx_quality_statistics.xml" />
+    <tool file="fastx_toolkit/fastq_quality_boxplot.xml" />
+    <tool file="fastx_toolkit/fastx_nucleotides_distribution.xml" />
+    <tool file="fastx_toolkit/fastq_to_fasta.xml" />
+    <tool file="fastx_toolkit/fastq_quality_filter.xml" />
+    <tool file="fastx_toolkit/fastq_to_fasta.xml" />
+    <tool file="fastx_toolkit/fastx_artifacts_filter.xml" />
+    <tool file="fastx_toolkit/fastx_barcode_splitter.xml" />
+    <tool file="fastx_toolkit/fastx_clipper.xml" />
+    <tool file="fastx_toolkit/fastx_collapser.xml" />
+    <tool file="fastx_toolkit/fastx_renamer.xml" />
+    <tool file="fastx_toolkit/fastx_reverse_complement.xml" />
+    <tool file="fastx_toolkit/fastx_trimmer.xml" />
   </section>
 
-  
+  <section name="NGS: Mapping" id="solexa_tools">
+    <tool file="sr_mapping/lastz_wrapper.xml" />
+    <tool file="sr_mapping/lastz_paired_reads_wrapper.xml" />
+    <tool file="sr_mapping/bowtie_wrapper.xml" />
+    <tool file="sr_mapping/bowtie_color_wrapper.xml" />
+    <tool file="sr_mapping/bwa_wrapper.xml" />
+    <tool file="sr_mapping/bwa_wrapper_condor.xml" />
+    <tool file="sr_mapping/bwa_color_wrapper.xml" />
+    <tool file="sr_mapping/bfast_wrapper.xml" />
+    <tool file="metag_tools/megablast_wrapper.xml" />
+    <tool file="metag_tools/megablast_xml_parser.xml" />
+    <tool file="sr_mapping/PerM.xml" />
+    <tool file="sr_mapping/srma_wrapper.xml" />
+    <tool file="sr_mapping/mosaik.xml"/>
+  </section>
+  <section name="NGS: Indel Analysis" id="indel_analysis">
+    <tool file="indels/sam_indel_filter.xml" />
+    <tool file="indels/indel_sam2interval.xml" />
+    <tool file="indels/indel_table.xml" />
+    <tool file="indels/indel_analysis.xml" />
+  </section>
+
+  <section name="NGS: SAM Tools" id="samtools">
+    <tool file="samtools/sam_bitwise_flag_filter.xml" />
+    <tool file="samtools/sam2interval.xml" />
+    <tool file="samtools/sam_to_bam.xml" />
+    <tool file="samtools/bam_to_sam.xml" />
+    <tool file="samtools/sam_merge.xml" />
+    <tool file="samtools/samtools_mpileup.xml" />
+    <tool file="samtools/sam_pileup.xml" />
+    <tool file="samtools/pileup_parser.xml" />
+    <tool file="samtools/pileup_interval.xml" />
+    <tool file="samtools/samtools_flagstat.xml" />
+    <tool file="samtools/samtools_rmdup.xml" />
+   <tool file="samtools/samtools_slice_bam.xml" />
+   <tool file="samtools/samtools_sort.xml" />
+    <tool file="samtools/samtools_varfilter.xml" />
+    <tool file="samtools/samtools_index.xml" />
+  </section>
+
+  <section name="NGS: Variant Detection" id="variant_detection">
+    <tool file="variant_detection/freebayes.xml" />
+    <tool file="variant_detection/pileup2vcf.xml" />
+    <tool file="variant_detection/filterVarByQual.xml" />
+    <tool file="variant_detection/filterVarByDepth.xml" />
+  </section>
+
+  <section name="NGS: Peak Calling" id="peak_calling">
+    <tool file="peak_calling/macs_wrapper.xml" />
+    <tool file="peak_calling/sicer_wrapper.xml" />
+    <tool file="peak_calling/ccat_wrapper.xml" />
+    <tool file="genetrack/genetrack_indexer.xml" />
+    <tool file="genetrack/genetrack_peak_prediction.xml" />
+  </section>
+  <section name="NGS: Simulation" id="ngs-simulation">
+    <tool file="ngs_simulation/ngs_simulation.xml" />
+  </section>
+  <section name="SNP/WGA: Data; Filters" id="rgdat">
+    
+    <label text="Data: Import and upload" id="rgimport" />
+    <tool file="data_source/upload.xml"/>
+    <tool file="data_source/access_libraries.xml" />
+    
+    <label text="Data: Filter and Clean" id="rgfilter" />
+    <tool file="rgenetics/rgClean.xml"/>
+    <tool file="rgenetics/rgPedSub.xml"/>
+    <tool file="rgenetics/rgLDIndep.xml"/>
+    
+    <label text="Simulate" id="rgsim" />
+    <tool file="rgenetics/rgfakePhe.xml"/>
+    <tool file="rgenetics/rgfakePed.xml"/>
+  </section>
+  <section name="SNP/WGA: QC; LD; Plots" id="rgqcplot">
+    
+    <label text="QC; Eigenstrat" id="rgvisual" />
+    <tool file="rgenetics/rgQC.xml"/>
+    <tool file="rgenetics/rgEigPCA.xml"/>
+    
+    <label text="LD; Manhattan/QQ; GRR" id="rgld" />
+    <tool file="rgenetics/rgHaploView.xml"/>
+    <tool file="rgenetics/rgManQQ.xml"/>
+    <tool file="rgenetics/rgGRR.xml"/>
+  </section>
+  <section name="SNP/WGA: Statistical Models" id="rgmodel">
+    <tool file="rgenetics/rgCaCo.xml"/>
+    <tool file="rgenetics/rgTDT.xml"/>
+    <tool file="rgenetics/rgGLM.xml"/>
+    <tool file="rgenetics/rgManQQ.xml"/>
+  </section>
+
+  <section name="Phenotype Association" id="hgv">
+    <tool file="evolution/codingSnps.xml" />
+    <tool file="evolution/add_scores.xml" />
+    <tool file="phenotype_association/sift.xml" />
+    <tool file="phenotype_association/linkToGProfile.xml" />
+    <tool file="phenotype_association/linkToDavid.xml"/>
+    <tool file="phenotype_association/ctd.xml" />
+    <tool file="phenotype_association/funDo.xml" />
+    <tool file="phenotype_association/snpFreq.xml" />
+    <tool file="phenotype_association/ldtools.xml" />
+    <tool file="phenotype_association/pass.xml" />
+    <tool file="phenotype_association/gpass.xml" />
+    <tool file="phenotype_association/beam.xml" />
+    <tool file="phenotype_association/lps.xml" />
+    <tool file="phenotype_association/hilbertvis.xml" />
+    <tool file="phenotype_association/freebayes.xml" />
+    <tool file="phenotype_association/master2pg.xml" />
+    <tool file="phenotype_association/vcf2pgSnp.xml" />
+    <tool file="phenotype_association/dividePgSnpAlleles.xml" />
+  </section>
+
+  <section name="VCF Tools" id="vcf_tools">
+    <tool file="vcf_tools/intersect.xml" />
+    <tool file="vcf_tools/annotate.xml" />
+    <tool file="vcf_tools/filter.xml" />
+    <tool file="vcf_tools/extract.xml" />
+  </section>
+
+  <label text="New features" id="ges" />
+
   <section name="Tool Parameters" id="tool_parameters">
     <tool file="tool_parameters/datetime1.xml"/>
   </section>
+-->
 </toolbox>

File universe_wsgi.ini

 # instead.  This string takes many options which are explained in detail in the
 # config file documentation.
 #database_connection = sqlite:///./database/universe.sqlite?isolation_level=IMMEDIATE
+database_connection = postgres:///postgres?user=joe&host=/var/run/postgresql
 
 
 # If the server logs errors about not having enough database pool connections,
 # to remain on disk after the job is complete.  Debug mode is disabled if
 # commented, but is uncommented by default in the sample config.
 #debug = True
-debug = False
+debug = True
 
 # Check for WSGI compliance.
 #use_lint = False
 # Apache).  The upstream proxy should set a REMOTE_USER header in the request.
 # Enabling remote user disables regular logins.  For more information, see:
 # http://wiki.g2.bx.psu.edu/Admin/Config/Apache%20Proxy
-#use_remote_user = False
+use_remote_user = True
 
 # If use_remote_user is enabled and your external authentication
 # method just returns bare usernames, set a default mail domain to be appended
 # to usernames, to become your Galaxy usernames (email addresses).
-#remote_user_maildomain = None
+remote_user_maildomain = globusonline.org
 
 # If use_remote_user is enabled, you can set this to a URL that will log your
 # users out.
 # are going to be available to select on each kind of field (src==Source, dst=Destination),
 # both are a comma separated list of endpoints.
 # The space between endpoint and commas are ignored.
-globus_fixed_endpoints = True
+globus_fixed_endpoints = False 
 globus_src_endpoints = 'go#ep1, go#ep2, galaxy#testcondor'
 globus_dst_endpoints = 'go#ep1, go#ep2, galaxy#testcondor'
+# Path to the gtouch executable.
+globus_gtouch =  gtouch
+# Specify an static list of files to display on the "Get Data via Globus..." tool.
+# this is JSON with the format:
+# {ENDPOINT: [{DIRECTORY: [FILE1, FILE2, FILE3, FILE4,...]}],...}
+globus_fixed_files = {"sulakhe#SequencingCenter": [{"CHiP-seq-sample-data": ["CHiP-seq-HAIB_T47D_FoxA1_chr19.fastqsanger", "UCSC-hg19_refGene"], 
+                                                    "RNA-seq-sample-data": ["iGenomes_UCSC_hg19_chr19_gene_annotation.gtf", 
+					                                    "rna-seq-adrenal_1.fastq.fastqsanger",
+								            "rna-seq-adrenal_2.fastq.fastqsanger",
+								            "rna-seq-brain_1.fastq.fastqsanger",
+								            "rna-seq-brain_2.fastq.fastqsanger"],
+     					            "Exome-seq-sample-data": ["Exome-Sample_Forward_1.fastq.gz", "Exome-Sample_Reverse_2.fastq.gz"]}]}
+globus_nexus_client = galaxytest
+#globus_nexus_secret = 
 
 # this value changes how the user_ftp_dir is determined:
 #  - normally it is set by doing os.path.join(ftp_upload_dir, user.email)