galaxy-commits
Threads by month
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- 15302 discussions
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/1c196b8747e4/
changeset: 1c196b8747e4
user: dan
date: 2012-05-04 21:35:51
summary: Rewrite HbVar datasource tool.
affected #: 1 file
diff -r dd777fbcc5fa1fee5939db5d914611b8b466eed6 -r 1c196b8747e4d976cbc1d294457b64a7e27fb26c tools/data_source/hbvar.xml
--- a/tools/data_source/hbvar.xml
+++ b/tools/data_source/hbvar.xml
@@ -1,22 +1,18 @@
<?xml version="1.0"?>
-<tool name="HbVar" id="hbvar">
+<tool name="HbVar" id="hbvar" tool_type="data_source" version="2.0.0"><description>Human Hemoglobin Variants and Thalassemias</description>
- <command/>
+ <command interpreter="python">data_source.py $output $__app__.config.output_size_limit</command><inputs action="http://globin.bx.psu.edu/cgi-bin/hbvar/query_vars3" check_values="false" method="get" target="_top"><display>go to HbVar database $GALAXY_URL $tool_id</display>
- <param name="GALAXY_URL" type="baseurl" value="/tool_runner/hbvar" />
- <param name="tool_id" type="hidden" value = "hbvar"/></inputs><uihints minwidth="800"/>
- <code file="hbvar_filter.py"/>
-
<outputs>
- <data name="output" format="txt" />
+ <data name="output" format="auto" /></outputs><options sanitize="False" refresh="True"/>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: dan: Update GenomeSpace exporter tool to use the newly introduced /personaldirectory as the root for auto-generated export paths.
by Bitbucket 04 May '12
by Bitbucket 04 May '12
04 May '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/dd777fbcc5fa/
changeset: dd777fbcc5fa
user: dan
date: 2012-05-04 20:31:22
summary: Update GenomeSpace exporter tool to use the newly introduced /personaldirectory as the root for auto-generated export paths.
affected #: 2 files
diff -r 1eb32dbab2c1a0bc308eb4d3a069fa55ff6ecb83 -r dd777fbcc5fa1fee5939db5d914611b8b466eed6 tools/genomespace/genomespace_exporter.py
--- a/tools/genomespace/genomespace_exporter.py
+++ b/tools/genomespace/genomespace_exporter.py
@@ -50,6 +50,7 @@
def get_directory( url_opener, dm_url, path ):
url = dm_url
i = None
+ dir_dict = {}
for i, sub_path in enumerate( path ):
url = "%s/%s" % ( url, sub_path )
dir_request = urllib2.Request( url, headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } )
@@ -57,7 +58,7 @@
try:
dir_dict = simplejson.loads( url_opener.open( dir_request ).read() )
except urllib2.HTTPError, e:
- #print "e", e, url #punting, assuming lack of permisions at this low of a level...
+ #print "e", e, url #punting, assuming lack of permissions at this low of a level...
continue
break
if i is not None:
@@ -69,6 +70,9 @@
def get_default_directory( url_opener, dm_url ):
return get_directory( url_opener, dm_url, ["defaultdirectory"] )[0]
+def get_personal_directory( url_opener, dm_url ):
+ return get_directory( url_opener, dm_url, [ "%s/personaldirectory" % ( GENOMESPACE_API_VERSION_STRING ) ] )[0]
+
def create_directory( url_opener, directory_dict, new_dir, dm_url ):
payload = { "isDirectory": True }
for dir_slice in new_dir:
@@ -134,7 +138,9 @@
genomespace_site_dict = get_genomespace_site_urls()[ genomespace_site ]
dm_url = genomespace_site_dict['dmServer']
#get default directory
- directory_dict = get_default_directory( url_opener, dm_url )['directory']
+ directory_dict = get_default_directory( url_opener, dm_url ).get( 'directory', None )
+ if directory_dict is None:
+ return []
#what directory to stuff this in
recurse_directory_dict( url_opener, rval, directory_dict.get( 'url' ) )
@@ -150,7 +156,7 @@
directory_dict, target_directory = get_directory( url_opener, dm_url, [ "%s/%s/%s" % ( GENOMESPACE_API_VERSION_STRING, 'file', target_directory[1] ) ] + target_directory[2:] )
directory_dict = directory_dict['directory']
else:
- directory_dict = get_default_directory( url_opener, dm_url )['directory']
+ directory_dict = get_personal_directory( url_opener, dm_url )['directory'] #this is the base for the auto-generated galaxy export directories
#what directory to stuff this in
target_directory_dict = create_directory( url_opener, directory_dict, target_directory, dm_url )
#get upload url
@@ -208,6 +214,6 @@
(options, args) = parser.parse_args()
- send_file_to_genomespace( options.genomespace_site, options.username, options.token, options.dataset, map( binascii.unhexlify, options.subdirectory ), options.filename, options.file_type, options.content_type, options.log )
+ send_file_to_genomespace( options.genomespace_site, options.username, options.token, options.dataset, map( binascii.unhexlify, options.subdirectory ), binascii.unhexlify( options.filename ), options.file_type, options.content_type, options.log )
diff -r 1eb32dbab2c1a0bc308eb4d3a069fa55ff6ecb83 -r dd777fbcc5fa1fee5939db5d914611b8b466eed6 tools/genomespace/genomespace_exporter.xml
--- a/tools/genomespace/genomespace_exporter.xml
+++ b/tools/genomespace/genomespace_exporter.xml
@@ -25,9 +25,9 @@
--subdirectory "${ binascii.hexlify( str( $base_url ).split( '://', 1 )[-1] ) }" ##Protocol removed by request
#end if
#if $filename:
- --filename "${filename}"
+ --filename "${ binascii.hexlify( str( $filename ) ) }"
#else:
- --filename "Galaxy History Item ${__app__.security.encode_id( $input1.id )} (${__app__.security.encode_id( $output_log.id )}) - ${input1.hid}: ${input1.name}.${input1.ext}"
+ --filename "${ binascii.hexlify( "Galaxy History Item %s (%s) - %s: %s.%s" % ( $__app__.security.encode_id( $input1.id ), $__app__.security.encode_id( $output_log.id ), $input1.hid, $input1.name, $input1.ext ) ) }"
#end if
--file_type "${input1.ext}"
--content_type "${input1.get_mime()}"
@@ -36,7 +36,6 @@
<inputs><param format="data" name="input1" type="data" label="Send this dataset to GenomeSpace" /><param name="base_url" type="baseurl" />
- <!-- <param name="subdirectory" type="text" size="80" help="Leave blank to generate automatically" /> --><param name="subdirectory" type="drill_down" display="radio" hierarchy="exact" multiple="False" label="Choose Target Directory" dynamic_options="galaxy_code_get_genomespace_folders( genomespace_site = 'prod', trans=__trans__, value=__value__, input_dataset=input1 )" help="Leave blank to generate automatically"/><param name="filename" type="text" size="80" help="Leave blank to generate automatically" /></inputs>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: greg: Clarify host string value in community_wsgi.ini.
by Bitbucket 03 May '12
by Bitbucket 03 May '12
03 May '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/1eb32dbab2c1/
changeset: 1eb32dbab2c1
user: greg
date: 2012-05-03 20:00:32
summary: Clarify host string value in community_wsgi.ini.
affected #: 1 file
diff -r ea9f3c25a41576216f3c328e3333ebdb55250ed1 -r 1eb32dbab2c1a0bc308eb4d3a069fa55ff6ecb83 community_wsgi.ini.sample
--- a/community_wsgi.ini.sample
+++ b/community_wsgi.ini.sample
@@ -4,7 +4,12 @@
use = egg:Paste#http
port = 9009
+
+# The address on which to listen. By default, only listen to localhost (the tool shed will not
+# be accessible over the network). Use '0.0.0.0' to listen on all available network interfaces.
+#host = 0.0.0.0
host = 127.0.0.1
+
use_threadpool = true
threadpool_workers = 10
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: greg: Enhance sample file handling for installed tool shed repositories to handle more than just .loc.sample files in the tool-data directory.
by Bitbucket 03 May '12
by Bitbucket 03 May '12
03 May '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/ea9f3c25a415/
changeset: ea9f3c25a415
user: greg
date: 2012-05-03 19:37:33
summary: Enhance sample file handling for installed tool shed repositories to handle more than just .loc.sample files in the tool-data directory.
affected #: 4 files
diff -r 71dfeecdd019554b5cccc047546ae26ed7b50afa -r ea9f3c25a41576216f3c328e3333ebdb55250ed1 lib/galaxy/tool_shed/install_manager.py
--- a/lib/galaxy/tool_shed/install_manager.py
+++ b/lib/galaxy/tool_shed/install_manager.py
@@ -156,9 +156,15 @@
# Handle missing data table entries for tool parameters that are dynamically generated select lists.
repository_tools_tups = handle_missing_data_table_entry( self.app, self.tool_path, sample_files, repository_tools_tups )
# Handle missing index files for tool parameters that are dynamically generated select lists.
- repository_tools_tups = handle_missing_index_file( self.app, self.tool_path, sample_files, repository_tools_tups )
- # Handle tools that use fabric scripts to install dependencies.
- handle_tool_dependencies( current_working_dir, relative_install_dir, repository_tools_tups )
+ repository_tools_tups, sample_files_copied = handle_missing_index_file( self.app, self.tool_path, sample_files, repository_tools_tups )
+ # Copy remaining sample files included in the repository to the ~/tool-data directory of the local Galaxy instance.
+ copy_sample_files( self.app, sample_files, sample_files_copied=sample_files_copied )
+ if 'tool_dependencies_config' in metadata_dict:
+ # Install tool dependencies.
+ status, message = handle_tool_dependencies( self.app, repository_clone_url, metadata_dict[ 'tool_dependencies_config' ] )
+ if status != 'ok' and message:
+ print 'The following error occurred while installing tool dependencies:'
+ print message
add_to_tool_panel( self.app,
repository_name,
repository_clone_url,
@@ -215,7 +221,7 @@
ctx_rev )
if 'tools' in metadata_dict:
# Get the tool_versions from the tool shed for each tool in the installed change set.
- url = '%s/repository/get_tool_versions?name=%s&owner=%s&changeset_revision=%s&webapp=galaxy' % \
+ url = '%s/repository/get_tool_versions?name=%s&owner=%s&changeset_revision=%s&webapp=galaxy&no_reset=true' % \
( tool_shed_url, tool_shed_repository.name, self.repository_owner, changeset_revision )
response = urllib2.urlopen( url )
text = response.read()
diff -r 71dfeecdd019554b5cccc047546ae26ed7b50afa -r ea9f3c25a41576216f3c328e3333ebdb55250ed1 lib/galaxy/util/shed_util.py
--- a/lib/galaxy/util/shed_util.py
+++ b/lib/galaxy/util/shed_util.py
@@ -1,4 +1,4 @@
-import os, tempfile, shutil, subprocess, logging, string, urllib2
+import sys, os, tempfile, shutil, subprocess, logging, string, urllib2
from datetime import date, datetime, timedelta
from time import strftime, gmtime
from galaxy import util
@@ -7,6 +7,9 @@
from galaxy.tools.search import ToolBoxSearch
from galaxy.model.orm import *
+from galaxy import eggs
+import pkg_resources
+
pkg_resources.require( 'mercurial' )
from mercurial import ui, commands
@@ -215,7 +218,6 @@
# The value of proprietary_path must be an absolute path due to job_working_directory.
elem.attrib[ 'proprietary_path' ] = os.path.abspath( relative_head )
elem.attrib[ 'proprietary_datatype_module' ] = proprietary_datatype_module
-
sniffers = datatypes_config_root.find( 'sniffers' )
else:
sniffers = None
@@ -270,8 +272,7 @@
return tool_shed_url.rstrip( '/' )
def clone_repository( repository_clone_url, repository_file_dir, ctx_rev ):
"""
- Clone the repository up to the specified changeset_revision. No subsequent revisions will be present
- in the cloned repository.
+ Clone the repository up to the specified changeset_revision. No subsequent revisions will be present in the cloned repository.
"""
commands.clone( get_configured_ui(),
repository_clone_url,
@@ -279,17 +280,28 @@
pull=True,
noupdate=False,
rev=[ ctx_rev ] )
-def copy_sample_loc_file( app, filename ):
- """Copy xxx.loc.sample to ~/tool-data/xxx.loc.sample and ~/tool-data/xxx.loc"""
- head, sample_loc_file = os.path.split( filename )
- loc_file = sample_loc_file.replace( '.sample', '' )
- tool_data_path = os.path.abspath( app.config.tool_data_path )
+def copy_sample_file( app, filename, dest_path=None ):
+ """
+ Copy xxx.loc.sample to dest_path/xxx.loc.sample and dest_path/xxx.loc. The default value for dest_path is ~/tool-data.
+ """
+ if dest_path is None:
+ dest_path = os.path.abspath( app.config.tool_data_path )
+ sample_file_path, sample_file_name = os.path.split( filename )
+ copied_file = sample_file_name.replace( '.sample', '' )
# It's ok to overwrite the .sample version of the file.
- shutil.copy( os.path.abspath( filename ), os.path.join( tool_data_path, sample_loc_file ) )
- # Only create the .loc file if it does not yet exist. We don't
- # overwrite it in case it contains stuff proprietary to the local instance.
- if not os.path.exists( os.path.join( tool_data_path, loc_file ) ):
- shutil.copy( os.path.abspath( filename ), os.path.join( tool_data_path, loc_file ) )
+ shutil.copy( os.path.abspath( filename ), os.path.join( dest_path, sample_file_name ) )
+ # Only create the .loc file if it does not yet exist. We don't overwrite it in case it contains stuff proprietary to the local instance.
+ if not os.path.exists( os.path.join( dest_path, copied_file ) ):
+ shutil.copy( os.path.abspath( filename ), os.path.join( dest_path, copied_file ) )
+def copy_sample_files( app, sample_files, sample_files_copied=None, dest_path=None ):
+ """
+ Copy all files to dest_path in the local Galaxy environment that have not already been copied. Those that have been copied
+ are contained in sample_files_copied. The default value for dest_path is ~/tool-data.
+ """
+ sample_files_copied = util.listify( sample_files_copied )
+ for filename in sample_files:
+ if filename not in sample_files_copied:
+ copy_sample_file( app, filename, dest_path=dest_path )
def create_repository_dict_for_proprietary_datatypes( tool_shed, name, owner, installed_changeset_revision, tool_dicts, converter_path=None, display_path=None ):
return dict( tool_shed=tool_shed,
repository_name=name,
@@ -336,7 +348,7 @@
tool_shed_url = get_url_from_repository_tool_shed( trans.app, repository )
return '%s/repos/%s/%s' % ( tool_shed_url, repository.owner, repository.name )
def generate_datatypes_metadata( datatypes_config, metadata_dict ):
- """Update the received metadata_dict with changes that have been applied to the received datatypes_config."""
+ """Update the received metadata_dict with information from the parsed datatypes_config."""
tree = ElementTree.parse( datatypes_config )
root = tree.getroot()
ElementInclude.include( root )
@@ -454,21 +466,9 @@
# Handle tool.requirements.
tool_requirements = []
for tr in tool.requirements:
- name=tr.name
- type=tr.type
- if type == 'fabfile':
- version = None
- fabfile = tr.fabfile
- method = tr.method
- else:
- version = tr.version
- fabfile = None
- method = None
- requirement_dict = dict( name=name,
- type=type,
- version=version,
- fabfile=fabfile,
- method=method )
+ requirement_dict = dict( name=tr.name,
+ type=tr.type,
+ version=tr.version )
tool_requirements.append( requirement_dict )
# Handle tool.tests.
tool_tests = []
@@ -732,7 +732,7 @@
break
return converter_path, display_path
def get_ctx_rev( tool_shed_url, name, owner, changeset_revision ):
- url = '%s/repository/get_ctx_rev?name=%s&owner=%s&changeset_revision=%s&webapp=galaxy' % ( tool_shed_url, name, owner, changeset_revision )
+ url = '%s/repository/get_ctx_rev?name=%s&owner=%s&changeset_revision=%s&webapp=galaxy&no_reset=true' % ( tool_shed_url, name, owner, changeset_revision )
response = urllib2.urlopen( url )
ctx_rev = response.read()
response.close()
@@ -893,27 +893,27 @@
return repository_tools_tups
def handle_missing_index_file( app, tool_path, sample_files, repository_tools_tups ):
"""Inspect each tool to see if it has any input parameters that are dynamically generated select lists that depend on a .loc file."""
- missing_files_handled = []
+ sample_files_copied = []
for index, repository_tools_tup in enumerate( repository_tools_tups ):
tup_path, guid, repository_tool = repository_tools_tup
params_with_missing_index_file = repository_tool.params_with_missing_index_file
for param in params_with_missing_index_file:
options = param.options
- missing_head, missing_tail = os.path.split( options.missing_index_file )
- if missing_tail not in missing_files_handled:
+ missing_file_path, missing_file_name = os.path.split( options.missing_index_file )
+ if missing_file_name not in sample_files_copied:
# The repository must contain the required xxx.loc.sample file.
for sample_file in sample_files:
- sample_head, sample_tail = os.path.split( sample_file )
- if sample_tail == '%s.sample' % missing_tail:
- copy_sample_loc_file( app, sample_file )
+ sample_file_path, sample_file_name = os.path.split( sample_file )
+ if sample_file_name == '%s.sample' % missing_file_name:
+ copy_sample_file( app, sample_file )
if options.tool_data_table and options.tool_data_table.missing_index_file:
options.tool_data_table.handle_found_index_file( options.missing_index_file )
- missing_files_handled.append( missing_tail )
+ sample_files_copied.append( options.missing_index_file )
break
# Reload the tool into the local list of repository_tools_tups.
repository_tool = app.toolbox.load_tool( os.path.join( tool_path, tup_path ), guid=guid )
repository_tools_tups[ index ] = ( tup_path, guid, repository_tool )
- return repository_tools_tups
+ return repository_tools_tups, sample_files_copied
def handle_sample_tool_data_table_conf_file( app, filename ):
"""
Parse the incoming filename and add new entries to the in-memory
@@ -1038,7 +1038,8 @@
# Load or deactivate proprietary datatype display applications
app.datatypes_registry.load_display_applications( installed_repository_dict=repository_dict, deactivate=deactivate )
def load_repository_contents( trans, repository_name, description, owner, changeset_revision, ctx_rev, tool_path, repository_clone_url,
- relative_install_dir, current_working_dir, tool_shed=None, tool_section=None, shed_tool_conf=None ):
+ relative_install_dir, current_working_dir, tool_shed=None, tool_section=None, shed_tool_conf=None,
+ install_tool_dependencies=False ):
"""Generate the metadata for the installed tool shed repository, among other things."""
# It is critical that the installed repository is updated to the desired changeset_revision before metadata is set because the
# process for setting metadata uses the repository files on disk. This method is called when an admin is installing a new repository
@@ -1063,8 +1064,9 @@
# Handle missing data table entries for tool parameters that are dynamically generated select lists.
repository_tools_tups = handle_missing_data_table_entry( trans.app, tool_path, sample_files, repository_tools_tups )
# Handle missing index files for tool parameters that are dynamically generated select lists.
- repository_tools_tups = handle_missing_index_file( trans.app, tool_path, sample_files, repository_tools_tups )
- # Handle tools that use fabric scripts to install dependencies.
+ repository_tools_tups, sample_files_copied = handle_missing_index_file( trans.app, tool_path, sample_files, repository_tools_tups )
+ # Copy remaining sample files included in the repository to the ~/tool-data directory of the local Galaxy instance.
+ copy_sample_files( trans.app, sample_files, sample_files_copied=sample_files_copied )
handle_tool_dependencies( current_working_dir, relative_install_dir, repository_tools_tups )
add_to_tool_panel( app=trans.app,
repository_name=repository_name,
diff -r 71dfeecdd019554b5cccc047546ae26ed7b50afa -r ea9f3c25a41576216f3c328e3333ebdb55250ed1 lib/galaxy/webapps/community/controllers/common.py
--- a/lib/galaxy/webapps/community/controllers/common.py
+++ b/lib/galaxy/webapps/community/controllers/common.py
@@ -5,7 +5,7 @@
from galaxy.tools import *
from galaxy.util.json import from_json_string, to_json_string
from galaxy.util.hash_util import *
-from galaxy.util.shed_util import copy_sample_loc_file, get_configured_ui, generate_datatypes_metadata, generate_tool_metadata, generate_workflow_metadata
+from galaxy.util.shed_util import copy_sample_file, get_configured_ui, generate_datatypes_metadata, generate_tool_metadata, generate_workflow_metadata
from galaxy.util.shed_util import handle_sample_tool_data_table_conf_file, to_html_escaped, to_html_str, update_repository
from galaxy.web.base.controller import *
from galaxy.webapps.community import model
@@ -209,13 +209,13 @@
if options.index_file or options.missing_index_file:
# Make sure the repository contains the required xxx.loc.sample file.
index_file = options.index_file or options.missing_index_file
- index_head, index_tail = os.path.split( index_file )
+ index_file_path, index_file_name = os.path.split( index_file )
sample_found = False
for sample_file in sample_files:
- sample_head, sample_tail = os.path.split( sample_file )
- if sample_tail == '%s.sample' % index_tail:
- copy_sample_loc_file( trans.app, sample_file )
- options.index_file = index_tail
+ sample_file_path, sample_file_name = os.path.split( sample_file )
+ if sample_file_name == '%s.sample' % index_file_name:
+ copy_sample_file( trans.app, sample_file )
+ options.index_file = index_file_name
options.missing_index_file = None
if options.tool_data_table:
options.tool_data_table.missing_index_file = None
@@ -224,7 +224,7 @@
if not sample_found:
can_set_metadata = False
correction_msg = "This file refers to a file named <b>%s</b>. " % str( index_file )
- correction_msg += "Upload a file named <b>%s.sample</b> to the repository to correct this error." % str( index_tail )
+ correction_msg += "Upload a file named <b>%s.sample</b> to the repository to correct this error." % str( index_file_name )
invalid_files.append( ( name, correction_msg ) )
return can_set_metadata, invalid_files
def new_tool_metadata_required( trans, id, metadata_dict ):
@@ -283,8 +283,7 @@
else:
# There is no saved repository metadata, so we need to create a new repository_metadata table record.
return True
- # The received metadata_dict includes no metadata for workflows, so a new repository_metadata table
- # record is not needed.
+ # The received metadata_dict includes no metadata for workflows, so a new repository_metadata table record is not needed.
return False
def generate_metadata_for_repository_tip( trans, id, ctx, changeset_revision, repo, repo_dir ):
"""
diff -r 71dfeecdd019554b5cccc047546ae26ed7b50afa -r ea9f3c25a41576216f3c328e3333ebdb55250ed1 lib/galaxy/webapps/community/controllers/upload.py
--- a/lib/galaxy/webapps/community/controllers/upload.py
+++ b/lib/galaxy/webapps/community/controllers/upload.py
@@ -139,9 +139,8 @@
if error:
message = '%s<br/>%s' % ( message, error_message )
if full_path.endswith( '.loc.sample' ):
- # Handle the special case where a xxx.loc.sample file is
- # being uploaded by copying it to ~/tool-data/xxx.loc.
- copy_sample_loc_file( trans.app, full_path )
+ # Handle the special case where a xxx.loc.sample file is being uploaded by copying it to ~/tool-data/xxx.loc.
+ copy_sample_file( trans.app, full_path )
# See if the content of the change set was valid.
admin_only = len( repository.downloadable_revisions ) != 1
handle_email_alerts( trans, repository, content_alert_str=content_alert_str, new_repo_alert=new_repo_alert, admin_only=admin_only )
@@ -295,9 +294,8 @@
if error:
return False, message, files_to_remove, content_alert_str
if filename_in_archive.endswith( '.loc.sample' ):
- # Handle the special case where a xxx.loc.sample file is
- # being uploaded by copying it to ~/tool-data/xxx.loc.
- copy_sample_loc_file( trans.app, filename_in_archive )
+ # Handle the special case where a xxx.loc.sample file is being uploaded by copying it to ~/tool-data/xxx.loc.
+ copy_sample_file( trans.app, filename_in_archive )
try:
commands.commit( repo.ui, repo, full_path, user=trans.user.username, message=commit_message )
except Exception, e:
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: dan: Allow GenomeSpace importer tool to sniff filetype when GSMetadata object is not available.
by Bitbucket 03 May '12
by Bitbucket 03 May '12
03 May '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/71dfeecdd019/
changeset: 71dfeecdd019
user: dan
date: 2012-05-03 18:25:06
summary: Allow GenomeSpace importer tool to sniff filetype when GSMetadata object is not available.
affected #: 1 file
diff -r 4d7077d8d2b875feed71fa8c9ab7bd701957b909 -r 71dfeecdd019554b5cccc047546ae26ed7b50afa tools/genomespace/genomespace_importer.py
--- a/tools/genomespace/genomespace_importer.py
+++ b/tools/genomespace/genomespace_importer.py
@@ -1,6 +1,6 @@
#Dan Blankenberg
-import optparse, os, urllib2, urllib, cookielib, urlparse
+import optparse, os, urllib2, urllib, cookielib, urlparse, tempfile, shutil
from galaxy import eggs
import pkg_resources
@@ -8,6 +8,10 @@
pkg_resources.require( "simplejson" )
import simplejson
+import galaxy.model # need to import model before sniff to resolve a circular import dependency
+from galaxy.datatypes import sniff
+from galaxy.datatypes.registry import Registry
+
GENOMESPACE_API_VERSION_STRING = "v1.0"
GENOMESPACE_SERVER_URL_PROPERTIES = "http://www.genomespace.org/sites/genomespacefiles/config/serverurl.properti…"
@@ -61,13 +65,13 @@
cookie_opener = urllib2.build_opener( urllib2.HTTPCookieProcessor( cj ) )
return cookie_opener
-def get_galaxy_ext_from_genomespace_format_url( url_opener, file_format_url ):
+def get_galaxy_ext_from_genomespace_format_url( url_opener, file_format_url, default = DEFAULT_GALAXY_EXT ):
ext = GENOMESPACE_FORMAT_IDENTIFIER_TO_GENOMESPACE_EXT.get( file_format_url, None )
if ext is not None:
ext = GENOMESPACE_EXT_TO_GALAXY_EXT.get( ext, None )
if ext is None:
#could check content type, etc here
- ext = DEFAULT_GALAXY_EXT
+ ext = default
return ext
def get_genomespace_site_urls():
@@ -94,8 +98,6 @@
def download_from_genomespace_importer( username, token, json_parameter_file, genomespace_site ):
json_params = simplejson.loads( open( json_parameter_file, 'r' ).read() )
datasource_params = json_params.get( 'param_dict' )
- #username = datasource_params.get( "gs-username", None )
- #token = datasource_params.get( "gs-token", None )
assert None not in [ username, token ], "Missing GenomeSpace username or token."
output_filename = datasource_params.get( "output_file1", None )
dataset_id = json_params['output_data'][0]['dataset_id']
@@ -106,17 +108,15 @@
set_genomespace_format_identifiers( url_opener, genomespace_site_dict['dmServer'] )
file_url_name = "URL"
metadata_parameter_file = open( json_params['job_config']['TOOL_PROVIDED_JOB_METADATA_FILE'], 'wb' )
+ #setup datatypes registry for sniffing
+ datatypes_registry = Registry()
+ datatypes_registry.load_datatypes( root_dir = json_params[ 'job_config' ][ 'GALAXY_ROOT_DIR' ], config = json_params[ 'job_config' ][ 'GALAXY_DATATYPES_CONF_FILE' ] )
url_param = datasource_params.get( file_url_name, None )
for download_url in url_param.split( ',' ):
+ using_temp_file = False
parsed_url = urlparse.urlparse( download_url )
query_params = urlparse.parse_qs( parsed_url[4] )
- file_type = DEFAULT_GALAXY_EXT
- if 'dataformat' in query_params:
- file_type = query_params[ 'dataformat' ][0]
- file_type = get_galaxy_ext_from_genomespace_format_url( url_opener, file_type )
- elif '.' in parsed_url[2]:
- file_type = parsed_url[2].rsplit( '.', 1 )[-1]
- file_type = GENOMESPACE_EXT_TO_GALAXY_EXT.get( file_type, file_type )
+ #write file to disk
new_file_request = urllib2.Request( download_url )
new_file_request.get_method = lambda: 'GET'
target_download_url = url_opener.open( new_file_request )
@@ -130,16 +130,58 @@
query_params = urlparse.parse_qs( parsed_url[4] )
filename = urllib.unquote_plus( parsed_url[2].split( '/' )[-1] )
if output_filename is None:
- output_filename = os.path.join( datasource_params['__new_file_path__'], 'primary_%i_output%s_visible_%s' % ( hda_id, ''.join( c in VALID_CHARS and c or '-' for c in filename ), file_type ) )
- else:
- if dataset_id is not None:
- metadata_parameter_file.write( "%s\n" % simplejson.dumps( dict( type = 'dataset',
- dataset_id = dataset_id,
- ext = file_type,
- name = "GenomeSpace importer on %s" % ( filename ) ) ) )
+ #need to use a temp file here, because we do not know the ext yet
+ using_temp_file = True
+ output_filename = tempfile.NamedTemporaryFile( prefix='tmp-genomespace-importer-' ).name
output_file = open( output_filename, 'wb' )
chunk_write( target_download_url, output_file )
output_file.close()
+
+ #determine file format
+ file_type = None
+ if 'dataformat' in query_params: #this is a converted dataset
+ file_type = query_params[ 'dataformat' ][0]
+ file_type = get_galaxy_ext_from_genomespace_format_url( url_opener, file_type )
+ else:
+ try:
+ #get and use GSMetadata object
+ download_file_path = download_url.split( "%s/file/" % ( genomespace_site_dict['dmServer'] ), 1)[-1] #FIXME: This is a very bad way to get the path for determining metadata. There needs to be a way to query API using download URLto get to the metadata object
+ metadata_request = urllib2.Request( "%s/%s/filemetadata/%s" % ( genomespace_site_dict['dmServer'], GENOMESPACE_API_VERSION_STRING, download_file_path ) )
+ metadata_request.get_method = lambda: 'GET'
+ metadata_url = url_opener.open( metadata_request )
+ file_metadata_dict = simplejson.loads( metadata_url.read() )
+ metadata_url.close()
+ file_type = file_metadata_dict.get( 'dataFormat', None )
+ if file_type and file_type.get( 'url' ):
+ file_type = file_type.get( 'url' )
+ file_type = get_galaxy_ext_from_genomespace_format_url( url_opener, file_type, default = None )
+ except:
+ pass
+ if file_type is None:
+ #try to sniff datatype
+ try:
+ file_type = sniff.handle_uploaded_dataset_file( output_filename, datatypes_registry )
+ except:
+ pass #sniff failed
+ if file_type is None and '.' in parsed_url[2]:
+ #still no known datatype, fall back to using extension
+ file_type = parsed_url[2].rsplit( '.', 1 )[-1]
+ file_type = GENOMESPACE_EXT_TO_GALAXY_EXT.get( file_type, file_type )
+ if file_type is None:
+ #use default extension (e.g. 'data')
+ file_type = DEFAULT_GALAXY_EXT
+
+ #save json info for single primary dataset
+ if dataset_id is not None:
+ metadata_parameter_file.write( "%s\n" % simplejson.dumps( dict( type = 'dataset',
+ dataset_id = dataset_id,
+ ext = file_type,
+ name = "GenomeSpace importer on %s" % ( filename ) ) ) )
+ #if using tmp file, move the file to the new file path dir to get scooped up later
+ if using_temp_file:
+ shutil.move( output_filename, os.path.join( datasource_params['__new_file_path__'], 'primary_%i_output%s_visible_%s' % ( hda_id, ''.join( c in VALID_CHARS and c or '-' for c in filename ), file_type ) ) )
+
+ dataset_id = None #only one primary dataset available
output_filename = None #only have one filename available
metadata_parameter_file.close()
return True
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/81e6e2f44d32/
changeset: 81e6e2f44d32
user: cjav
date: 2012-05-03 01:30:11
summary: expose dataset full path through the API
affected #: 1 file
diff -r c5f3e218266e8b82cd509b9177461839c74971c3 -r 81e6e2f44d32845b8d48459ea779030d596c7c48 lib/galaxy/model/__init__.py
--- a/lib/galaxy/model/__init__.py
+++ b/lib/galaxy/model/__init__.py
@@ -1167,6 +1167,7 @@
deleted = hda.deleted,
visible = hda.visible,
state = hda.state,
+ file_name = hda.file_name,
file_size = int( hda.get_size() ),
data_type = hda.ext,
genome_build = hda.dbkey,
https://bitbucket.org/galaxy/galaxy-central/changeset/4d7077d8d2b8/
changeset: 4d7077d8d2b8
user: dannon
date: 2012-05-03 16:18:38
summary: Incorporation and slight update to pull request #43. The original contribution allowed access to file_path regardless of admin status and config setting.
affected #: 2 files
diff -r 81e6e2f44d32845b8d48459ea779030d596c7c48 -r 4d7077d8d2b875feed71fa8c9ab7bd701957b909 lib/galaxy/model/__init__.py
--- a/lib/galaxy/model/__init__.py
+++ b/lib/galaxy/model/__init__.py
@@ -1167,7 +1167,6 @@
deleted = hda.deleted,
visible = hda.visible,
state = hda.state,
- file_name = hda.file_name,
file_size = int( hda.get_size() ),
data_type = hda.ext,
genome_build = hda.dbkey,
diff -r 81e6e2f44d32845b8d48459ea779030d596c7c48 -r 4d7077d8d2b875feed71fa8c9ab7bd701957b909 lib/galaxy/web/api/history_contents.py
--- a/lib/galaxy/web/api/history_contents.py
+++ b/lib/galaxy/web/api/history_contents.py
@@ -1,11 +1,9 @@
"""
API operations on the contents of a history.
"""
-import logging, os, string, shutil, urllib, re, socket
-from cgi import escape, FieldStorage
-from galaxy import util, datatypes, jobs, web, util
+import logging
+from galaxy import web
from galaxy.web.base.controller import *
-from galaxy.util.sanitize_html import sanitize_html
from galaxy.model.orm import *
import pkg_resources
@@ -56,6 +54,8 @@
return str( e )
try:
item = content.get_api_value( view='element' )
+ if trans.user_is_admin() or trans.app.config.expose_dataset_path:
+ item['file_name'] = hda.file_name
if not item['deleted']:
# Problem: Method url_for cannot use the dataset controller
# Get the environment from DefaultWebTransaction and use default webapp mapper instead of webapp API mapper
@@ -76,7 +76,6 @@
POST /api/libraries/{encoded_history_id}/contents
Creates a new history content item (file, aka HistoryDatasetAssociation).
"""
- params = util.Params( payload )
from_ld_id = payload.get( 'from_ld_id', None )
try:
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: dan: Update WormBase datasource tool to use WormBase 2.
by Bitbucket 02 May '12
by Bitbucket 02 May '12
02 May '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/c5f3e218266e/
changeset: c5f3e218266e
user: dan
date: 2012-05-02 23:04:33
summary: Update WormBase datasource tool to use WormBase 2.
affected #: 1 file
diff -r a781f132e259b60c417c674047535ac0a688b69d -r c5f3e218266e8b82cd509b9177461839c74971c3 tools/data_source/wormbase.xml
--- a/tools/data_source/wormbase.xml
+++ b/tools/data_source/wormbase.xml
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
-<tool name="Wormbase" id="wormbase" tool_type="data_source">
+<tool name="WormBase" id="wormbase" tool_type="data_source" version="1.0.1"><description>server</description><command interpreter="python">data_source.py $output $__app__.config.output_size_limit</command>
- <inputs action="http://www.wormbase.org/db/seq/gbgff/c_elegans/" check_values="false" target="_top">
+ <inputs action="http://www.wormbase.org/tools/genome/gbrowse/c_elegans/" check_values="false" target="_top"><display>go to Wormbase server $GALAXY_URL</display><param name="GALAXY_URL" type="baseurl" value="/tool_runner?tool_id=wormbase" /></inputs>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/a781f132e259/
changeset: a781f132e259
user: dan
date: 2012-05-02 17:47:04
summary: Fix typo in BAM slice tool.
affected #: 1 file
diff -r 926c93b412beaaff5579e6faa2d052768e9408d1 -r a781f132e259b60c417c674047535ac0a688b69d tools/samtools/samtools_slice_bam.xml
--- a/tools/samtools/samtools_slice_bam.xml
+++ b/tools/samtools/samtools_slice_bam.xml
@@ -20,7 +20,7 @@
<test><param name="input_bam" value="gatk/fake_phiX_reads_1.bam" ftype="bam" /><param name="input_interval" value="gatk/fake_phiX_variant_locations.bed" ftype="bed" />
- <output name="output_log" file="gatk/fake_phiX_reads_1.bam" ftype="bam" />
+ <output name="output_bam" file="gatk/fake_phiX_reads_1.bam" ftype="bam" /></test></tests><help>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/926c93b412be/
changeset: 926c93b412be
user: dan
date: 2012-05-02 17:32:19
summary: Add Slice BAM by regions tool.
affected #: 3 files
diff -r 5e53e5d824009984629a269b9d768b99b5683310 -r 926c93b412beaaff5579e6faa2d052768e9408d1 tool_conf.xml.sample
--- a/tool_conf.xml.sample
+++ b/tool_conf.xml.sample
@@ -384,6 +384,7 @@
<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" /></section><section name="NGS: GATK Tools (beta)" id="gatk"><label text="Alignment Utilities" id="gatk_bam_utilities"/>
diff -r 5e53e5d824009984629a269b9d768b99b5683310 -r 926c93b412beaaff5579e6faa2d052768e9408d1 tools/samtools/samtools_slice_bam.py
--- /dev/null
+++ b/tools/samtools/samtools_slice_bam.py
@@ -0,0 +1,75 @@
+#!/usr/bin/env python
+#Dan Blankenberg
+
+"""
+A wrapper script for slicing a BAM file by provided BED file using SAMTools.
+%prog input_filename.sam output_filename.bam
+"""
+#TODO: Confirm that the sort is necessary e.g. if input regions are out of order
+
+
+import sys, optparse, os, tempfile, subprocess, shutil
+
+CHUNK_SIZE = 2**20 #1mb
+
+def cleanup_before_exit( tmp_dir ):
+ if tmp_dir and os.path.exists( tmp_dir ):
+ shutil.rmtree( tmp_dir )
+
+def __main__():
+ #Parse Command Line
+ parser = optparse.OptionParser()
+ (options, args) = parser.parse_args()
+
+ assert len( args ) == 4, "Invalid command line: samtools_slice_bam.py input.bam input.bam.bai input.interval output.bam"
+ input_bam_filename, input_index_filename, input_interval_filename, output_bam_filename = args
+
+ tmp_dir = tempfile.mkdtemp( prefix='tmp-samtools_slice_bam-' )
+
+ tmp_input_bam_filename = os.path.join( tmp_dir, 'input_bam.bam' )
+ os.symlink( input_bam_filename, tmp_input_bam_filename )
+ os.symlink( input_index_filename, "%s.bai" % tmp_input_bam_filename )
+
+ #Slice BAM
+ unsorted_bam_filename = os.path.join( tmp_dir, 'unsorted.bam' )
+ unsorted_stderr_filename = os.path.join( tmp_dir, 'unsorted.stderr' )
+ cmd = 'samtools view -b -L "%s" "%s" > "%s"' % ( input_interval_filename, tmp_input_bam_filename, unsorted_bam_filename )
+ proc = subprocess.Popen( args=cmd, stderr=open( unsorted_stderr_filename, 'wb' ), shell=True, cwd=tmp_dir )
+ return_code = proc.wait()
+ if return_code:
+ stderr_target = sys.stderr
+ else:
+ stderr_target = sys.stdout
+ stderr = open( unsorted_stderr_filename )
+ while True:
+ chunk = stderr.read( CHUNK_SIZE )
+ if chunk:
+ stderr_target.write( chunk )
+ else:
+ break
+ stderr.close()
+
+ #sort sam, so indexing will not fail
+ #TODO: confirm if sorting is necessary (is original BAM order maintained, or does the output follow the order of input intervals?)
+ sorted_stderr_filename = os.path.join( tmp_dir, 'sorted.stderr' )
+ sorting_prefix = os.path.join( tmp_dir, 'sorted_bam' )
+ cmd = 'samtools sort -o "%s" "%s" > "%s"' % ( unsorted_bam_filename, sorting_prefix, output_bam_filename )
+ proc = subprocess.Popen( args=cmd, stderr=open( sorted_stderr_filename, 'wb' ), shell=True, cwd=tmp_dir )
+ return_code = proc.wait()
+
+ if return_code:
+ stderr_target = sys.stderr
+ else:
+ stderr_target = sys.stdout
+ stderr = open( sorted_stderr_filename )
+ while True:
+ chunk = stderr.read( CHUNK_SIZE )
+ if chunk:
+ stderr_target.write( chunk )
+ else:
+ break
+ stderr.close()
+
+ cleanup_before_exit( tmp_dir )
+
+if __name__=="__main__": __main__()
diff -r 5e53e5d824009984629a269b9d768b99b5683310 -r 926c93b412beaaff5579e6faa2d052768e9408d1 tools/samtools/samtools_slice_bam.xml
--- /dev/null
+++ b/tools/samtools/samtools_slice_bam.xml
@@ -0,0 +1,40 @@
+<tool id="samtools_slice_bam" name="Slice BAM" version="0.0.1">
+ <description>by provided regions</description>
+ <requirements>
+ <requirement type="package">samtools</requirement>
+ </requirements>
+ <command interpreter="python">samtools_slice_bam.py
+ "${input_bam}"
+ "${input_bam.metadata.bam_index}"
+ "${input_interval}"
+ "${output_bam}"
+ </command>
+ <inputs>
+ <param name="input_bam" type="data" format="bam" label="BAM file" />
+ <param name="input_interval" type="data" format="bed" label="BED file" />
+ </inputs>
+ <outputs>
+ <data format="bam" name="output_bam"/>
+ </outputs>
+ <tests>
+ <test>
+ <param name="input_bam" value="gatk/fake_phiX_reads_1.bam" ftype="bam" />
+ <param name="input_interval" value="gatk/fake_phiX_variant_locations.bed" ftype="bed" />
+ <output name="output_log" file="gatk/fake_phiX_reads_1.bam" ftype="bam" />
+ </test>
+ </tests>
+ <help>
+**What it does**
+
+ Accepts an input BAM file and an input BED file and creates an output BAM file containing only those alignments that overlap the provided BED intervals.
+
+------
+
+**Citation**
+
+For the underlying tool, please cite `Li H, Handsaker B, Wysoker A, Fennell T, Ruan J, Homer N, Marth G, Abecasis G, Durbin R; 1000 Genome Project Data Processing Subgroup. The Sequence Alignment/Map format and SAMtools. Bioinformatics. 2009 Aug 15;25(16):2078-9. <http://www.ncbi.nlm.nih.gov/pubmed/19505943>`_
+
+If you use this tool in Galaxy, please cite Blankenberg D, et al. *In preparation.*
+
+ </help>
+</tool>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: greg: Fix popup menu for viewing tool metadata in a tool shed repository to be compatible with new styles.
by Bitbucket 01 May '12
by Bitbucket 01 May '12
01 May '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/5e53e5d82400/
changeset: 5e53e5d82400
user: greg
date: 2012-05-01 18:17:07
summary: Fix popup menu for viewing tool metadata in a tool shed repository to be compatible with new styles.
affected #: 1 file
diff -r 49b5dc00dfb6ef3bf0f4bb1f611db33042469181 -r 5e53e5d824009984629a269b9d768b99b5683310 templates/webapps/community/repository/common.mako
--- a/templates/webapps/community/repository/common.mako
+++ b/templates/webapps/community/repository/common.mako
@@ -108,15 +108,13 @@
<td><b>version</b></td><td><b>requirements</b></td></tr>
- %for tool_dict in tool_dicts:
+ %for index, tool_dict in enumerate( tool_dicts ):
<tr><td>
- <div style="float: left; margin-left: 1px;" class="menubutton split popup" id="tool-${tool_dict[ 'id' ].replace( ' ', '_' )}-popup">
- <a class="view-info" href="${h.url_for( controller='repository', action='display_tool', repository_id=trans.security.encode_id( repository.id ), tool_config=tool_dict[ 'tool_config' ], changeset_revision=changeset_revision, webapp=webapp )}">
- ${tool_dict[ 'name' ]}
- </a>
+ <div style="float:left;" class="menubutton split popup" id="tool-${index}-popup">
+ <a class="view-info" href="${h.url_for( controller='repository', action='display_tool', repository_id=trans.security.encode_id( repository.id ), tool_config=tool_dict[ 'tool_config' ], changeset_revision=changeset_revision, webapp=webapp )}">${tool_dict[ 'name' ]}</a></div>
- <div popupmenu="tool-${tool_dict[ 'id' ].replace( ' ', '_' )}-popup">
+ <div popupmenu="tool-${index}-popup"><a class="action-button" href="${h.url_for( controller='repository', action='view_tool_metadata', repository_id=trans.security.encode_id( repository.id ), changeset_revision=changeset_revision, tool_id=tool_dict[ 'id' ], webapp=webapp )}">View tool metadata</a></div></td>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: greg: Eliminate the fabfile/method type from ToolRequirement.
by Bitbucket 01 May '12
by Bitbucket 01 May '12
01 May '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/49b5dc00dfb6/
changeset: 49b5dc00dfb6
user: greg
date: 2012-05-01 15:15:59
summary: Eliminate the fabfile/method type from ToolRequirement.
affected #: 1 file
diff -r 0090f9df64fd84a9fda73d12b816a7d4d044b822 -r 49b5dc00dfb6ef3bf0f4bb1f611db33042469181 lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -702,19 +702,13 @@
class ToolRequirement( object ):
"""
- Represents an external requirement that must be available for the tool to
- run (for example, a program, package, or library). Requirements can
- optionally assert a specific version, or reference a command to execute a
- fabric script. If fabric is used, the type is 'fabfile' and the version
- attribute is not used since the fabric script includes all necessary
- information for automatic dependency installation.
+ Represents an external requirement that must be available for the tool to run (for example, a program, package, or library).
+ Requirements can optionally assert a specific version.
"""
- def __init__( self, name=None, type=None, version=None, fabfile=None, method=None ):
+ def __init__( self, name=None, type=None, version=None ):
self.name = name
self.type = type
self.version = version
- self.fabfile = fabfile
- self.method = method
class ToolParallelismInfo(object):
"""
@@ -1339,19 +1333,8 @@
for requirement_elem in requirements_elem.findall( 'requirement' ):
name = util.xml_text( requirement_elem )
type = requirement_elem.get( "type", "package" )
- if type == 'fabfile':
- # The fabric script will include all necessary information for
- # automatically installing the tool dependencies.
- fabfile = requirement_elem.get( "fabfile" )
- method = requirement_elem.get( "method" )
- version = None
- else:
- # For backward compatibility, requirements tag sets should not require the
- # use of a fabric script.
- version = requirement_elem.get( "version" )
- fabfile = None
- method = None
- requirement = ToolRequirement( name=name, type=type, version=version, fabfile=fabfile, method=method )
+ version = requirement_elem.get( "version", None )
+ requirement = ToolRequirement( name=name, type=type, version=version )
self.requirements.append( requirement )
def check_workflow_compatible( self ):
"""
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: greg: Fix the instructions on the veiw request type page.
by Bitbucket 01 May '12
by Bitbucket 01 May '12
01 May '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/0090f9df64fd/
changeset: 0090f9df64fd
user: greg
date: 2012-05-01 15:11:07
summary: Fix the instructions on the veiw request type page.
affected #: 1 file
diff -r 1640cbaafd09a3cb4bcdea55d95c43d619a0471f -r 0090f9df64fd84a9fda73d12b816a7d4d044b822 templates/admin/request_type/view_request_type.mako
--- a/templates/admin/request_type/view_request_type.mako
+++ b/templates/admin/request_type/view_request_type.mako
@@ -73,7 +73,7 @@
%endfor
%else:
<div class="form-row">
- External service login information is not set. Select the <b>Edit request type</b> option in the <b>Configuration options</b> menu.
+ External service login information is not set. Select the <b>Edit request type</b> option in the <b>Request type actions</b> menu.
</div>
%endif
</div>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: natefoo: Allow for library deletion from the API (admins only).
by Bitbucket 30 Apr '12
by Bitbucket 30 Apr '12
30 Apr '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/1640cbaafd09/
changeset: 1640cbaafd09
user: natefoo
date: 2012-04-30 22:27:55
summary: Allow for library deletion from the API (admins only).
affected #: 2 files
diff -r 4ff0dd2aa475275a13c65f183c4bb2595f001941 -r 1640cbaafd09a3cb4bcdea55d95c43d619a0471f lib/galaxy/web/api/libraries.py
--- a/lib/galaxy/web/api/libraries.py
+++ b/lib/galaxy/web/api/libraries.py
@@ -7,18 +7,27 @@
from galaxy.web.base.controller import *
from galaxy.util.sanitize_html import sanitize_html
from galaxy.model.orm import *
+from paste.httpexceptions import *
log = logging.getLogger( __name__ )
class LibrariesController( BaseAPIController ):
@web.expose_api
- def index( self, trans, **kwd ):
+ def index( self, trans, deleted='False', **kwd ):
"""
GET /api/libraries
+ GET /api/libraries/deleted
Displays a collection (list) of libraries.
"""
- query = trans.sa_session.query( trans.app.model.Library ).filter( trans.app.model.Library.table.c.deleted == False )
+ query = trans.sa_session.query( trans.app.model.Library )
+ deleted = util.string_as_bool( deleted )
+ if deleted:
+ route = 'deleted_library'
+ query = query.filter( trans.app.model.Library.table.c.deleted == True )
+ else:
+ route = 'library'
+ query = query.filter( trans.app.model.Library.table.c.deleted == False )
current_user_role_ids = [ role.id for role in trans.get_current_user_roles() ]
library_access_action = trans.app.security_agent.permitted_actions.LIBRARY_ACCESS.action
restricted_library_ids = [ lp.library_id for lp in trans.sa_session.query( trans.model.LibraryPermissions ) \
@@ -32,31 +41,32 @@
rval = []
for library in query:
item = library.get_api_value()
- item['url'] = url_for( 'library', id=trans.security.encode_id( library.id ) )
+ item['url'] = url_for( route, id=trans.security.encode_id( library.id ) )
item['id'] = trans.security.encode_id( item['id'] )
rval.append( item )
return rval
@web.expose_api
- def show( self, trans, id, **kwd ):
+ def show( self, trans, id, deleted='False', **kwd ):
"""
GET /api/libraries/{encoded_library_id}
+ GET /api/libraries/deleted/{encoded_library_id}
Displays information about a library.
"""
library_id = id
+ deleted = util.string_as_bool( deleted )
params = util.Params( kwd )
try:
decoded_library_id = trans.security.decode_id( library_id )
except TypeError:
- trans.response.status = 400
- return "Malformed library id ( %s ) specified, unable to decode." % str( library_id )
+ raise HTTPBadRequest( detail='Malformed library id ( %s ) specified, unable to decode.' % id )
try:
library = trans.sa_session.query( trans.app.model.Library ).get( decoded_library_id )
+ assert library.deleted == deleted
except:
library = None
if not library or not ( trans.user_is_admin() or trans.app.security_agent.can_access_library( trans.get_current_user_roles(), library ) ):
- trans.response.status = 400
- return "Invalid library id ( %s ) specified." % str( library_id )
+ raise HTTPBadRequest( detail='Invalid library id ( %s ) specified.' % id )
item = library.get_api_value( view='element' )
#item['contents_url'] = url_for( 'contents', library_id=library_id )
item['contents_url'] = url_for( 'library_contents', library_id=library_id )
@@ -69,13 +79,11 @@
Creates a new library.
"""
if not trans.user_is_admin():
- trans.response.status = 403
- return "You are not authorized to create a new library."
+ raise HTTPForbidden( detail='You are not authorized to create a new library.' )
params = util.Params( payload )
name = util.restore_text( params.get( 'name', None ) )
if not name:
- trans.response.status = 400
- return "Missing required parameter 'name'."
+ raise HTTPBadRequest( detail="Missing required parameter 'name'." )
description = util.restore_text( params.get( 'description', '' ) )
synopsis = util.restore_text( params.get( 'synopsis', '' ) )
if synopsis in [ 'None', None ]:
@@ -91,3 +99,22 @@
rval['name'] = name
rval['id'] = encoded_id
return [ rval ]
+
+ @web.expose_api
+ def delete( self, trans, id, **kwd ):
+ if not trans.user_is_admin():
+ raise HTTPForbidden( detail='You are not authorized to delete libraries.' )
+ try:
+ decoded_id = trans.security.decode_id( id )
+ except TypeError:
+ raise HTTPBadRequest( detail='Malformed library id ( %s ) specified, unable to decode.' % id )
+ try:
+ library = trans.sa_session.query( trans.app.model.Library ).get( decoded_id )
+ except:
+ library = None
+ if not library:
+ raise HTTPBadRequest( detail='Invalid library id ( %s ) specified.' % id )
+ library.deleted = True
+ trans.sa_session.add( library )
+ trans.sa_session.flush()
+ return library.get_api_value( view='element', value_mapper={ 'id' : trans.security.encode_id } )
diff -r 4ff0dd2aa475275a13c65f183c4bb2595f001941 -r 1640cbaafd09a3cb4bcdea55d95c43d619a0471f lib/galaxy/web/buildapp.py
--- a/lib/galaxy/web/buildapp.py
+++ b/lib/galaxy/web/buildapp.py
@@ -123,7 +123,7 @@
path_prefix='/api/libraries/:library_id',
parent_resources=dict( member_name='library', collection_name='libraries' ) )
webapp.api_mapper.resource( 'dataset', 'datasets', path_prefix='/api' )
- webapp.api_mapper.resource( 'library', 'libraries', path_prefix='/api' )
+ webapp.api_mapper.resource_with_deleted( 'library', 'libraries', path_prefix='/api' )
webapp.api_mapper.resource( 'sample', 'samples', path_prefix='/api' )
webapp.api_mapper.resource( 'request', 'requests', path_prefix='/api' )
webapp.api_mapper.resource( 'form', 'forms', path_prefix='/api' )
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: greg: Eliminate resetting all repository metadata on a tool shed repostiory when its not necessary.
by Bitbucket 30 Apr '12
by Bitbucket 30 Apr '12
30 Apr '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/4ff0dd2aa475/
changeset: 4ff0dd2aa475
user: greg
date: 2012-04-30 20:42:39
summary: Eliminate resetting all repository metadata on a tool shed repostiory when its not necessary.
affected #: 4 files
diff -r 559105c554d540d8137d6583c58b2e237fe1eff4 -r 4ff0dd2aa475275a13c65f183c4bb2595f001941 lib/galaxy/tool_shed/update_manager.py
--- a/lib/galaxy/tool_shed/update_manager.py
+++ b/lib/galaxy/tool_shed/update_manager.py
@@ -34,7 +34,7 @@
log.info( 'Transfer job restarter shutting down...' )
def check_for_update( self, repository ):
tool_shed_url = get_url_from_repository_tool_shed( self.app, repository )
- url = '%s/repository/check_for_updates?name=%s&owner=%s&changeset_revision=%s&webapp=update_manager' % \
+ url = '%s/repository/check_for_updates?name=%s&owner=%s&changeset_revision=%s&webapp=update_manager&no_reset=true' % \
( tool_shed_url, repository.name, repository.owner, repository.changeset_revision )
response = urllib2.urlopen( url )
text = response.read()
diff -r 559105c554d540d8137d6583c58b2e237fe1eff4 -r 4ff0dd2aa475275a13c65f183c4bb2595f001941 lib/galaxy/web/controllers/admin_toolshed.py
--- a/lib/galaxy/web/controllers/admin_toolshed.py
+++ b/lib/galaxy/web/controllers/admin_toolshed.py
@@ -149,7 +149,7 @@
def browse_tool_shed( self, trans, **kwd ):
tool_shed_url = kwd[ 'tool_shed_url' ]
galaxy_url = url_for( '/', qualified=True )
- url = '%srepository/browse_valid_repositories?galaxy_url=%s&webapp=galaxy' % ( tool_shed_url, galaxy_url )
+ url = '%srepository/browse_valid_repositories?galaxy_url=%s&webapp=galaxy&no_reset=true' % ( tool_shed_url, galaxy_url )
return trans.response.send_redirect( url )
@web.expose
@web.require_admin
@@ -167,7 +167,7 @@
# Send a request to the relevant tool shed to see if there are any updates.
repository = get_repository( trans, kwd[ 'id' ] )
tool_shed_url = get_url_from_repository_tool_shed( trans.app, repository )
- url = '%s/repository/check_for_updates?galaxy_url=%s&name=%s&owner=%s&changeset_revision=%s&webapp=galaxy' % \
+ url = '%s/repository/check_for_updates?galaxy_url=%s&name=%s&owner=%s&changeset_revision=%s&webapp=galaxy&no_reset=true' % \
( tool_shed_url, url_for( '/', qualified=True ), repository.name, repository.owner, repository.changeset_revision )
return trans.response.send_redirect( url )
@web.expose
@@ -218,14 +218,14 @@
def find_tools_in_tool_shed( self, trans, **kwd ):
tool_shed_url = kwd[ 'tool_shed_url' ]
galaxy_url = url_for( '/', qualified=True )
- url = '%srepository/find_tools?galaxy_url=%s&webapp=galaxy' % ( tool_shed_url, galaxy_url )
+ url = '%srepository/find_tools?galaxy_url=%s&webapp=galaxy&no_reset=true' % ( tool_shed_url, galaxy_url )
return trans.response.send_redirect( url )
@web.expose
@web.require_admin
def find_workflows_in_tool_shed( self, trans, **kwd ):
tool_shed_url = kwd[ 'tool_shed_url' ]
galaxy_url = url_for( '/', qualified=True )
- url = '%srepository/find_workflows?galaxy_url=%s&webapp=galaxy' % ( tool_shed_url, galaxy_url )
+ url = '%srepository/find_workflows?galaxy_url=%s&webapp=galaxy&no_reset=true' % ( tool_shed_url, galaxy_url )
return trans.response.send_redirect( url )
@web.expose
@web.require_admin
@@ -318,7 +318,7 @@
shed_tool_conf=shed_tool_conf )
if 'tools' in metadata_dict:
# Get the tool_versions from the tool shed for each tool in the installed change set.
- url = '%srepository/get_tool_versions?name=%s&owner=%s&changeset_revision=%s&webapp=galaxy' % \
+ url = '%srepository/get_tool_versions?name=%s&owner=%s&changeset_revision=%s&webapp=galaxy&no_reset=true' % \
( tool_shed_url, name, owner, changeset_revision )
response = urllib2.urlopen( url )
text = response.read()
@@ -367,7 +367,7 @@
repo_info_tuple = decoded_repo_info_dict[ name ]
description, repository_clone_url, changeset_revision, ctx_rev = repo_info_tuple
owner = get_repository_owner( clean_repository_clone_url( repository_clone_url ) )
- url = '%srepository/get_readme?name=%s&owner=%s&changeset_revision=%s&webapp=galaxy' % ( tool_shed_url, name, owner, changeset_revision )
+ url = '%srepository/get_readme?name=%s&owner=%s&changeset_revision=%s&webapp=galaxy&no_reset=true' % ( tool_shed_url, name, owner, changeset_revision )
response = urllib2.urlopen( url )
raw_text = response.read()
response.close()
@@ -564,7 +564,7 @@
# Get the tool_versions from the tool shed for each tool in the installed change set.
repository = get_repository( trans, kwd[ 'id' ] )
tool_shed_url = get_url_from_repository_tool_shed( trans.app, repository )
- url = '%s/repository/get_tool_versions?name=%s&owner=%s&changeset_revision=%s&webapp=galaxy' % \
+ url = '%s/repository/get_tool_versions?name=%s&owner=%s&changeset_revision=%s&webapp=galaxy&no_reset=true' % \
( tool_shed_url, repository.name, repository.owner, repository.changeset_revision )
response = urllib2.urlopen( url )
text = response.read()
diff -r 559105c554d540d8137d6583c58b2e237fe1eff4 -r 4ff0dd2aa475275a13c65f183c4bb2595f001941 lib/galaxy/web/controllers/workflow.py
--- a/lib/galaxy/web/controllers/workflow.py
+++ b/lib/galaxy/web/controllers/workflow.py
@@ -1145,7 +1145,7 @@
import_button = True
if tool_shed_url and not import_button:
# Use urllib (send another request to the tool shed) to retrieve the workflow.
- workflow_url = '%s/workflow/import_workflow?repository_metadata_id=%s&workflow_name=%s&webapp=%s&open_for_url=true' % \
+ workflow_url = '%s/workflow/import_workflow?repository_metadata_id=%s&workflow_name=%s&webapp=%s&open_for_url=true&no_reset=true' % \
( tool_shed_url, repository_metadata_id, tool_shed_encode( workflow_name ), webapp )
response = urllib2.urlopen( workflow_url )
workflow_text = response.read()
diff -r 559105c554d540d8137d6583c58b2e237fe1eff4 -r 4ff0dd2aa475275a13c65f183c4bb2595f001941 lib/galaxy/webapps/community/controllers/hg.py
--- a/lib/galaxy/webapps/community/controllers/hg.py
+++ b/lib/galaxy/webapps/community/controllers/hg.py
@@ -16,8 +16,10 @@
# hg clone http://test@127.0.0.1:9009/repos/test/convert_characters1
cmd = kwd.get( 'cmd', None )
wsgi_app = wsgiapplication( make_web_app )
- if cmd == 'listkeys':
- # This results from an "hg push" from the command line. When doing this, the following 7 commands, in order,
+ # Hack: Add a parameter to requests for which we do not want all repository metadata reset.
+ reset_metadata = not ( kwd.get( 'no_reset', False ) )
+ if cmd == 'listkeys' and reset_metadata:
+ # This possibly results from an "hg push" from the command line. When doing this, the following 7 commands, in order,
# will be retrieved from environ: between -> capabilities -> heads -> branchmap -> unbundle -> unbundle -> listkeys
path_info = kwd.get( 'path_info', None )
if path_info:
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: dannon: Extract workflow - fix nested dataset input mapping.
by Bitbucket 30 Apr '12
by Bitbucket 30 Apr '12
30 Apr '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/559105c554d5/
changeset: 559105c554d5
user: dannon
date: 2012-04-30 18:16:09
summary: Extract workflow - fix nested dataset input mapping.
affected #: 1 file
diff -r c542aecc608617645d31c6ce9775f31a93c10bef -r 559105c554d540d8137d6583c58b2e237fe1eff4 lib/galaxy/web/controllers/workflow.py
--- a/lib/galaxy/web/controllers/workflow.py
+++ b/lib/galaxy/web/controllers/workflow.py
@@ -1338,11 +1338,6 @@
tool = trans.app.toolbox.get_tool( job.tool_id )
param_values = job.get_param_values( trans.app )
associations = cleanup_param_values( tool.inputs, param_values )
- # Doing it this way breaks dynamic parameters, backed out temporarily.
- # def extract_callback( input, value, prefixed_name, prefixed_label ):
- # if isinstance( value, UnvalidatedValue ):
- # return str( value )
- # visit_input_values( tool.inputs, param_values, extract_callback )
step = model.WorkflowStep()
step.type = 'tool'
step.tool_id = job.tool_id
@@ -2043,13 +2038,11 @@
group_values = values[key]
for i, rep_values in enumerate( group_values ):
rep_index = rep_values['__index__']
- prefix = "%s_%d|" % ( key, rep_index )
- cleanup( prefix, input.inputs, group_values[i] )
+ cleanup( "%s%s_%d|" % (prefix, key, rep_index ), input.inputs, group_values[i] )
elif isinstance( input, Conditional ):
group_values = values[input.name]
current_case = group_values['__current_case__']
- prefix = "%s|" % ( key )
- cleanup( prefix, input.cases[current_case].inputs, group_values )
+ cleanup( "%s%s|" % ( prefix, key ), input.cases[current_case].inputs, group_values )
cleanup( "", inputs, values )
return associations
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/c542aecc6086/
changeset: c542aecc6086
user: jgoecks
date: 2012-04-30 17:46:43
summary: Revert Tophat wrapper version #.
affected #: 1 file
diff -r 62c900962bb5bd943e2717a7ba74162364b18e1e -r c542aecc608617645d31c6ce9775f31a93c10bef tools/ngs_rna/tophat_wrapper.xml
--- a/tools/ngs_rna/tophat_wrapper.xml
+++ b/tools/ngs_rna/tophat_wrapper.xml
@@ -1,4 +1,4 @@
-<tool id="tophat" name="Tophat for Illumina" version="0.5">
+<tool id="tophat" name="Tophat for Illumina" version="1.5.0"><!-- Wrapper compatible with Tophat versions 1.3.0 to 1.4.1 --><description>Find splice junctions using RNA-seq data</description><version_command>tophat --version</version_command>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: jgoecks: Revert Tophat wrapper due to parameter incompatibility issues.
by Bitbucket 30 Apr '12
by Bitbucket 30 Apr '12
30 Apr '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/62c900962bb5/
changeset: 62c900962bb5
user: jgoecks
date: 2012-04-30 17:41:04
summary: Revert Tophat wrapper due to parameter incompatibility issues.
affected #: 2 files
diff -r fbe02e51b24bdb1d8861920fa984d17b3004f9bd -r 62c900962bb5bd943e2717a7ba74162364b18e1e tools/ngs_rna/tophat_wrapper.py
--- a/tools/ngs_rna/tophat_wrapper.py
+++ b/tools/ngs_rna/tophat_wrapper.py
@@ -52,16 +52,16 @@
supplied GFF file. (ignored without -G)")
parser.add_option( '', '--no-novel-indels', action="store_true", dest='no_novel_indels', help="Skip indel search. Indel search is enabled by default.")
# Types of search.
+ parser.add_option( '', '--microexon-search', action="store_true", dest='microexon_search', help='With this option, the pipeline will attempt to find alignments incident to microexons. Works only for reads 50bp or longer.')
parser.add_option( '', '--closure-search', action="store_true", dest='closure_search', help='Enables the mate pair closure-based search for junctions. Closure-based search should only be used when the expected inner distance between mates is small (<= 50bp)')
parser.add_option( '', '--no-closure-search', action="store_false", dest='closure_search' )
- parser.add_option( '', '--min-closure-exon', dest='min_closure_exon', help='Minimum length for exonic hops in potential splice graph' )
- parser.add_option( '', '--min-closure-intron', dest='min_closure_intron', help='Minimum intron length that may be found during closure search' )
- parser.add_option( '', '--max-closure-intron', dest='max_closure_intron', help='Maximum intron length that may be found during closure search' )
- parser.add_option( '', '--microexon-search', action="store_true", dest='microexon_search', help='With this option, the pipeline will attempt to find alignments incident to microexons. Works only for reads 50bp or longer.')
parser.add_option( '', '--coverage-search', action="store_true", dest='coverage_search', help='Enables the coverage based search for junctions. Use when coverage search is disabled by default (such as for reads 75bp or longer), for maximum sensitivity.')
parser.add_option( '', '--no-coverage-search', action="store_false", dest='coverage_search' )
parser.add_option( '', '--min-segment-intron', dest='min_segment_intron', help='Minimum intron length that may be found during split-segment search' )
parser.add_option( '', '--max-segment-intron', dest='max_segment_intron', help='Maximum intron length that may be found during split-segment search' )
+ parser.add_option( '', '--min-closure-exon', dest='min_closure_exon', help='Minimum length for exonic hops in potential splice graph' )
+ parser.add_option( '', '--min-closure-intron', dest='min_closure_intron', help='Minimum intron length that may be found during closure search' )
+ parser.add_option( '', '--max-closure-intron', dest='max_closure_intron', help='Maximum intron length that may be found during closure search' )
parser.add_option( '', '--min-coverage-intron', dest='min_coverage_intron', help='Minimum intron length that may be found during coverage search' )
parser.add_option( '', '--max-coverage-intron', dest='max_coverage_intron', help='Maximum intron length that may be found during coverage search' )
@@ -73,6 +73,21 @@
(options, args) = parser.parse_args()
+ # output version # of tool
+ try:
+ tmp = tempfile.NamedTemporaryFile().name
+ tmp_stdout = open( tmp, 'wb' )
+ proc = subprocess.Popen( args='tophat -v', shell=True, stdout=tmp_stdout )
+ tmp_stdout.close()
+ returncode = proc.wait()
+ stdout = open( tmp_stdout.name, 'rb' ).readline().strip()
+ if stdout:
+ sys.stdout.write( '%s\n' % stdout )
+ else:
+ raise Exception
+ except:
+ sys.stdout.write( 'Could not determine Tophat version\n' )
+
# Color or base space
space = ''
if options.color_space:
@@ -166,7 +181,7 @@
opts += ' --no-closure-search'
if options.microexon_search:
opts += ' --microexon-search'
- if options.single_paired == 'paired' and options.mate_std_dev:
+ if options.single_paired == 'paired':
opts += ' --mate-std-dev %s' % options.mate_std_dev
if options.initial_read_mismatches:
opts += ' --initial-read-mismatches %d' % int( options.initial_read_mismatches )
diff -r fbe02e51b24bdb1d8861920fa984d17b3004f9bd -r 62c900962bb5bd943e2717a7ba74162364b18e1e tools/ngs_rna/tophat_wrapper.xml
--- a/tools/ngs_rna/tophat_wrapper.xml
+++ b/tools/ngs_rna/tophat_wrapper.xml
@@ -7,111 +7,150 @@
</requirements><command interpreter="python">
tophat_wrapper.py
-
- ## Change this to accommodate the number of threads you have available.
- --num-threads="4"
+ ## Change this to accommodate the number of threads you have available.
+ --num-threads="4"
- ## Provide outputs.
- --junctions-output=$junctions
- --hits-output=$accepted_hits
+ ## Provide outputs.
+ --junctions-output=$junctions
+ --hits-output=$accepted_hits
- ## Handle reference file.
- #if $refGenomeSource.genomeSource == "history":
- --own-file=$refGenomeSource.ownFile
- #else:
- --indexes-path="${refGenomeSource.index.fields.path}"
- #end if
-
- ## Are reads single-end or paired?
- --single-paired=$singlePaired.sPaired
-
- ## First input file always required.
- --input1=$input1
-
- ## Second input only if input is paired-end.
- #if $singlePaired.sPaired == "paired"
- --input2=$singlePaired.input2
- -r $singlePaired.mate_inner_distance
- --mate-std-dev=$singlePaired.mate_std_dev
- #end if
-
- ## Set params.
- --settings=$params.settingsType
- #if $params.settingsType == "full":
- -a $params.anchor_length
- -m $params.splice_mismatches
- -i $params.min_intron_length
- -I $params.max_intron_length
- -g $params.max_multihits
- --min-segment-intron $params.min_segment_intron
- --max-segment-intron $params.max_segment_intron
- --initial-read-mismatches=$params.initial_read_mismatches
- --seg-mismatches=$params.seg_mismatches
- --seg-length=$params.seg_length
- --library-type=$params.library_type
-
- ## Closure search.
- #if $params.closure_search.use_search == "Yes":
- --closure-search
- --min-closure-exon $params.closure_search.min_closure_exon
- --min-closure-intron $params.closure_search.min_closure_intron
- --max-closure-intron $params.closure_search.max_closure_intron
+ ## Handle reference file.
+ #if $refGenomeSource.genomeSource == "history":
+ --own-file=$refGenomeSource.ownFile
#else:
- --no-closure-search
- #end if
-
- ## Indel search.
- #if $params.indel_search.allow_indel_search == "Yes":
- ## --allow-indels
- --max-insertion-length $params.indel_search.max_insertion_length
- --max-deletion-length $params.indel_search.max_deletion_length
- #else:
- --no-novel-indels
+ --indexes-path="${refGenomeSource.index.fields.path}"
#end if
- ## Supplying junctions parameters.
- #if $params.own_junctions.use_junctions == "Yes":
- #if $params.own_junctions.gene_model_ann.use_annotations == "Yes":
- -G $params.own_junctions.gene_model_ann.gene_annotation_model
+ ## Are reads single-end or paired?
+ --single-paired=$singlePaired.sPaired
+
+ ## First input file always required.
+ --input1=$input1
+
+ ## Set params based on whether reads are single-end or paired.
+ #if $singlePaired.sPaired == "single":
+ --settings=$singlePaired.sParams.sSettingsType
+ #if $singlePaired.sParams.sSettingsType == "full":
+ -a $singlePaired.sParams.anchor_length
+ -m $singlePaired.sParams.splice_mismatches
+ -i $singlePaired.sParams.min_intron_length
+ -I $singlePaired.sParams.max_intron_length
+ -g $singlePaired.sParams.max_multihits
+ --min-segment-intron $singlePaired.sParams.min_segment_intron
+ --max-segment-intron $singlePaired.sParams.max_segment_intron
+ --initial-read-mismatches=$singlePaired.sParams.initial_read_mismatches
+ --seg-mismatches=$singlePaired.sParams.seg_mismatches
+ --seg-length=$singlePaired.sParams.seg_length
+ --library-type=$singlePaired.sParams.library_type
+
+ ## Indel search.
+ #if $singlePaired.sParams.indel_search.allow_indel_search == "Yes":
+ ## --allow-indels
+ --max-insertion-length $singlePaired.sParams.indel_search.max_insertion_length
+ --max-deletion-length $singlePaired.sParams.indel_search.max_deletion_length
+ #else:
+ --no-novel-indels
+ #end if
+
+ ## Supplying junctions parameters.
+ #if $singlePaired.sParams.own_junctions.use_junctions == "Yes":
+ #if $singlePaired.sParams.own_junctions.gene_model_ann.use_annotations == "Yes":
+ -G $singlePaired.sParams.own_junctions.gene_model_ann.gene_annotation_model
+ #end if
+ #if $singlePaired.sParams.own_junctions.raw_juncs.use_juncs == "Yes":
+ -j $singlePaired.sParams.own_junctions.raw_juncs.raw_juncs
+ #end if
+ ## TODO: No idea why a string cast is necessary, but it is:
+ #if str($singlePaired.sParams.own_junctions.no_novel_juncs) == "Yes":
+ --no-novel-juncs
+ #end if
+ #end if
+
+ #if $singlePaired.sParams.closure_search.use_search == "Yes":
+ --closure-search
+ --min-closure-exon $singlePaired.sParams.closure_search.min_closure_exon
+ --min-closure-intron $singlePaired.sParams.closure_search.min_closure_intron
+ --max-closure-intron $singlePaired.sParams.closure_search.max_closure_intron
+ #else:
+ --no-closure-search
+ #end if
+ #if $singlePaired.sParams.coverage_search.use_search == "Yes":
+ --coverage-search
+ --min-coverage-intron $singlePaired.sParams.coverage_search.min_coverage_intron
+ --max-coverage-intron $singlePaired.sParams.coverage_search.max_coverage_intron
+ #else:
+ --no-coverage-search
+ #end if
+ ## TODO: No idea why the type conversion is necessary, but it seems to be.
+ #if str($singlePaired.sParams.microexon_search) == "Yes":
+ --microexon-search
+ #end if
#end if
- #if $params.own_junctions.raw_juncs.use_juncs == "Yes":
- -j $params.own_junctions.raw_juncs.raw_juncs
- #end if
- ## TODO: No idea why a string cast is necessary, but it is:
- #if str($params.own_junctions.no_novel_juncs) == "Yes":
- --no-novel-juncs
+ #else:
+ --input2=$singlePaired.input2
+ -r $singlePaired.mate_inner_distance
+ --settings=$singlePaired.pParams.pSettingsType
+ #if $singlePaired.pParams.pSettingsType == "full":
+ --mate-std-dev=$singlePaired.pParams.mate_std_dev
+ -a $singlePaired.pParams.anchor_length
+ -m $singlePaired.pParams.splice_mismatches
+ -i $singlePaired.pParams.min_intron_length
+ -I $singlePaired.pParams.max_intron_length
+ -g $singlePaired.pParams.max_multihits
+ --min-segment-intron $singlePaired.pParams.min_segment_intron
+ --max-segment-intron $singlePaired.pParams.max_segment_intron
+ --initial-read-mismatches=$singlePaired.pParams.initial_read_mismatches
+ --seg-mismatches=$singlePaired.pParams.seg_mismatches
+ --seg-length=$singlePaired.pParams.seg_length
+ --library-type=$singlePaired.pParams.library_type
+
+ ## Indel search.
+ #if $singlePaired.pParams.indel_search.allow_indel_search == "Yes":
+ ## --allow-indels
+ --max-insertion-length $singlePaired.pParams.indel_search.max_insertion_length
+ --max-deletion-length $singlePaired.pParams.indel_search.max_deletion_length
+ #else:
+ --no-novel-indels
+ #end if
+
+ ## Supplying junctions parameters.
+ #if $singlePaired.pParams.own_junctions.use_junctions == "Yes":
+ #if $singlePaired.pParams.own_junctions.gene_model_ann.use_annotations == "Yes":
+ -G $singlePaired.pParams.own_junctions.gene_model_ann.gene_annotation_model
+ #end if
+ #if $singlePaired.pParams.own_junctions.raw_juncs.use_juncs == "Yes":
+ -j $singlePaired.pParams.own_junctions.raw_juncs.raw_juncs
+ #end if
+ ## TODO: No idea why type cast is necessary, but it is:
+ #if str($singlePaired.pParams.own_junctions.no_novel_juncs) == "Yes":
+ --no-novel-juncs
+ #end if
+ #end if
+
+ #if $singlePaired.pParams.closure_search.use_search == "Yes":
+ --closure-search
+ --min-closure-exon $singlePaired.pParams.closure_search.min_closure_exon
+ --min-closure-intron $singlePaired.pParams.closure_search.min_closure_intron
+ --max-closure-intron $singlePaired.pParams.closure_search.max_closure_intron
+ #else:
+ --no-closure-search
+ #end if
+ #if $singlePaired.pParams.coverage_search.use_search == "Yes":
+ --coverage-search
+ --min-coverage-intron $singlePaired.pParams.coverage_search.min_coverage_intron
+ --max-coverage-intron $singlePaired.pParams.coverage_search.max_coverage_intron
+ #else:
+ --no-coverage-search
+ #end if
+ ## TODO: No idea why the type conversion is necessary, but it seems to be.
+ #if str ($singlePaired.pParams.microexon_search) == "Yes":
+ --microexon-search
+ #end if
#end if
#end if
-
- #if $params.coverage_search.use_search == "Yes":
- --coverage-search
- --min-coverage-intron $params.coverage_search.min_coverage_intron
- --max-coverage-intron $params.coverage_search.max_coverage_intron
- #else:
- --no-coverage-search
- #end if
- ## TODO: No idea why the type conversion is necessary, but it seems to be.
- #if str($params.microexon_search) == "Yes":
- --microexon-search
- #end if
- #end if
</command><inputs>
- <conditional name="singlePaired">
- <param name="sPaired" type="select" label="Is this library mate-paired?">
- <option value="single">Single-end</option>
- <option value="paired">Paired-end</option>
- </param>
- <when value="single">
- <param format="fastqsanger" name="input1" type="data" label="RNA-Seq FASTQ dataset" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33"/>
- </when>
- <when value="paired">
- <param format="fastqsanger" name="input1" type="data" label="RNA-Seq FASTQ dataset--forward reads" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33" />
- <param format="fastqsanger" name="input2" type="data" label="RNA-Seq FASTQ dataset--reverse reads" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33" />
- <param name="mate_inner_distance" type="integer" value="20" label="Mean Inner Distance between Mate Pairs" />
- <param name="mate_std_dev" type="integer" value="20" label="Std. Dev for Distance between Mate Pairs" help="The standard deviation for the distribution on inner distances between mate pairs."/>
- </when>
- </conditional>
+ <param format="fastqsanger" name="input1" type="data" label="RNA-Seq FASTQ file" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33" /><conditional name="refGenomeSource"><param name="genomeSource" type="select" label="Will you select a reference genome from your history or use a built-in index?" help="Built-ins were indexed using default options"><option value="indexed">Use a built-in index</option>
@@ -129,109 +168,221 @@
<param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select the reference genome" /></when><!-- history --></conditional><!-- refGenomeSource -->
- <conditional name="params">
- <param name="settingsType" type="select" label="TopHat settings to use" help="You can use the default settings or set custom values for any of Tophat's parameters.">
- <option value="preSet">Use Defaults</option>
- <option value="full">Full parameter list</option>
+ <conditional name="singlePaired">
+ <param name="sPaired" type="select" label="Is this library mate-paired?">
+ <option value="single">Single-end</option>
+ <option value="paired">Paired-end</option></param>
- <when value="preSet" />
- <!-- Full/advanced params. -->
- <when value="full">
- <param name="library_type" type="select" label="Library Type" help="TopHat will treat the reads as strand specific. Every read alignment will have an XS attribute tag. Consider supplying library type options below to select the correct RNA-seq protocol.">
- <option value="fr-unstranded">FR Unstranded</option>
- <option value="fr-firststrand">FR First Strand</option>
- <option value="fr-secondstrand">FR Second Strand</option>
- </param>
- <param name="anchor_length" type="integer" value="8" label="Anchor length (at least 3)" help="Report junctions spanned by reads with at least this many bases on each side of the junction." />
- <param name="splice_mismatches" type="integer" value="0" label="Maximum number of mismatches that can appear in the anchor region of spliced alignment" />
- <param name="min_intron_length" type="integer" value="70" label="The minimum intron length" help="TopHat will ignore donor/acceptor pairs closer than this many bases apart." />
- <param name="max_intron_length" type="integer" value="500000" label="The maximum intron length" help="When searching for junctions ab initio, TopHat will ignore donor/acceptor pairs farther than this many bases apart, except when such a pair is supported by a split segment alignment of a long read." />
- <conditional name="indel_search">
- <param name="allow_indel_search" type="select" label="Allow indel search">
+ <when value="single">
+ <conditional name="sParams">
+ <param name="sSettingsType" type="select" label="TopHat settings to use" help="You can use the default settings or set custom values for any of Tophat's parameters.">
+ <option value="preSet">Use Defaults</option>
+ <option value="full">Full parameter list</option>
+ </param>
+ <when value="preSet" />
+ <!-- Full/advanced params. -->
+ <when value="full">
+ <param name="library_type" type="select" label="Library Type" help="TopHat will treat the reads as strand specific. Every read alignment will have an XS attribute tag. Consider supplying library type options below to select the correct RNA-seq protocol.">
+ <option value="fr-unstranded">FR Unstranded</option>
+ <option value="fr-firststrand">FR First Strand</option>
+ <option value="fr-secondstrand">FR Second Strand</option>
+ </param>
+ <param name="anchor_length" type="integer" value="8" label="Anchor length (at least 3)" help="Report junctions spanned by reads with at least this many bases on each side of the junction." />
+ <param name="splice_mismatches" type="integer" value="0" label="Maximum number of mismatches that can appear in the anchor region of spliced alignment" />
+ <param name="min_intron_length" type="integer" value="70" label="The minimum intron length" help="TopHat will ignore donor/acceptor pairs closer than this many bases apart." />
+ <param name="max_intron_length" type="integer" value="500000" label="The maximum intron length" help="When searching for junctions ab initio, TopHat will ignore donor/acceptor pairs farther than this many bases apart, except when such a pair is supported by a split segment alignment of a long read." />
+ <conditional name="indel_search">
+ <param name="allow_indel_search" type="select" label="Allow indel search">
+ <option value="Yes">Yes</option>
+ <option value="No">No</option>
+ </param>
+ <when value="No"/>
+ <when value="Yes">
+ <param name="max_insertion_length" type="integer" value="3" label="Max insertion length." help="The maximum insertion length." />
+ <param name="max_deletion_length" type="integer" value="3" label="Max deletion length." help="The maximum deletion length." />
+ </when>
+ </conditional>
+alignments (number of reads divided by average depth of coverage)" help="0.0 to 1.0 (0 to turn off)" />
+ <param name="max_multihits" type="integer" value="20" label="Maximum number of alignments to be allowed" />
+ <param name="min_segment_intron" type="integer" value="50" label="Minimum intron length that may be found during split-segment (default) search" />
+ <param name="max_segment_intron" type="integer" value="500000" label="Maximum intron length that may be found during split-segment (default) search" />
+ <param name="initial_read_mismatches" type="integer" min="0" value="2" label="Number of mismatches allowed in the initial read mapping" />
+ <param name="seg_mismatches" type="integer" min="0" max="3" value="2" label="Number of mismatches allowed in each segment alignment for reads mapped independently" />
+ <param name="seg_length" type="integer" value="25" label="Minimum length of read segments" />
+
+ <!-- Options for supplying own junctions. -->
+ <conditional name="own_junctions">
+ <param name="use_junctions" type="select" label="Use Own Junctions">
+ <option value="No">No</option>
+ <option value="Yes">Yes</option>
+ </param>
+ <when value="Yes">
+ <conditional name="gene_model_ann">
+ <param name="use_annotations" type="select" label="Use Gene Annotation Model">
+ <option value="No">No</option>
+ <option value="Yes">Yes</option>
+ </param>
+ <when value="No" />
+ <when value="Yes">
+ <param format="gtf" name="gene_annotation_model" type="data" label="Gene Model Annotations" help="TopHat will use the exon records in this file to build a set of known splice junctions for each gene, and will attempt to align reads to these junctions even if they would not normally be covered by the initial mapping."/>
+ </when>
+ </conditional>
+ <conditional name="raw_juncs">
+ <param name="use_juncs" type="select" label="Use Raw Junctions">
+ <option value="No">No</option>
+ <option value="Yes">Yes</option>
+ </param>
+ <when value="No" />
+ <when value="Yes">
+ <param format="interval" name="raw_juncs" type="data" label="Raw Junctions" help="Supply TopHat with a list of raw junctions. Junctions are specified one per line, in a tab-delimited format. Records look like: [chrom] [left] [right] [+/-] left and right are zero-based coordinates, and specify the last character of the left sequenced to be spliced to the first character of the right sequence, inclusive."/>
+ </when>
+ </conditional>
+ <param name="no_novel_juncs" type="select" label="Only look for supplied junctions">
+ <option value="No">No</option>
+ <option value="Yes">Yes</option>
+ </param>
+ </when>
+ <when value="No" />
+ </conditional><!-- /own_junctions -->
+
+ <!-- Closure search. -->
+ <conditional name="closure_search">
+ <param name="use_search" type="select" label="Use Closure Search">
+ <option value="No">No</option><option value="Yes">Yes</option>
- <option value="No">No</option>
- </param>
- <when value="No"/>
- <when value="Yes">
- <param name="max_insertion_length" type="integer" value="3" label="Max insertion length." help="The maximum insertion length." />
- <param name="max_deletion_length" type="integer" value="3" label="Max deletion length." help="The maximum deletion length." />
- </when>
- </conditional>
- alignments (number of reads divided by average depth of coverage)" help="0.0 to 1.0 (0 to turn off)" />
- <param name="max_multihits" type="integer" value="20" label="Maximum number of alignments to be allowed" />
- <param name="min_segment_intron" type="integer" value="50" label="Minimum intron length that may be found during split-segment (default) search" />
- <param name="max_segment_intron" type="integer" value="500000" label="Maximum intron length that may be found during split-segment (default) search" />
- <param name="initial_read_mismatches" type="integer" min="0" value="2" label="Number of mismatches allowed in the initial read mapping" />
- <param name="seg_mismatches" type="integer" min="0" max="3" value="2" label="Number of mismatches allowed in each segment alignment for reads mapped independently" />
- <param name="seg_length" type="integer" value="25" label="Minimum length of read segments" />
-
- <!-- Options for supplying own junctions. -->
- <conditional name="own_junctions">
- <param name="use_junctions" type="select" label="Use Own Junctions">
+ </param>
+ <when value="Yes">
+ <param name="min_closure_exon" type="integer" value="50" label="During closure search for paired end reads, exonic hops in the potential splice graph must be at least this long. The default is 50." />
+ <param name="min_closure_intron" type="integer" value="50" label="Minimum intron length that may be found during closure search" />
+ <param name="max_closure_intron" type="integer" value="5000" label="Maximum intron length that may be found during closure search" />
+ </when>
+ <when value="No" />
+ </conditional>
+ <!-- Coverage search. -->
+ <conditional name="coverage_search">
+ <param name="use_search" type="select" label="Use Coverage Search">
+ <option selected="true" value="Yes">Yes</option>
+ <option value="No">No</option>
+ </param>
+ <when value="Yes">
+ <param name="min_coverage_intron" type="integer" value="50" label="Minimum intron length that may be found during coverage search" />
+ <param name="max_coverage_intron" type="integer" value="20000" label="Maximum intron length that may be found during coverage search" />
+ </when>
+ <when value="No" />
+ </conditional>
+ <param name="microexon_search" type="select" label="Use Microexon Search" help="With this option, the pipeline will attempt to find alignments incident to microexons. Works only for reads 50bp or longer."><option value="No">No</option><option value="Yes">Yes</option></param>
- <when value="Yes">
- <conditional name="gene_model_ann">
- <param name="use_annotations" type="select" label="Use Gene Annotation Model">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- <when value="No" />
- <when value="Yes">
- <param format="gtf" name="gene_annotation_model" type="data" label="Gene Model Annotations" help="TopHat will use the exon records in this file to build a set of known splice junctions for each gene, and will attempt to align reads to these junctions even if they would not normally be covered by the initial mapping."/>
- </when>
- </conditional>
- <conditional name="raw_juncs">
- <param name="use_juncs" type="select" label="Use Raw Junctions">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- <when value="No" />
- <when value="Yes">
- <param format="interval" name="raw_juncs" type="data" label="Raw Junctions" help="Supply TopHat with a list of raw junctions. Junctions are specified one per line, in a tab-delimited format. Records look like: [chrom] [left] [right] [+/-] left and right are zero-based coordinates, and specify the last character of the left sequenced to be spliced to the first character of the right sequence, inclusive."/>
- </when>
- </conditional>
- <param name="no_novel_juncs" type="select" label="Only look for supplied junctions">
+ </when><!-- full -->
+ </conditional><!-- sParams -->
+ </when><!-- single -->
+ <when value="paired">
+ <param format="fastqsanger" name="input2" type="data" label="RNA-Seq FASTQ file" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33" />
+ <param name="mate_inner_distance" type="integer" value="20" label="Mean Inner Distance between Mate Pairs" />
+ <conditional name="pParams">
+ <param name="pSettingsType" type="select" label="TopHat settings to use" help="For most mapping needs use Commonly used settings. If you want full control use Full parameter list">
+ <option value="preSet">Commonly used</option>
+ <option value="full">Full parameter list</option>
+ </param>
+ <when value="preSet" />
+ <!-- Full/advanced params. -->
+ <when value="full">
+ <param name="library_type" type="select" label="Library Type" help="TopHat will treat the reads as strand specific. Every read alignment will have an XS attribute tag. Consider supplying library type options below to select the correct RNA-seq protocol.">
+ <option value="fr-unstranded">FR Unstranded</option>
+ <option value="fr-firststrand">FR First Strand</option>
+ <option value="fr-secondstrand">FR Second Strand</option>
+ </param>
+ <param name="mate_std_dev" type="integer" value="20" label="Std. Dev for Distance between Mate Pairs" help="The standard deviation for the distribution on inner distances between mate pairs."/>
+ <param name="anchor_length" type="integer" value="8" label="Anchor length (at least 3)" help="Report junctions spanned by reads with at least this many bases on each side of the junction." />
+ <param name="splice_mismatches" type="integer" value="0" label="Maximum number of mismatches that can appear in the anchor region of spliced alignment" />
+ <param name="min_intron_length" type="integer" value="70" label="The minimum intron length" help="TopHat will ignore donor/acceptor pairs closer than this many bases apart." />
+ <param name="max_intron_length" type="integer" value="500000" label="The maximum intron length" help="When searching for junctions ab initio, TopHat will ignore donor/acceptor pairs farther than this many bases apart, except when such a pair is supported by a split segment alignment of a long read." />
+ <conditional name="indel_search">
+ <param name="allow_indel_search" type="select" label="Allow indel search">
+ <option value="Yes">Yes</option>
+ <option value="No">No</option>
+ </param>
+ <when value="No"/>
+ <when value="Yes">
+ <param name="max_insertion_length" type="integer" value="3" label="Max insertion length." help="The maximum insertion length." />
+ <param name="max_deletion_length" type="integer" value="3" label="Max deletion length." help="The maximum deletion length." />
+ </when>
+ </conditional>
+ <param name="max_multihits" type="integer" value="20" label="Maximum number of alignments to be allowed" />
+ <param name="min_segment_intron" type="integer" value="50" label="Minimum intron length that may be found during split-segment (default) search" />
+ <param name="max_segment_intron" type="integer" value="500000" label="Maximum intron length that may be found during split-segment (default) search" />
+ <param name="initial_read_mismatches" type="integer" min="0" value="2" label="Number of mismatches allowed in the initial read mapping" />
+ <param name="seg_mismatches" type="integer" min="0" max="3" value="2" label="Number of mismatches allowed in each segment alignment for reads mapped independently" />
+ <param name="seg_length" type="integer" value="25" label="Minimum length of read segments" />
+ <!-- Options for supplying own junctions. -->
+ <conditional name="own_junctions">
+ <param name="use_junctions" type="select" label="Use Own Junctions"><option value="No">No</option><option value="Yes">Yes</option></param>
- </when>
- <when value="No" />
- </conditional><!-- /own_junctions -->
-
- <!-- Closure search. -->
- <conditional name="closure_search">
- <param name="use_search" type="select" label="Use Closure Search">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- <when value="Yes">
- <param name="min_closure_exon" type="integer" value="50" label="During closure search for paired end reads, exonic hops in the potential splice graph must be at least this long. The default is 50." />
- <param name="min_closure_intron" type="integer" value="50" label="Minimum intron length that may be found during closure search" />
- <param name="max_closure_intron" type="integer" value="5000" label="Maximum intron length that may be found during closure search" />
- </when>
- <when value="No" />
- </conditional>
-
- <!-- Coverage search. -->
- <conditional name="coverage_search">
- <param name="use_search" type="select" label="Use Coverage Search">
- <option selected="true" value="Yes">Yes</option>
+ <when value="Yes">
+ <conditional name="gene_model_ann">
+ <param name="use_annotations" type="select" label="Use Gene Annotation Model">
+ <option value="No">No</option>
+ <option value="Yes">Yes</option>
+ </param>
+ <when value="No" />
+ <when value="Yes">
+ <param format="gtf" name="gene_annotation_model" type="data" label="Gene Model Annotations" help="TopHat will use the exon records in this file to build a set of known splice junctions for each gene, and will attempt to align reads to these junctions even if they would not normally be covered by the initial mapping."/>
+ </when>
+ </conditional>
+ <conditional name="raw_juncs">
+ <param name="use_juncs" type="select" label="Use Raw Junctions">
+ <option value="No">No</option>
+ <option value="Yes">Yes</option>
+ </param>
+ <when value="No" />
+ <when value="Yes">
+ <param format="interval" name="raw_juncs" type="data" label="Raw Junctions" help="Supply TopHat with a list of raw junctions. Junctions are specified one per line, in a tab-delimited format. Records look like: [chrom] [left] [right] [+/-] left and right are zero-based coordinates, and specify the last character of the left sequenced to be spliced to the first character of the right sequence, inclusive."/>
+ </when>
+ </conditional>
+ <param name="no_novel_juncs" type="select" label="Only look for supplied junctions">
+ <option value="No">No</option>
+ <option value="Yes">Yes</option>
+ </param>
+ </when>
+ <when value="No" />
+ </conditional><!-- /own_junctions -->
+
+ <!-- Closure search. -->
+ <conditional name="closure_search">
+ <param name="use_search" type="select" label="Use Closure Search">
+ <option value="No">No</option>
+ <option value="Yes">Yes</option>
+ </param>
+ <when value="Yes">
+ <param name="min_closure_exon" type="integer" value="50" label="During closure search for paired end reads, exonic hops in the potential splice graph must be at least this long. The default is 50." />
+ <param name="min_closure_intron" type="integer" value="50" label="Minimum intron length that may be found during closure search" />
+ <param name="max_closure_intron" type="integer" value="5000" label="Maximum intron length that may be found during closure search" />
+ </when>
+ <when value="No" />
+ </conditional>
+ <!-- Coverage search. -->
+ <conditional name="coverage_search">
+ <param name="use_search" type="select" label="Use Coverage Search">
+ <option selected="true" value="Yes">Yes</option>
+ <option value="No">No</option>
+ </param>
+ <when value="Yes">
+ <param name="min_coverage_intron" type="integer" value="50" label="Minimum intron length that may be found during coverage search" />
+ <param name="max_coverage_intron" type="integer" value="20000" label="Maximum intron length that may be found during coverage search" />
+ </when>
+ <when value="No" />
+ </conditional>
+ <param name="microexon_search" type="select" label="Use Microexon Search" help="With this option, the pipeline will attempt to find alignments incident to microexons. Works only for reads 50bp or longer."><option value="No">No</option>
- </param>
- <when value="Yes">
- <param name="min_coverage_intron" type="integer" value="50" label="Minimum intron length that may be found during coverage search" />
- <param name="max_coverage_intron" type="integer" value="20000" label="Maximum intron length that may be found during coverage search" />
- </when>
- <when value="No" />
- </conditional>
- <param name="microexon_search" type="select" label="Use Microexon Search" help="With this option, the pipeline will attempt to find alignments incident to microexons. Works only for reads 50bp or longer.">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- </when><!-- full -->
- </conditional><!-- params -->
+ <option value="Yes">Yes</option>
+ </param>
+ </when><!-- full -->
+ </conditional><!-- pParams -->
+ </when><!-- paired -->
+ </conditional></inputs><outputs>
@@ -320,11 +471,11 @@
tophat -o tmp_dir -p 1 tophat_in1 test-data/tophat_in2.fastqsanger
Rename the files in tmp_dir appropriately
-->
- <param name="sPaired" value="single" /><param name="input1" ftype="fastqsanger" value="tophat_in2.fastqsanger" /><param name="genomeSource" value="indexed" /><param name="index" value="tophat_test" />
- <param name="settingsType" value="preSet" />
+ <param name="sPaired" value="single" />
+ <param name="sSettingsType" value="preSet" /><output name="junctions" file="tophat_out1j.bed" /><output name="accepted_hits" file="tophat_out1h.bam" compare="sim_size" /></test>
@@ -335,13 +486,13 @@
tophat -o tmp_dir -p 1 -r 20 tophat_in1 test-data/tophat_in2.fastqsanger test-data/tophat_in3.fastqsanger
Rename the files in tmp_dir appropriately
-->
- <param name="sPaired" value="paired" /><param name="input1" ftype="fastqsanger" value="tophat_in2.fastqsanger" />
- <param name="input2" ftype="fastqsanger" value="tophat_in3.fastqsanger" /><param name="genomeSource" value="history" /><param name="ownFile" ftype="fasta" value="tophat_in1.fasta" />
+ <param name="sPaired" value="paired" />
+ <param name="input2" ftype="fastqsanger" value="tophat_in3.fastqsanger" /><param name="mate_inner_distance" value="20" />
- <param name="settingsType" value="preSet" />
+ <param name="pSettingsType" value="preSet" /><output name="junctions" file="tophat_out2j.bed" /><output name="accepted_hits" file="tophat_out2h.bam" compare="sim_size" /></test>
@@ -349,15 +500,15 @@
<test><!-- Tophat commands:
bowtie-build -f test-data/tophat_in1.fasta tophat_in1
- tophat -o tmp_dir -p 1 -a 8 -m 0 -i 70 -I 500000 -F 0.15 -g 40 +coverage-search +min-coverage-intron 50 +max-coverage-intro 20000 +segment-mismatches 2 +segment-length 25 +microexon-search tophat_in1 test-data/tophat_in2.fastqsanger
+ tophat -o tmp_dir -p 1 -a 8 -m 0 -i 70 -I 500000 -F 0.15 -g 40 +coverage-search +min-coverage-intron 50 +max-coverage-intro 20000 +segment-mismatches 2 +segment-length 25 +closure-search +min-closure-exon 50 +min-closure-intron 50 +max-closure-intro 5000 +microexon-search tophat_in1 test-data/tophat_in2.fastqsanger
Replace the + with double-dash
Rename the files in tmp_dir appropriately
-->
- <param name="sPaired" value="single"/><param name="input1" ftype="fastqsanger" value="tophat_in2.fastqsanger"/><param name="genomeSource" value="history"/><param name="ownFile" value="tophat_in1.fasta"/>
- <param name="settingsType" value="full"/>
+ <param name="sPaired" value="single"/>
+ <param name="sSettingsType" value="full"/><param name="library_type" value="FR Unstranded"/><param name="anchor_length" value="8"/><param name="splice_mismatches" value="0"/>
@@ -395,13 +546,13 @@
Replace the + with double-dash
Rename the files in tmp_dir appropriately
-->
- <param name="sPaired" value="paired"/><param name="input1" ftype="fastqsanger" value="tophat_in2.fastqsanger"/>
- <param name="input2" ftype="fastqsanger" value="tophat_in3.fastqsanger"/><param name="genomeSource" value="indexed"/><param name="index" value="tophat_test"/>
+ <param name="sPaired" value="paired"/>
+ <param name="input2" ftype="fastqsanger" value="tophat_in3.fastqsanger"/><param name="mate_inner_distance" value="20"/>
- <param name="settingsType" value="full"/>
+ <param name="pSettingsType" value="full"/><param name="library_type" value="FR Unstranded"/><param name="mate_std_dev" value="20"/><param name="anchor_length" value="8"/>
@@ -493,15 +644,16 @@
-j/--raw-juncs [juncs file] Supply TopHat with a list of raw junctions. Junctions are specified one per line, in a tab-delimited format. Records look like: [chrom] [left] [right] [+/-], left and right are zero-based coordinates, and specify the last character of the left sequenced to be spliced to the first character of the right sequence, inclusive.
-no-novel-juncs Only look for junctions indicated in the supplied GFF file. (ignored without -G)
--no-closure-search Disables the mate pair closure-based search for junctions. Currently, has no effect - closure search is off by default.
- --closure-search Enables the mate pair closure-based search for junctions. Closure-based search should only be used when the
- --min-closure-exon During closure search for paired end reads, exonic hops in the potential splice graph must be at least this long. The default is 50.
- --min-closure-intron The minimum intron length that may be found during closure search. The default is 50.
- --max-closure-intron The maximum intron length that may be found during closure search. The default is 5000. expected inner distance between mates is small (about or less than 50bp)
+ --closure-search Enables the mate pair closure-based search for junctions. Closure-based search should only be used when the expected inner distance between mates is small (about or less than 50bp)
--no-coverage-search Disables the coverage based search for junctions.
--coverage-search Enables the coverage based search for junctions. Use when coverage search is disabled by default (such as for reads 75bp or longer), for maximum sensitivity.
--microexon-search With this option, the pipeline will attempt to find alignments incident to microexons. Works only for reads 50bp or longer.
+ --butterfly-search TopHat will use a slower but potentially more sensitive algorithm to find junctions in addition to its standard search. Consider using this if you expect that your experiment produced a lot of reads from pre-mRNA, that fall within the introns of your transcripts.
--segment-mismatches Read segments are mapped independently, allowing up to this many mismatches in each segment alignment. The default is 2.
--segment-length Each read is cut up into segments, each at least this long. These segments are mapped independently. The default is 25.
+ --min-closure-exon During closure search for paired end reads, exonic hops in the potential splice graph must be at least this long. The default is 50.
+ --min-closure-intron The minimum intron length that may be found during closure search. The default is 50.
+ --max-closure-intron The maximum intron length that may be found during closure search. The default is 5000.
--min-coverage-intron The minimum intron length that may be found during coverage search. The default is 50.
--max-coverage-intron The maximum intron length that may be found during coverage search. The default is 20000.
--min-segment-intron The minimum intron length that may be found during split-segment search. The default is 50.
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: greg: Fixes for some requests sent from Galaxy to a tool shed.
by Bitbucket 30 Apr '12
by Bitbucket 30 Apr '12
30 Apr '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/fbe02e51b24b/
changeset: fbe02e51b24b
user: greg
date: 2012-04-30 17:00:07
summary: Fixes for some requests sent from Galaxy to a tool shed.
affected #: 1 file
diff -r dd01d42e4da3f2bd8535707cdd6d4322ae9d516c -r fbe02e51b24bdb1d8861920fa984d17b3004f9bd lib/galaxy/web/controllers/admin_toolshed.py
--- a/lib/galaxy/web/controllers/admin_toolshed.py
+++ b/lib/galaxy/web/controllers/admin_toolshed.py
@@ -149,7 +149,7 @@
def browse_tool_shed( self, trans, **kwd ):
tool_shed_url = kwd[ 'tool_shed_url' ]
galaxy_url = url_for( '/', qualified=True )
- url = '%s/repository/browse_valid_repositories?galaxy_url=%s&webapp=galaxy' % ( tool_shed_url, galaxy_url )
+ url = '%srepository/browse_valid_repositories?galaxy_url=%s&webapp=galaxy' % ( tool_shed_url, galaxy_url )
return trans.response.send_redirect( url )
@web.expose
@web.require_admin
@@ -218,14 +218,14 @@
def find_tools_in_tool_shed( self, trans, **kwd ):
tool_shed_url = kwd[ 'tool_shed_url' ]
galaxy_url = url_for( '/', qualified=True )
- url = '%s/repository/find_tools?galaxy_url=%s&webapp=galaxy' % ( tool_shed_url, galaxy_url )
+ url = '%srepository/find_tools?galaxy_url=%s&webapp=galaxy' % ( tool_shed_url, galaxy_url )
return trans.response.send_redirect( url )
@web.expose
@web.require_admin
def find_workflows_in_tool_shed( self, trans, **kwd ):
tool_shed_url = kwd[ 'tool_shed_url' ]
galaxy_url = url_for( '/', qualified=True )
- url = '%s/repository/find_workflows?galaxy_url=%s&webapp=galaxy' % ( tool_shed_url, galaxy_url )
+ url = '%srepository/find_workflows?galaxy_url=%s&webapp=galaxy' % ( tool_shed_url, galaxy_url )
return trans.response.send_redirect( url )
@web.expose
@web.require_admin
@@ -318,7 +318,7 @@
shed_tool_conf=shed_tool_conf )
if 'tools' in metadata_dict:
# Get the tool_versions from the tool shed for each tool in the installed change set.
- url = '%s/repository/get_tool_versions?name=%s&owner=%s&changeset_revision=%s&webapp=galaxy' % \
+ url = '%srepository/get_tool_versions?name=%s&owner=%s&changeset_revision=%s&webapp=galaxy' % \
( tool_shed_url, name, owner, changeset_revision )
response = urllib2.urlopen( url )
text = response.read()
@@ -367,7 +367,7 @@
repo_info_tuple = decoded_repo_info_dict[ name ]
description, repository_clone_url, changeset_revision, ctx_rev = repo_info_tuple
owner = get_repository_owner( clean_repository_clone_url( repository_clone_url ) )
- url = '%s/repository/get_readme?name=%s&owner=%s&changeset_revision=%s&webapp=galaxy' % ( tool_shed_url, name, owner, changeset_revision )
+ url = '%srepository/get_readme?name=%s&owner=%s&changeset_revision=%s&webapp=galaxy' % ( tool_shed_url, name, owner, changeset_revision )
response = urllib2.urlopen( url )
raw_text = response.read()
response.close()
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/1d6324d630ed/
changeset: 1d6324d630ed
user: jgoecks
date: 2012-04-29 04:21:30
summary: Update Cuffdiff min-alignment-count default.
affected #: 1 file
diff -r 51fccbc2e9bc401c83b52447b513e201fe776ba2 -r 1d6324d630ed3c9109d6240d7186c9f99d778005 tools/ngs_rna/cuffdiff_wrapper.xml
--- a/tools/ngs_rna/cuffdiff_wrapper.xml
+++ b/tools/ngs_rna/cuffdiff_wrapper.xml
@@ -89,7 +89,7 @@
</conditional><param name="fdr" type="float" value="0.05" label="False Discovery Rate" help="The allowed false discovery rate."/>
- <param name="min_alignment_count" type="integer" value="1000" label="Min Alignment Count" help="The minimum number of alignments in a locus for needed to conduct significance testing on changes in that locus observed between samples."/>
+ <param name="min_alignment_count" type="integer" value="10" label="Min Alignment Count" help="The minimum number of alignments in a locus for needed to conduct significance testing on changes in that locus observed between samples."/><param name="do_normalization" type="select" label="Perform quartile normalization" help="Removes top 25% of genes from FPKM denominator to improve accuracy of differential expression calls for low abundance transcripts."><option value="No">No</option><option value="Yes">Yes</option>
https://bitbucket.org/galaxy/galaxy-central/changeset/dd01d42e4da3/
changeset: dd01d42e4da3
user: jgoecks
date: 2012-04-30 02:34:39
summary: Merge
affected #: 4 files
diff -r 1d6324d630ed3c9109d6240d7186c9f99d778005 -r dd01d42e4da3f2bd8535707cdd6d4322ae9d516c lib/galaxy/datatypes/converters/sam_to_bam.py
--- /dev/null
+++ b/lib/galaxy/datatypes/converters/sam_to_bam.py
@@ -0,0 +1,69 @@
+#!/usr/bin/env python
+#Dan Blankenberg
+
+"""
+A wrapper script for converting SAM to BAM, with sorting.
+%prog input_filename.sam output_filename.bam
+"""
+
+import sys, optparse, os, tempfile, subprocess, shutil
+
+CHUNK_SIZE = 2**20 #1mb
+
+
+def cleanup_before_exit( tmp_dir ):
+ if tmp_dir and os.path.exists( tmp_dir ):
+ shutil.rmtree( tmp_dir )
+
+def __main__():
+ #Parse Command Line
+ parser = optparse.OptionParser()
+ (options, args) = parser.parse_args()
+
+ assert len( args ) == 2, 'You must specify the input and output filenames'
+ input_filename, output_filename = args
+
+ tmp_dir = tempfile.mkdtemp( prefix='tmp-sam_to_bam_converter-' )
+
+ #convert to SAM
+ unsorted_bam_filename = os.path.join( tmp_dir, 'unsorted.bam' )
+ unsorted_stderr_filename = os.path.join( tmp_dir, 'unsorted.stderr' )
+ cmd = 'samtools view -bS "%s" > "%s"' % ( input_filename, unsorted_bam_filename )
+ proc = subprocess.Popen( args=cmd, stderr=open( unsorted_stderr_filename, 'wb' ), shell=True, cwd=tmp_dir )
+ return_code = proc.wait()
+ if return_code:
+ stderr_target = sys.stderr
+ else:
+ stderr_target = sys.stdout
+ stderr = open( unsorted_stderr_filename )
+ while True:
+ chunk = stderr.read( CHUNK_SIZE )
+ if chunk:
+ stderr_target.write( chunk )
+ else:
+ break
+ stderr.close()
+
+ #sort sam, so indexing will not fail
+ sorted_stderr_filename = os.path.join( tmp_dir, 'sorted.stderr' )
+ sorting_prefix = os.path.join( tmp_dir, 'sorted_bam' )
+ cmd = 'samtools sort -o "%s" "%s" > "%s"' % ( unsorted_bam_filename, sorting_prefix, output_filename )
+ proc = subprocess.Popen( args=cmd, stderr=open( sorted_stderr_filename, 'wb' ), shell=True, cwd=tmp_dir )
+ return_code = proc.wait()
+
+ if return_code:
+ stderr_target = sys.stderr
+ else:
+ stderr_target = sys.stdout
+ stderr = open( sorted_stderr_filename )
+ while True:
+ chunk = stderr.read( CHUNK_SIZE )
+ if chunk:
+ stderr_target.write( chunk )
+ else:
+ break
+ stderr.close()
+
+ cleanup_before_exit( tmp_dir )
+
+if __name__=="__main__": __main__()
diff -r 1d6324d630ed3c9109d6240d7186c9f99d778005 -r dd01d42e4da3f2bd8535707cdd6d4322ae9d516c lib/galaxy/datatypes/converters/sam_to_bam.xml
--- a/lib/galaxy/datatypes/converters/sam_to_bam.xml
+++ b/lib/galaxy/datatypes/converters/sam_to_bam.xml
@@ -1,11 +1,11 @@
-<tool id="CONVERTER_sam_to_bam" name="Convert SAM to BAM" version="1.0.0">
+<tool id="CONVERTER_sam_to_bam" name="Convert SAM to BAM" version="2.0.0"><!-- <description>__NOT_USED_CURRENTLY_FOR_CONVERTERS__</description> --><!-- Used on the metadata edit page. --><!-- FIXME: conversion will only work if headers for reference sequences are in input file.
To fix this: (a) merge sam_to_bam tool in tools with this conversion (like fasta_to_len
conversion); and (b) define a datatype-specific way to set converter parameters.
-->
- <command>samtools view -bS $input1 > $output 2> /dev/null </command>
+ <command interpreter="python">sam_to_bam.py $input1 $output</command><inputs><param name="input1" type="data" format="sam" label="SAM file"/></inputs>
diff -r 1d6324d630ed3c9109d6240d7186c9f99d778005 -r dd01d42e4da3f2bd8535707cdd6d4322ae9d516c tools/ngs_rna/tophat_wrapper.py
--- a/tools/ngs_rna/tophat_wrapper.py
+++ b/tools/ngs_rna/tophat_wrapper.py
@@ -52,16 +52,16 @@
supplied GFF file. (ignored without -G)")
parser.add_option( '', '--no-novel-indels', action="store_true", dest='no_novel_indels', help="Skip indel search. Indel search is enabled by default.")
# Types of search.
- parser.add_option( '', '--microexon-search', action="store_true", dest='microexon_search', help='With this option, the pipeline will attempt to find alignments incident to microexons. Works only for reads 50bp or longer.')
parser.add_option( '', '--closure-search', action="store_true", dest='closure_search', help='Enables the mate pair closure-based search for junctions. Closure-based search should only be used when the expected inner distance between mates is small (<= 50bp)')
parser.add_option( '', '--no-closure-search', action="store_false", dest='closure_search' )
+ parser.add_option( '', '--min-closure-exon', dest='min_closure_exon', help='Minimum length for exonic hops in potential splice graph' )
+ parser.add_option( '', '--min-closure-intron', dest='min_closure_intron', help='Minimum intron length that may be found during closure search' )
+ parser.add_option( '', '--max-closure-intron', dest='max_closure_intron', help='Maximum intron length that may be found during closure search' )
+ parser.add_option( '', '--microexon-search', action="store_true", dest='microexon_search', help='With this option, the pipeline will attempt to find alignments incident to microexons. Works only for reads 50bp or longer.')
parser.add_option( '', '--coverage-search', action="store_true", dest='coverage_search', help='Enables the coverage based search for junctions. Use when coverage search is disabled by default (such as for reads 75bp or longer), for maximum sensitivity.')
parser.add_option( '', '--no-coverage-search', action="store_false", dest='coverage_search' )
parser.add_option( '', '--min-segment-intron', dest='min_segment_intron', help='Minimum intron length that may be found during split-segment search' )
parser.add_option( '', '--max-segment-intron', dest='max_segment_intron', help='Maximum intron length that may be found during split-segment search' )
- parser.add_option( '', '--min-closure-exon', dest='min_closure_exon', help='Minimum length for exonic hops in potential splice graph' )
- parser.add_option( '', '--min-closure-intron', dest='min_closure_intron', help='Minimum intron length that may be found during closure search' )
- parser.add_option( '', '--max-closure-intron', dest='max_closure_intron', help='Maximum intron length that may be found during closure search' )
parser.add_option( '', '--min-coverage-intron', dest='min_coverage_intron', help='Minimum intron length that may be found during coverage search' )
parser.add_option( '', '--max-coverage-intron', dest='max_coverage_intron', help='Maximum intron length that may be found during coverage search' )
@@ -166,7 +166,7 @@
opts += ' --no-closure-search'
if options.microexon_search:
opts += ' --microexon-search'
- if options.single_paired == 'paired':
+ if options.single_paired == 'paired' and options.mate_std_dev:
opts += ' --mate-std-dev %s' % options.mate_std_dev
if options.initial_read_mismatches:
opts += ' --initial-read-mismatches %d' % int( options.initial_read_mismatches )
diff -r 1d6324d630ed3c9109d6240d7186c9f99d778005 -r dd01d42e4da3f2bd8535707cdd6d4322ae9d516c tools/ngs_rna/tophat_wrapper.xml
--- a/tools/ngs_rna/tophat_wrapper.xml
+++ b/tools/ngs_rna/tophat_wrapper.xml
@@ -7,150 +7,111 @@
</requirements><command interpreter="python">
tophat_wrapper.py
- ## Change this to accommodate the number of threads you have available.
- --num-threads="4"
+
+ ## Change this to accommodate the number of threads you have available.
+ --num-threads="4"
- ## Provide outputs.
- --junctions-output=$junctions
- --hits-output=$accepted_hits
+ ## Provide outputs.
+ --junctions-output=$junctions
+ --hits-output=$accepted_hits
- ## Handle reference file.
- #if $refGenomeSource.genomeSource == "history":
- --own-file=$refGenomeSource.ownFile
+ ## Handle reference file.
+ #if $refGenomeSource.genomeSource == "history":
+ --own-file=$refGenomeSource.ownFile
+ #else:
+ --indexes-path="${refGenomeSource.index.fields.path}"
+ #end if
+
+ ## Are reads single-end or paired?
+ --single-paired=$singlePaired.sPaired
+
+ ## First input file always required.
+ --input1=$input1
+
+ ## Second input only if input is paired-end.
+ #if $singlePaired.sPaired == "paired"
+ --input2=$singlePaired.input2
+ -r $singlePaired.mate_inner_distance
+ --mate-std-dev=$singlePaired.mate_std_dev
+ #end if
+
+ ## Set params.
+ --settings=$params.settingsType
+ #if $params.settingsType == "full":
+ -a $params.anchor_length
+ -m $params.splice_mismatches
+ -i $params.min_intron_length
+ -I $params.max_intron_length
+ -g $params.max_multihits
+ --min-segment-intron $params.min_segment_intron
+ --max-segment-intron $params.max_segment_intron
+ --initial-read-mismatches=$params.initial_read_mismatches
+ --seg-mismatches=$params.seg_mismatches
+ --seg-length=$params.seg_length
+ --library-type=$params.library_type
+
+ ## Closure search.
+ #if $params.closure_search.use_search == "Yes":
+ --closure-search
+ --min-closure-exon $params.closure_search.min_closure_exon
+ --min-closure-intron $params.closure_search.min_closure_intron
+ --max-closure-intron $params.closure_search.max_closure_intron
#else:
- --indexes-path="${refGenomeSource.index.fields.path}"
+ --no-closure-search
+ #end if
+
+ ## Indel search.
+ #if $params.indel_search.allow_indel_search == "Yes":
+ ## --allow-indels
+ --max-insertion-length $params.indel_search.max_insertion_length
+ --max-deletion-length $params.indel_search.max_deletion_length
+ #else:
+ --no-novel-indels
#end if
- ## Are reads single-end or paired?
- --single-paired=$singlePaired.sPaired
-
- ## First input file always required.
- --input1=$input1
-
- ## Set params based on whether reads are single-end or paired.
- #if $singlePaired.sPaired == "single":
- --settings=$singlePaired.sParams.sSettingsType
- #if $singlePaired.sParams.sSettingsType == "full":
- -a $singlePaired.sParams.anchor_length
- -m $singlePaired.sParams.splice_mismatches
- -i $singlePaired.sParams.min_intron_length
- -I $singlePaired.sParams.max_intron_length
- -g $singlePaired.sParams.max_multihits
- --min-segment-intron $singlePaired.sParams.min_segment_intron
- --max-segment-intron $singlePaired.sParams.max_segment_intron
- --initial-read-mismatches=$singlePaired.sParams.initial_read_mismatches
- --seg-mismatches=$singlePaired.sParams.seg_mismatches
- --seg-length=$singlePaired.sParams.seg_length
- --library-type=$singlePaired.sParams.library_type
-
- ## Indel search.
- #if $singlePaired.sParams.indel_search.allow_indel_search == "Yes":
- ## --allow-indels
- --max-insertion-length $singlePaired.sParams.indel_search.max_insertion_length
- --max-deletion-length $singlePaired.sParams.indel_search.max_deletion_length
- #else:
- --no-novel-indels
- #end if
-
- ## Supplying junctions parameters.
- #if $singlePaired.sParams.own_junctions.use_junctions == "Yes":
- #if $singlePaired.sParams.own_junctions.gene_model_ann.use_annotations == "Yes":
- -G $singlePaired.sParams.own_junctions.gene_model_ann.gene_annotation_model
- #end if
- #if $singlePaired.sParams.own_junctions.raw_juncs.use_juncs == "Yes":
- -j $singlePaired.sParams.own_junctions.raw_juncs.raw_juncs
- #end if
- ## TODO: No idea why a string cast is necessary, but it is:
- #if str($singlePaired.sParams.own_junctions.no_novel_juncs) == "Yes":
- --no-novel-juncs
- #end if
- #end if
-
- #if $singlePaired.sParams.closure_search.use_search == "Yes":
- --closure-search
- --min-closure-exon $singlePaired.sParams.closure_search.min_closure_exon
- --min-closure-intron $singlePaired.sParams.closure_search.min_closure_intron
- --max-closure-intron $singlePaired.sParams.closure_search.max_closure_intron
- #else:
- --no-closure-search
- #end if
- #if $singlePaired.sParams.coverage_search.use_search == "Yes":
- --coverage-search
- --min-coverage-intron $singlePaired.sParams.coverage_search.min_coverage_intron
- --max-coverage-intron $singlePaired.sParams.coverage_search.max_coverage_intron
- #else:
- --no-coverage-search
- #end if
- ## TODO: No idea why the type conversion is necessary, but it seems to be.
- #if str($singlePaired.sParams.microexon_search) == "Yes":
- --microexon-search
- #end if
+ ## Supplying junctions parameters.
+ #if $params.own_junctions.use_junctions == "Yes":
+ #if $params.own_junctions.gene_model_ann.use_annotations == "Yes":
+ -G $params.own_junctions.gene_model_ann.gene_annotation_model
#end if
- #else:
- --input2=$singlePaired.input2
- -r $singlePaired.mate_inner_distance
- --settings=$singlePaired.pParams.pSettingsType
- #if $singlePaired.pParams.pSettingsType == "full":
- --mate-std-dev=$singlePaired.pParams.mate_std_dev
- -a $singlePaired.pParams.anchor_length
- -m $singlePaired.pParams.splice_mismatches
- -i $singlePaired.pParams.min_intron_length
- -I $singlePaired.pParams.max_intron_length
- -g $singlePaired.pParams.max_multihits
- --min-segment-intron $singlePaired.pParams.min_segment_intron
- --max-segment-intron $singlePaired.pParams.max_segment_intron
- --initial-read-mismatches=$singlePaired.pParams.initial_read_mismatches
- --seg-mismatches=$singlePaired.pParams.seg_mismatches
- --seg-length=$singlePaired.pParams.seg_length
- --library-type=$singlePaired.pParams.library_type
-
- ## Indel search.
- #if $singlePaired.pParams.indel_search.allow_indel_search == "Yes":
- ## --allow-indels
- --max-insertion-length $singlePaired.pParams.indel_search.max_insertion_length
- --max-deletion-length $singlePaired.pParams.indel_search.max_deletion_length
- #else:
- --no-novel-indels
- #end if
-
- ## Supplying junctions parameters.
- #if $singlePaired.pParams.own_junctions.use_junctions == "Yes":
- #if $singlePaired.pParams.own_junctions.gene_model_ann.use_annotations == "Yes":
- -G $singlePaired.pParams.own_junctions.gene_model_ann.gene_annotation_model
- #end if
- #if $singlePaired.pParams.own_junctions.raw_juncs.use_juncs == "Yes":
- -j $singlePaired.pParams.own_junctions.raw_juncs.raw_juncs
- #end if
- ## TODO: No idea why type cast is necessary, but it is:
- #if str($singlePaired.pParams.own_junctions.no_novel_juncs) == "Yes":
- --no-novel-juncs
- #end if
- #end if
-
- #if $singlePaired.pParams.closure_search.use_search == "Yes":
- --closure-search
- --min-closure-exon $singlePaired.pParams.closure_search.min_closure_exon
- --min-closure-intron $singlePaired.pParams.closure_search.min_closure_intron
- --max-closure-intron $singlePaired.pParams.closure_search.max_closure_intron
- #else:
- --no-closure-search
- #end if
- #if $singlePaired.pParams.coverage_search.use_search == "Yes":
- --coverage-search
- --min-coverage-intron $singlePaired.pParams.coverage_search.min_coverage_intron
- --max-coverage-intron $singlePaired.pParams.coverage_search.max_coverage_intron
- #else:
- --no-coverage-search
- #end if
- ## TODO: No idea why the type conversion is necessary, but it seems to be.
- #if str ($singlePaired.pParams.microexon_search) == "Yes":
- --microexon-search
- #end if
+ #if $params.own_junctions.raw_juncs.use_juncs == "Yes":
+ -j $params.own_junctions.raw_juncs.raw_juncs
+ #end if
+ ## TODO: No idea why a string cast is necessary, but it is:
+ #if str($params.own_junctions.no_novel_juncs) == "Yes":
+ --no-novel-juncs
#end if
#end if
+
+ #if $params.coverage_search.use_search == "Yes":
+ --coverage-search
+ --min-coverage-intron $params.coverage_search.min_coverage_intron
+ --max-coverage-intron $params.coverage_search.max_coverage_intron
+ #else:
+ --no-coverage-search
+ #end if
+ ## TODO: No idea why the type conversion is necessary, but it seems to be.
+ #if str($params.microexon_search) == "Yes":
+ --microexon-search
+ #end if
+ #end if
</command><inputs>
- <param format="fastqsanger" name="input1" type="data" label="RNA-Seq FASTQ file" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33" />
+ <conditional name="singlePaired">
+ <param name="sPaired" type="select" label="Is this library mate-paired?">
+ <option value="single">Single-end</option>
+ <option value="paired">Paired-end</option>
+ </param>
+ <when value="single">
+ <param format="fastqsanger" name="input1" type="data" label="RNA-Seq FASTQ dataset" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33"/>
+ </when>
+ <when value="paired">
+ <param format="fastqsanger" name="input1" type="data" label="RNA-Seq FASTQ dataset--forward reads" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33" />
+ <param format="fastqsanger" name="input2" type="data" label="RNA-Seq FASTQ dataset--reverse reads" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33" />
+ <param name="mate_inner_distance" type="integer" value="20" label="Mean Inner Distance between Mate Pairs" />
+ <param name="mate_std_dev" type="integer" value="20" label="Std. Dev for Distance between Mate Pairs" help="The standard deviation for the distribution on inner distances between mate pairs."/>
+ </when>
+ </conditional><conditional name="refGenomeSource"><param name="genomeSource" type="select" label="Will you select a reference genome from your history or use a built-in index?" help="Built-ins were indexed using default options"><option value="indexed">Use a built-in index</option>
@@ -168,221 +129,109 @@
<param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select the reference genome" /></when><!-- history --></conditional><!-- refGenomeSource -->
- <conditional name="singlePaired">
- <param name="sPaired" type="select" label="Is this library mate-paired?">
- <option value="single">Single-end</option>
- <option value="paired">Paired-end</option>
+ <conditional name="params">
+ <param name="settingsType" type="select" label="TopHat settings to use" help="You can use the default settings or set custom values for any of Tophat's parameters.">
+ <option value="preSet">Use Defaults</option>
+ <option value="full">Full parameter list</option></param>
- <when value="single">
- <conditional name="sParams">
- <param name="sSettingsType" type="select" label="TopHat settings to use" help="You can use the default settings or set custom values for any of Tophat's parameters.">
- <option value="preSet">Use Defaults</option>
- <option value="full">Full parameter list</option>
- </param>
- <when value="preSet" />
- <!-- Full/advanced params. -->
- <when value="full">
- <param name="library_type" type="select" label="Library Type" help="TopHat will treat the reads as strand specific. Every read alignment will have an XS attribute tag. Consider supplying library type options below to select the correct RNA-seq protocol.">
- <option value="fr-unstranded">FR Unstranded</option>
- <option value="fr-firststrand">FR First Strand</option>
- <option value="fr-secondstrand">FR Second Strand</option>
+ <when value="preSet" />
+ <!-- Full/advanced params. -->
+ <when value="full">
+ <param name="library_type" type="select" label="Library Type" help="TopHat will treat the reads as strand specific. Every read alignment will have an XS attribute tag. Consider supplying library type options below to select the correct RNA-seq protocol.">
+ <option value="fr-unstranded">FR Unstranded</option>
+ <option value="fr-firststrand">FR First Strand</option>
+ <option value="fr-secondstrand">FR Second Strand</option>
+ </param>
+ <param name="anchor_length" type="integer" value="8" label="Anchor length (at least 3)" help="Report junctions spanned by reads with at least this many bases on each side of the junction." />
+ <param name="splice_mismatches" type="integer" value="0" label="Maximum number of mismatches that can appear in the anchor region of spliced alignment" />
+ <param name="min_intron_length" type="integer" value="70" label="The minimum intron length" help="TopHat will ignore donor/acceptor pairs closer than this many bases apart." />
+ <param name="max_intron_length" type="integer" value="500000" label="The maximum intron length" help="When searching for junctions ab initio, TopHat will ignore donor/acceptor pairs farther than this many bases apart, except when such a pair is supported by a split segment alignment of a long read." />
+ <conditional name="indel_search">
+ <param name="allow_indel_search" type="select" label="Allow indel search">
+ <option value="Yes">Yes</option>
+ <option value="No">No</option></param>
- <param name="anchor_length" type="integer" value="8" label="Anchor length (at least 3)" help="Report junctions spanned by reads with at least this many bases on each side of the junction." />
- <param name="splice_mismatches" type="integer" value="0" label="Maximum number of mismatches that can appear in the anchor region of spliced alignment" />
- <param name="min_intron_length" type="integer" value="70" label="The minimum intron length" help="TopHat will ignore donor/acceptor pairs closer than this many bases apart." />
- <param name="max_intron_length" type="integer" value="500000" label="The maximum intron length" help="When searching for junctions ab initio, TopHat will ignore donor/acceptor pairs farther than this many bases apart, except when such a pair is supported by a split segment alignment of a long read." />
- <conditional name="indel_search">
- <param name="allow_indel_search" type="select" label="Allow indel search">
- <option value="Yes">Yes</option>
- <option value="No">No</option>
- </param>
- <when value="No"/>
- <when value="Yes">
- <param name="max_insertion_length" type="integer" value="3" label="Max insertion length." help="The maximum insertion length." />
- <param name="max_deletion_length" type="integer" value="3" label="Max deletion length." help="The maximum deletion length." />
- </when>
- </conditional>
-alignments (number of reads divided by average depth of coverage)" help="0.0 to 1.0 (0 to turn off)" />
- <param name="max_multihits" type="integer" value="20" label="Maximum number of alignments to be allowed" />
- <param name="min_segment_intron" type="integer" value="50" label="Minimum intron length that may be found during split-segment (default) search" />
- <param name="max_segment_intron" type="integer" value="500000" label="Maximum intron length that may be found during split-segment (default) search" />
- <param name="initial_read_mismatches" type="integer" min="0" value="2" label="Number of mismatches allowed in the initial read mapping" />
- <param name="seg_mismatches" type="integer" min="0" max="3" value="2" label="Number of mismatches allowed in each segment alignment for reads mapped independently" />
- <param name="seg_length" type="integer" value="25" label="Minimum length of read segments" />
-
- <!-- Options for supplying own junctions. -->
- <conditional name="own_junctions">
- <param name="use_junctions" type="select" label="Use Own Junctions">
+ <when value="No"/>
+ <when value="Yes">
+ <param name="max_insertion_length" type="integer" value="3" label="Max insertion length." help="The maximum insertion length." />
+ <param name="max_deletion_length" type="integer" value="3" label="Max deletion length." help="The maximum deletion length." />
+ </when>
+ </conditional>
+ alignments (number of reads divided by average depth of coverage)" help="0.0 to 1.0 (0 to turn off)" />
+ <param name="max_multihits" type="integer" value="20" label="Maximum number of alignments to be allowed" />
+ <param name="min_segment_intron" type="integer" value="50" label="Minimum intron length that may be found during split-segment (default) search" />
+ <param name="max_segment_intron" type="integer" value="500000" label="Maximum intron length that may be found during split-segment (default) search" />
+ <param name="initial_read_mismatches" type="integer" min="0" value="2" label="Number of mismatches allowed in the initial read mapping" />
+ <param name="seg_mismatches" type="integer" min="0" max="3" value="2" label="Number of mismatches allowed in each segment alignment for reads mapped independently" />
+ <param name="seg_length" type="integer" value="25" label="Minimum length of read segments" />
+
+ <!-- Options for supplying own junctions. -->
+ <conditional name="own_junctions">
+ <param name="use_junctions" type="select" label="Use Own Junctions">
+ <option value="No">No</option>
+ <option value="Yes">Yes</option>
+ </param>
+ <when value="Yes">
+ <conditional name="gene_model_ann">
+ <param name="use_annotations" type="select" label="Use Gene Annotation Model">
+ <option value="No">No</option>
+ <option value="Yes">Yes</option>
+ </param>
+ <when value="No" />
+ <when value="Yes">
+ <param format="gtf" name="gene_annotation_model" type="data" label="Gene Model Annotations" help="TopHat will use the exon records in this file to build a set of known splice junctions for each gene, and will attempt to align reads to these junctions even if they would not normally be covered by the initial mapping."/>
+ </when>
+ </conditional>
+ <conditional name="raw_juncs">
+ <param name="use_juncs" type="select" label="Use Raw Junctions">
+ <option value="No">No</option>
+ <option value="Yes">Yes</option>
+ </param>
+ <when value="No" />
+ <when value="Yes">
+ <param format="interval" name="raw_juncs" type="data" label="Raw Junctions" help="Supply TopHat with a list of raw junctions. Junctions are specified one per line, in a tab-delimited format. Records look like: [chrom] [left] [right] [+/-] left and right are zero-based coordinates, and specify the last character of the left sequenced to be spliced to the first character of the right sequence, inclusive."/>
+ </when>
+ </conditional>
+ <param name="no_novel_juncs" type="select" label="Only look for supplied junctions"><option value="No">No</option><option value="Yes">Yes</option></param>
- <when value="Yes">
- <conditional name="gene_model_ann">
- <param name="use_annotations" type="select" label="Use Gene Annotation Model">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- <when value="No" />
- <when value="Yes">
- <param format="gtf" name="gene_annotation_model" type="data" label="Gene Model Annotations" help="TopHat will use the exon records in this file to build a set of known splice junctions for each gene, and will attempt to align reads to these junctions even if they would not normally be covered by the initial mapping."/>
- </when>
- </conditional>
- <conditional name="raw_juncs">
- <param name="use_juncs" type="select" label="Use Raw Junctions">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- <when value="No" />
- <when value="Yes">
- <param format="interval" name="raw_juncs" type="data" label="Raw Junctions" help="Supply TopHat with a list of raw junctions. Junctions are specified one per line, in a tab-delimited format. Records look like: [chrom] [left] [right] [+/-] left and right are zero-based coordinates, and specify the last character of the left sequenced to be spliced to the first character of the right sequence, inclusive."/>
- </when>
- </conditional>
- <param name="no_novel_juncs" type="select" label="Only look for supplied junctions">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- </when>
- <when value="No" />
- </conditional><!-- /own_junctions -->
-
- <!-- Closure search. -->
- <conditional name="closure_search">
- <param name="use_search" type="select" label="Use Closure Search">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- <when value="Yes">
- <param name="min_closure_exon" type="integer" value="50" label="During closure search for paired end reads, exonic hops in the potential splice graph must be at least this long. The default is 50." />
- <param name="min_closure_intron" type="integer" value="50" label="Minimum intron length that may be found during closure search" />
- <param name="max_closure_intron" type="integer" value="5000" label="Maximum intron length that may be found during closure search" />
- </when>
- <when value="No" />
- </conditional>
- <!-- Coverage search. -->
- <conditional name="coverage_search">
- <param name="use_search" type="select" label="Use Coverage Search">
- <option selected="true" value="Yes">Yes</option>
- <option value="No">No</option>
- </param>
- <when value="Yes">
- <param name="min_coverage_intron" type="integer" value="50" label="Minimum intron length that may be found during coverage search" />
- <param name="max_coverage_intron" type="integer" value="20000" label="Maximum intron length that may be found during coverage search" />
- </when>
- <when value="No" />
- </conditional>
- <param name="microexon_search" type="select" label="Use Microexon Search" help="With this option, the pipeline will attempt to find alignments incident to microexons. Works only for reads 50bp or longer.">
+ </when>
+ <when value="No" />
+ </conditional><!-- /own_junctions -->
+
+ <!-- Closure search. -->
+ <conditional name="closure_search">
+ <param name="use_search" type="select" label="Use Closure Search">
+ <option value="No">No</option>
+ <option value="Yes">Yes</option>
+ </param>
+ <when value="Yes">
+ <param name="min_closure_exon" type="integer" value="50" label="During closure search for paired end reads, exonic hops in the potential splice graph must be at least this long. The default is 50." />
+ <param name="min_closure_intron" type="integer" value="50" label="Minimum intron length that may be found during closure search" />
+ <param name="max_closure_intron" type="integer" value="5000" label="Maximum intron length that may be found during closure search" />
+ </when>
+ <when value="No" />
+ </conditional>
+
+ <!-- Coverage search. -->
+ <conditional name="coverage_search">
+ <param name="use_search" type="select" label="Use Coverage Search">
+ <option selected="true" value="Yes">Yes</option><option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- </when><!-- full -->
- </conditional><!-- sParams -->
- </when><!-- single -->
- <when value="paired">
- <param format="fastqsanger" name="input2" type="data" label="RNA-Seq FASTQ file" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33" />
- <param name="mate_inner_distance" type="integer" value="20" label="Mean Inner Distance between Mate Pairs" />
- <conditional name="pParams">
- <param name="pSettingsType" type="select" label="TopHat settings to use" help="For most mapping needs use Commonly used settings. If you want full control use Full parameter list">
- <option value="preSet">Commonly used</option>
- <option value="full">Full parameter list</option></param>
- <when value="preSet" />
- <!-- Full/advanced params. -->
- <when value="full">
- <param name="library_type" type="select" label="Library Type" help="TopHat will treat the reads as strand specific. Every read alignment will have an XS attribute tag. Consider supplying library type options below to select the correct RNA-seq protocol.">
- <option value="fr-unstranded">FR Unstranded</option>
- <option value="fr-firststrand">FR First Strand</option>
- <option value="fr-secondstrand">FR Second Strand</option>
- </param>
- <param name="mate_std_dev" type="integer" value="20" label="Std. Dev for Distance between Mate Pairs" help="The standard deviation for the distribution on inner distances between mate pairs."/>
- <param name="anchor_length" type="integer" value="8" label="Anchor length (at least 3)" help="Report junctions spanned by reads with at least this many bases on each side of the junction." />
- <param name="splice_mismatches" type="integer" value="0" label="Maximum number of mismatches that can appear in the anchor region of spliced alignment" />
- <param name="min_intron_length" type="integer" value="70" label="The minimum intron length" help="TopHat will ignore donor/acceptor pairs closer than this many bases apart." />
- <param name="max_intron_length" type="integer" value="500000" label="The maximum intron length" help="When searching for junctions ab initio, TopHat will ignore donor/acceptor pairs farther than this many bases apart, except when such a pair is supported by a split segment alignment of a long read." />
- <conditional name="indel_search">
- <param name="allow_indel_search" type="select" label="Allow indel search">
- <option value="Yes">Yes</option>
- <option value="No">No</option>
- </param>
- <when value="No"/>
- <when value="Yes">
- <param name="max_insertion_length" type="integer" value="3" label="Max insertion length." help="The maximum insertion length." />
- <param name="max_deletion_length" type="integer" value="3" label="Max deletion length." help="The maximum deletion length." />
- </when>
- </conditional>
- <param name="max_multihits" type="integer" value="20" label="Maximum number of alignments to be allowed" />
- <param name="min_segment_intron" type="integer" value="50" label="Minimum intron length that may be found during split-segment (default) search" />
- <param name="max_segment_intron" type="integer" value="500000" label="Maximum intron length that may be found during split-segment (default) search" />
- <param name="initial_read_mismatches" type="integer" min="0" value="2" label="Number of mismatches allowed in the initial read mapping" />
- <param name="seg_mismatches" type="integer" min="0" max="3" value="2" label="Number of mismatches allowed in each segment alignment for reads mapped independently" />
- <param name="seg_length" type="integer" value="25" label="Minimum length of read segments" />
- <!-- Options for supplying own junctions. -->
- <conditional name="own_junctions">
- <param name="use_junctions" type="select" label="Use Own Junctions">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- <when value="Yes">
- <conditional name="gene_model_ann">
- <param name="use_annotations" type="select" label="Use Gene Annotation Model">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- <when value="No" />
- <when value="Yes">
- <param format="gtf" name="gene_annotation_model" type="data" label="Gene Model Annotations" help="TopHat will use the exon records in this file to build a set of known splice junctions for each gene, and will attempt to align reads to these junctions even if they would not normally be covered by the initial mapping."/>
- </when>
- </conditional>
- <conditional name="raw_juncs">
- <param name="use_juncs" type="select" label="Use Raw Junctions">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- <when value="No" />
- <when value="Yes">
- <param format="interval" name="raw_juncs" type="data" label="Raw Junctions" help="Supply TopHat with a list of raw junctions. Junctions are specified one per line, in a tab-delimited format. Records look like: [chrom] [left] [right] [+/-] left and right are zero-based coordinates, and specify the last character of the left sequenced to be spliced to the first character of the right sequence, inclusive."/>
- </when>
- </conditional>
- <param name="no_novel_juncs" type="select" label="Only look for supplied junctions">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- </when>
- <when value="No" />
- </conditional><!-- /own_junctions -->
-
- <!-- Closure search. -->
- <conditional name="closure_search">
- <param name="use_search" type="select" label="Use Closure Search">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- <when value="Yes">
- <param name="min_closure_exon" type="integer" value="50" label="During closure search for paired end reads, exonic hops in the potential splice graph must be at least this long. The default is 50." />
- <param name="min_closure_intron" type="integer" value="50" label="Minimum intron length that may be found during closure search" />
- <param name="max_closure_intron" type="integer" value="5000" label="Maximum intron length that may be found during closure search" />
- </when>
- <when value="No" />
- </conditional>
- <!-- Coverage search. -->
- <conditional name="coverage_search">
- <param name="use_search" type="select" label="Use Coverage Search">
- <option selected="true" value="Yes">Yes</option>
- <option value="No">No</option>
- </param>
- <when value="Yes">
- <param name="min_coverage_intron" type="integer" value="50" label="Minimum intron length that may be found during coverage search" />
- <param name="max_coverage_intron" type="integer" value="20000" label="Maximum intron length that may be found during coverage search" />
- </when>
- <when value="No" />
- </conditional>
- <param name="microexon_search" type="select" label="Use Microexon Search" help="With this option, the pipeline will attempt to find alignments incident to microexons. Works only for reads 50bp or longer.">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- </when><!-- full -->
- </conditional><!-- pParams -->
- </when><!-- paired -->
- </conditional>
+ <when value="Yes">
+ <param name="min_coverage_intron" type="integer" value="50" label="Minimum intron length that may be found during coverage search" />
+ <param name="max_coverage_intron" type="integer" value="20000" label="Maximum intron length that may be found during coverage search" />
+ </when>
+ <when value="No" />
+ </conditional>
+ <param name="microexon_search" type="select" label="Use Microexon Search" help="With this option, the pipeline will attempt to find alignments incident to microexons. Works only for reads 50bp or longer.">
+ <option value="No">No</option>
+ <option value="Yes">Yes</option>
+ </param>
+ </when><!-- full -->
+ </conditional><!-- params --></inputs><outputs>
@@ -471,11 +320,11 @@
tophat -o tmp_dir -p 1 tophat_in1 test-data/tophat_in2.fastqsanger
Rename the files in tmp_dir appropriately
-->
+ <param name="sPaired" value="single" /><param name="input1" ftype="fastqsanger" value="tophat_in2.fastqsanger" /><param name="genomeSource" value="indexed" /><param name="index" value="tophat_test" />
- <param name="sPaired" value="single" />
- <param name="sSettingsType" value="preSet" />
+ <param name="settingsType" value="preSet" /><output name="junctions" file="tophat_out1j.bed" /><output name="accepted_hits" file="tophat_out1h.bam" compare="sim_size" /></test>
@@ -486,13 +335,13 @@
tophat -o tmp_dir -p 1 -r 20 tophat_in1 test-data/tophat_in2.fastqsanger test-data/tophat_in3.fastqsanger
Rename the files in tmp_dir appropriately
-->
+ <param name="sPaired" value="paired" /><param name="input1" ftype="fastqsanger" value="tophat_in2.fastqsanger" />
+ <param name="input2" ftype="fastqsanger" value="tophat_in3.fastqsanger" /><param name="genomeSource" value="history" /><param name="ownFile" ftype="fasta" value="tophat_in1.fasta" />
- <param name="sPaired" value="paired" />
- <param name="input2" ftype="fastqsanger" value="tophat_in3.fastqsanger" /><param name="mate_inner_distance" value="20" />
- <param name="pSettingsType" value="preSet" />
+ <param name="settingsType" value="preSet" /><output name="junctions" file="tophat_out2j.bed" /><output name="accepted_hits" file="tophat_out2h.bam" compare="sim_size" /></test>
@@ -500,15 +349,15 @@
<test><!-- Tophat commands:
bowtie-build -f test-data/tophat_in1.fasta tophat_in1
- tophat -o tmp_dir -p 1 -a 8 -m 0 -i 70 -I 500000 -F 0.15 -g 40 +coverage-search +min-coverage-intron 50 +max-coverage-intro 20000 +segment-mismatches 2 +segment-length 25 +closure-search +min-closure-exon 50 +min-closure-intron 50 +max-closure-intro 5000 +microexon-search tophat_in1 test-data/tophat_in2.fastqsanger
+ tophat -o tmp_dir -p 1 -a 8 -m 0 -i 70 -I 500000 -F 0.15 -g 40 +coverage-search +min-coverage-intron 50 +max-coverage-intro 20000 +segment-mismatches 2 +segment-length 25 +microexon-search tophat_in1 test-data/tophat_in2.fastqsanger
Replace the + with double-dash
Rename the files in tmp_dir appropriately
-->
+ <param name="sPaired" value="single"/><param name="input1" ftype="fastqsanger" value="tophat_in2.fastqsanger"/><param name="genomeSource" value="history"/><param name="ownFile" value="tophat_in1.fasta"/>
- <param name="sPaired" value="single"/>
- <param name="sSettingsType" value="full"/>
+ <param name="settingsType" value="full"/><param name="library_type" value="FR Unstranded"/><param name="anchor_length" value="8"/><param name="splice_mismatches" value="0"/>
@@ -546,13 +395,13 @@
Replace the + with double-dash
Rename the files in tmp_dir appropriately
-->
+ <param name="sPaired" value="paired"/><param name="input1" ftype="fastqsanger" value="tophat_in2.fastqsanger"/>
+ <param name="input2" ftype="fastqsanger" value="tophat_in3.fastqsanger"/><param name="genomeSource" value="indexed"/><param name="index" value="tophat_test"/>
- <param name="sPaired" value="paired"/>
- <param name="input2" ftype="fastqsanger" value="tophat_in3.fastqsanger"/><param name="mate_inner_distance" value="20"/>
- <param name="pSettingsType" value="full"/>
+ <param name="settingsType" value="full"/><param name="library_type" value="FR Unstranded"/><param name="mate_std_dev" value="20"/><param name="anchor_length" value="8"/>
@@ -644,16 +493,15 @@
-j/--raw-juncs [juncs file] Supply TopHat with a list of raw junctions. Junctions are specified one per line, in a tab-delimited format. Records look like: [chrom] [left] [right] [+/-], left and right are zero-based coordinates, and specify the last character of the left sequenced to be spliced to the first character of the right sequence, inclusive.
-no-novel-juncs Only look for junctions indicated in the supplied GFF file. (ignored without -G)
--no-closure-search Disables the mate pair closure-based search for junctions. Currently, has no effect - closure search is off by default.
- --closure-search Enables the mate pair closure-based search for junctions. Closure-based search should only be used when the expected inner distance between mates is small (about or less than 50bp)
+ --closure-search Enables the mate pair closure-based search for junctions. Closure-based search should only be used when the
+ --min-closure-exon During closure search for paired end reads, exonic hops in the potential splice graph must be at least this long. The default is 50.
+ --min-closure-intron The minimum intron length that may be found during closure search. The default is 50.
+ --max-closure-intron The maximum intron length that may be found during closure search. The default is 5000. expected inner distance between mates is small (about or less than 50bp)
--no-coverage-search Disables the coverage based search for junctions.
--coverage-search Enables the coverage based search for junctions. Use when coverage search is disabled by default (such as for reads 75bp or longer), for maximum sensitivity.
--microexon-search With this option, the pipeline will attempt to find alignments incident to microexons. Works only for reads 50bp or longer.
- --butterfly-search TopHat will use a slower but potentially more sensitive algorithm to find junctions in addition to its standard search. Consider using this if you expect that your experiment produced a lot of reads from pre-mRNA, that fall within the introns of your transcripts.
--segment-mismatches Read segments are mapped independently, allowing up to this many mismatches in each segment alignment. The default is 2.
--segment-length Each read is cut up into segments, each at least this long. These segments are mapped independently. The default is 25.
- --min-closure-exon During closure search for paired end reads, exonic hops in the potential splice graph must be at least this long. The default is 50.
- --min-closure-intron The minimum intron length that may be found during closure search. The default is 50.
- --max-closure-intron The maximum intron length that may be found during closure search. The default is 5000.
--min-coverage-intron The minimum intron length that may be found during coverage search. The default is 50.
--max-coverage-intron The maximum intron length that may be found during coverage search. The default is 20000.
--min-segment-intron The minimum intron length that may be found during split-segment search. The default is 50.
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: dan: Have implicit SAM to BAM converter sort the output BAM file so that indexing will not fail.
by Bitbucket 27 Apr '12
by Bitbucket 27 Apr '12
27 Apr '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/605eb591503a/
changeset: 605eb591503a
user: dan
date: 2012-04-27 21:33:10
summary: Have implicit SAM to BAM converter sort the output BAM file so that indexing will not fail.
affected #: 2 files
diff -r 5293f1bf1dba762cae71983e40304d1d8e4ae5b5 -r 605eb591503a73ed9fdc939f71c14e6c74762673 lib/galaxy/datatypes/converters/sam_to_bam.py
--- /dev/null
+++ b/lib/galaxy/datatypes/converters/sam_to_bam.py
@@ -0,0 +1,69 @@
+#!/usr/bin/env python
+#Dan Blankenberg
+
+"""
+A wrapper script for converting SAM to BAM, with sorting.
+%prog input_filename.sam output_filename.bam
+"""
+
+import sys, optparse, os, tempfile, subprocess, shutil
+
+CHUNK_SIZE = 2**20 #1mb
+
+
+def cleanup_before_exit( tmp_dir ):
+ if tmp_dir and os.path.exists( tmp_dir ):
+ shutil.rmtree( tmp_dir )
+
+def __main__():
+ #Parse Command Line
+ parser = optparse.OptionParser()
+ (options, args) = parser.parse_args()
+
+ assert len( args ) == 2, 'You must specify the input and output filenames'
+ input_filename, output_filename = args
+
+ tmp_dir = tempfile.mkdtemp( prefix='tmp-sam_to_bam_converter-' )
+
+ #convert to SAM
+ unsorted_bam_filename = os.path.join( tmp_dir, 'unsorted.bam' )
+ unsorted_stderr_filename = os.path.join( tmp_dir, 'unsorted.stderr' )
+ cmd = 'samtools view -bS "%s" > "%s"' % ( input_filename, unsorted_bam_filename )
+ proc = subprocess.Popen( args=cmd, stderr=open( unsorted_stderr_filename, 'wb' ), shell=True, cwd=tmp_dir )
+ return_code = proc.wait()
+ if return_code:
+ stderr_target = sys.stderr
+ else:
+ stderr_target = sys.stdout
+ stderr = open( unsorted_stderr_filename )
+ while True:
+ chunk = stderr.read( CHUNK_SIZE )
+ if chunk:
+ stderr_target.write( chunk )
+ else:
+ break
+ stderr.close()
+
+ #sort sam, so indexing will not fail
+ sorted_stderr_filename = os.path.join( tmp_dir, 'sorted.stderr' )
+ sorting_prefix = os.path.join( tmp_dir, 'sorted_bam' )
+ cmd = 'samtools sort -o "%s" "%s" > "%s"' % ( unsorted_bam_filename, sorting_prefix, output_filename )
+ proc = subprocess.Popen( args=cmd, stderr=open( sorted_stderr_filename, 'wb' ), shell=True, cwd=tmp_dir )
+ return_code = proc.wait()
+
+ if return_code:
+ stderr_target = sys.stderr
+ else:
+ stderr_target = sys.stdout
+ stderr = open( sorted_stderr_filename )
+ while True:
+ chunk = stderr.read( CHUNK_SIZE )
+ if chunk:
+ stderr_target.write( chunk )
+ else:
+ break
+ stderr.close()
+
+ cleanup_before_exit( tmp_dir )
+
+if __name__=="__main__": __main__()
diff -r 5293f1bf1dba762cae71983e40304d1d8e4ae5b5 -r 605eb591503a73ed9fdc939f71c14e6c74762673 lib/galaxy/datatypes/converters/sam_to_bam.xml
--- a/lib/galaxy/datatypes/converters/sam_to_bam.xml
+++ b/lib/galaxy/datatypes/converters/sam_to_bam.xml
@@ -1,11 +1,11 @@
-<tool id="CONVERTER_sam_to_bam" name="Convert SAM to BAM" version="1.0.0">
+<tool id="CONVERTER_sam_to_bam" name="Convert SAM to BAM" version="2.0.0"><!-- <description>__NOT_USED_CURRENTLY_FOR_CONVERTERS__</description> --><!-- Used on the metadata edit page. --><!-- FIXME: conversion will only work if headers for reference sequences are in input file.
To fix this: (a) merge sam_to_bam tool in tools with this conversion (like fasta_to_len
conversion); and (b) define a datatype-specific way to set converter parameters.
-->
- <command>samtools view -bS $input1 > $output 2> /dev/null </command>
+ <command interpreter="python">sam_to_bam.py $input1 $output</command><inputs><param name="input1" type="data" format="sam" label="SAM file"/></inputs>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/5293f1bf1dba/
changeset: 5293f1bf1dba
user: jgoecks
date: 2012-04-27 21:22:11
summary: More cleaning of Tophat wrapper.
affected #: 2 files
diff -r 51fccbc2e9bc401c83b52447b513e201fe776ba2 -r 5293f1bf1dba762cae71983e40304d1d8e4ae5b5 tools/ngs_rna/tophat_wrapper.py
--- a/tools/ngs_rna/tophat_wrapper.py
+++ b/tools/ngs_rna/tophat_wrapper.py
@@ -52,16 +52,16 @@
supplied GFF file. (ignored without -G)")
parser.add_option( '', '--no-novel-indels', action="store_true", dest='no_novel_indels', help="Skip indel search. Indel search is enabled by default.")
# Types of search.
- parser.add_option( '', '--microexon-search', action="store_true", dest='microexon_search', help='With this option, the pipeline will attempt to find alignments incident to microexons. Works only for reads 50bp or longer.')
parser.add_option( '', '--closure-search', action="store_true", dest='closure_search', help='Enables the mate pair closure-based search for junctions. Closure-based search should only be used when the expected inner distance between mates is small (<= 50bp)')
parser.add_option( '', '--no-closure-search', action="store_false", dest='closure_search' )
+ parser.add_option( '', '--min-closure-exon', dest='min_closure_exon', help='Minimum length for exonic hops in potential splice graph' )
+ parser.add_option( '', '--min-closure-intron', dest='min_closure_intron', help='Minimum intron length that may be found during closure search' )
+ parser.add_option( '', '--max-closure-intron', dest='max_closure_intron', help='Maximum intron length that may be found during closure search' )
+ parser.add_option( '', '--microexon-search', action="store_true", dest='microexon_search', help='With this option, the pipeline will attempt to find alignments incident to microexons. Works only for reads 50bp or longer.')
parser.add_option( '', '--coverage-search', action="store_true", dest='coverage_search', help='Enables the coverage based search for junctions. Use when coverage search is disabled by default (such as for reads 75bp or longer), for maximum sensitivity.')
parser.add_option( '', '--no-coverage-search', action="store_false", dest='coverage_search' )
parser.add_option( '', '--min-segment-intron', dest='min_segment_intron', help='Minimum intron length that may be found during split-segment search' )
parser.add_option( '', '--max-segment-intron', dest='max_segment_intron', help='Maximum intron length that may be found during split-segment search' )
- parser.add_option( '', '--min-closure-exon', dest='min_closure_exon', help='Minimum length for exonic hops in potential splice graph' )
- parser.add_option( '', '--min-closure-intron', dest='min_closure_intron', help='Minimum intron length that may be found during closure search' )
- parser.add_option( '', '--max-closure-intron', dest='max_closure_intron', help='Maximum intron length that may be found during closure search' )
parser.add_option( '', '--min-coverage-intron', dest='min_coverage_intron', help='Minimum intron length that may be found during coverage search' )
parser.add_option( '', '--max-coverage-intron', dest='max_coverage_intron', help='Maximum intron length that may be found during coverage search' )
@@ -166,7 +166,7 @@
opts += ' --no-closure-search'
if options.microexon_search:
opts += ' --microexon-search'
- if options.single_paired == 'paired':
+ if options.single_paired == 'paired' and options.mate_std_dev:
opts += ' --mate-std-dev %s' % options.mate_std_dev
if options.initial_read_mismatches:
opts += ' --initial-read-mismatches %d' % int( options.initial_read_mismatches )
diff -r 51fccbc2e9bc401c83b52447b513e201fe776ba2 -r 5293f1bf1dba762cae71983e40304d1d8e4ae5b5 tools/ngs_rna/tophat_wrapper.xml
--- a/tools/ngs_rna/tophat_wrapper.xml
+++ b/tools/ngs_rna/tophat_wrapper.xml
@@ -7,150 +7,111 @@
</requirements><command interpreter="python">
tophat_wrapper.py
- ## Change this to accommodate the number of threads you have available.
- --num-threads="4"
+
+ ## Change this to accommodate the number of threads you have available.
+ --num-threads="4"
- ## Provide outputs.
- --junctions-output=$junctions
- --hits-output=$accepted_hits
+ ## Provide outputs.
+ --junctions-output=$junctions
+ --hits-output=$accepted_hits
- ## Handle reference file.
- #if $refGenomeSource.genomeSource == "history":
- --own-file=$refGenomeSource.ownFile
+ ## Handle reference file.
+ #if $refGenomeSource.genomeSource == "history":
+ --own-file=$refGenomeSource.ownFile
+ #else:
+ --indexes-path="${refGenomeSource.index.fields.path}"
+ #end if
+
+ ## Are reads single-end or paired?
+ --single-paired=$singlePaired.sPaired
+
+ ## First input file always required.
+ --input1=$input1
+
+ ## Second input only if input is paired-end.
+ #if $singlePaired.sPaired == "paired"
+ --input2=$singlePaired.input2
+ -r $singlePaired.mate_inner_distance
+ --mate-std-dev=$singlePaired.mate_std_dev
+ #end if
+
+ ## Set params.
+ --settings=$params.settingsType
+ #if $params.settingsType == "full":
+ -a $params.anchor_length
+ -m $params.splice_mismatches
+ -i $params.min_intron_length
+ -I $params.max_intron_length
+ -g $params.max_multihits
+ --min-segment-intron $params.min_segment_intron
+ --max-segment-intron $params.max_segment_intron
+ --initial-read-mismatches=$params.initial_read_mismatches
+ --seg-mismatches=$params.seg_mismatches
+ --seg-length=$params.seg_length
+ --library-type=$params.library_type
+
+ ## Closure search.
+ #if $params.closure_search.use_search == "Yes":
+ --closure-search
+ --min-closure-exon $params.closure_search.min_closure_exon
+ --min-closure-intron $params.closure_search.min_closure_intron
+ --max-closure-intron $params.closure_search.max_closure_intron
#else:
- --indexes-path="${refGenomeSource.index.fields.path}"
+ --no-closure-search
+ #end if
+
+ ## Indel search.
+ #if $params.indel_search.allow_indel_search == "Yes":
+ ## --allow-indels
+ --max-insertion-length $params.indel_search.max_insertion_length
+ --max-deletion-length $params.indel_search.max_deletion_length
+ #else:
+ --no-novel-indels
#end if
- ## Are reads single-end or paired?
- --single-paired=$singlePaired.sPaired
-
- ## First input file always required.
- --input1=$input1
-
- ## Set params based on whether reads are single-end or paired.
- #if $singlePaired.sPaired == "single":
- --settings=$singlePaired.sParams.sSettingsType
- #if $singlePaired.sParams.sSettingsType == "full":
- -a $singlePaired.sParams.anchor_length
- -m $singlePaired.sParams.splice_mismatches
- -i $singlePaired.sParams.min_intron_length
- -I $singlePaired.sParams.max_intron_length
- -g $singlePaired.sParams.max_multihits
- --min-segment-intron $singlePaired.sParams.min_segment_intron
- --max-segment-intron $singlePaired.sParams.max_segment_intron
- --initial-read-mismatches=$singlePaired.sParams.initial_read_mismatches
- --seg-mismatches=$singlePaired.sParams.seg_mismatches
- --seg-length=$singlePaired.sParams.seg_length
- --library-type=$singlePaired.sParams.library_type
-
- ## Indel search.
- #if $singlePaired.sParams.indel_search.allow_indel_search == "Yes":
- ## --allow-indels
- --max-insertion-length $singlePaired.sParams.indel_search.max_insertion_length
- --max-deletion-length $singlePaired.sParams.indel_search.max_deletion_length
- #else:
- --no-novel-indels
- #end if
-
- ## Supplying junctions parameters.
- #if $singlePaired.sParams.own_junctions.use_junctions == "Yes":
- #if $singlePaired.sParams.own_junctions.gene_model_ann.use_annotations == "Yes":
- -G $singlePaired.sParams.own_junctions.gene_model_ann.gene_annotation_model
- #end if
- #if $singlePaired.sParams.own_junctions.raw_juncs.use_juncs == "Yes":
- -j $singlePaired.sParams.own_junctions.raw_juncs.raw_juncs
- #end if
- ## TODO: No idea why a string cast is necessary, but it is:
- #if str($singlePaired.sParams.own_junctions.no_novel_juncs) == "Yes":
- --no-novel-juncs
- #end if
- #end if
-
- #if $singlePaired.sParams.closure_search.use_search == "Yes":
- --closure-search
- --min-closure-exon $singlePaired.sParams.closure_search.min_closure_exon
- --min-closure-intron $singlePaired.sParams.closure_search.min_closure_intron
- --max-closure-intron $singlePaired.sParams.closure_search.max_closure_intron
- #else:
- --no-closure-search
- #end if
- #if $singlePaired.sParams.coverage_search.use_search == "Yes":
- --coverage-search
- --min-coverage-intron $singlePaired.sParams.coverage_search.min_coverage_intron
- --max-coverage-intron $singlePaired.sParams.coverage_search.max_coverage_intron
- #else:
- --no-coverage-search
- #end if
- ## TODO: No idea why the type conversion is necessary, but it seems to be.
- #if str($singlePaired.sParams.microexon_search) == "Yes":
- --microexon-search
- #end if
+ ## Supplying junctions parameters.
+ #if $params.own_junctions.use_junctions == "Yes":
+ #if $params.own_junctions.gene_model_ann.use_annotations == "Yes":
+ -G $params.own_junctions.gene_model_ann.gene_annotation_model
#end if
- #else:
- --input2=$singlePaired.input2
- -r $singlePaired.mate_inner_distance
- --settings=$singlePaired.pParams.pSettingsType
- #if $singlePaired.pParams.pSettingsType == "full":
- --mate-std-dev=$singlePaired.pParams.mate_std_dev
- -a $singlePaired.pParams.anchor_length
- -m $singlePaired.pParams.splice_mismatches
- -i $singlePaired.pParams.min_intron_length
- -I $singlePaired.pParams.max_intron_length
- -g $singlePaired.pParams.max_multihits
- --min-segment-intron $singlePaired.pParams.min_segment_intron
- --max-segment-intron $singlePaired.pParams.max_segment_intron
- --initial-read-mismatches=$singlePaired.pParams.initial_read_mismatches
- --seg-mismatches=$singlePaired.pParams.seg_mismatches
- --seg-length=$singlePaired.pParams.seg_length
- --library-type=$singlePaired.pParams.library_type
-
- ## Indel search.
- #if $singlePaired.pParams.indel_search.allow_indel_search == "Yes":
- ## --allow-indels
- --max-insertion-length $singlePaired.pParams.indel_search.max_insertion_length
- --max-deletion-length $singlePaired.pParams.indel_search.max_deletion_length
- #else:
- --no-novel-indels
- #end if
-
- ## Supplying junctions parameters.
- #if $singlePaired.pParams.own_junctions.use_junctions == "Yes":
- #if $singlePaired.pParams.own_junctions.gene_model_ann.use_annotations == "Yes":
- -G $singlePaired.pParams.own_junctions.gene_model_ann.gene_annotation_model
- #end if
- #if $singlePaired.pParams.own_junctions.raw_juncs.use_juncs == "Yes":
- -j $singlePaired.pParams.own_junctions.raw_juncs.raw_juncs
- #end if
- ## TODO: No idea why type cast is necessary, but it is:
- #if str($singlePaired.pParams.own_junctions.no_novel_juncs) == "Yes":
- --no-novel-juncs
- #end if
- #end if
-
- #if $singlePaired.pParams.closure_search.use_search == "Yes":
- --closure-search
- --min-closure-exon $singlePaired.pParams.closure_search.min_closure_exon
- --min-closure-intron $singlePaired.pParams.closure_search.min_closure_intron
- --max-closure-intron $singlePaired.pParams.closure_search.max_closure_intron
- #else:
- --no-closure-search
- #end if
- #if $singlePaired.pParams.coverage_search.use_search == "Yes":
- --coverage-search
- --min-coverage-intron $singlePaired.pParams.coverage_search.min_coverage_intron
- --max-coverage-intron $singlePaired.pParams.coverage_search.max_coverage_intron
- #else:
- --no-coverage-search
- #end if
- ## TODO: No idea why the type conversion is necessary, but it seems to be.
- #if str ($singlePaired.pParams.microexon_search) == "Yes":
- --microexon-search
- #end if
+ #if $params.own_junctions.raw_juncs.use_juncs == "Yes":
+ -j $params.own_junctions.raw_juncs.raw_juncs
+ #end if
+ ## TODO: No idea why a string cast is necessary, but it is:
+ #if str($params.own_junctions.no_novel_juncs) == "Yes":
+ --no-novel-juncs
#end if
#end if
+
+ #if $params.coverage_search.use_search == "Yes":
+ --coverage-search
+ --min-coverage-intron $params.coverage_search.min_coverage_intron
+ --max-coverage-intron $params.coverage_search.max_coverage_intron
+ #else:
+ --no-coverage-search
+ #end if
+ ## TODO: No idea why the type conversion is necessary, but it seems to be.
+ #if str($params.microexon_search) == "Yes":
+ --microexon-search
+ #end if
+ #end if
</command><inputs>
- <param format="fastqsanger" name="input1" type="data" label="RNA-Seq FASTQ file" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33" />
+ <conditional name="singlePaired">
+ <param name="sPaired" type="select" label="Is this library mate-paired?">
+ <option value="single">Single-end</option>
+ <option value="paired">Paired-end</option>
+ </param>
+ <when value="single">
+ <param format="fastqsanger" name="input1" type="data" label="RNA-Seq FASTQ dataset" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33"/>
+ </when>
+ <when value="paired">
+ <param format="fastqsanger" name="input1" type="data" label="RNA-Seq FASTQ dataset--forward reads" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33" />
+ <param format="fastqsanger" name="input2" type="data" label="RNA-Seq FASTQ dataset--reverse reads" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33" />
+ <param name="mate_inner_distance" type="integer" value="20" label="Mean Inner Distance between Mate Pairs" />
+ <param name="mate_std_dev" type="integer" value="20" label="Std. Dev for Distance between Mate Pairs" help="The standard deviation for the distribution on inner distances between mate pairs."/>
+ </when>
+ </conditional><conditional name="refGenomeSource"><param name="genomeSource" type="select" label="Will you select a reference genome from your history or use a built-in index?" help="Built-ins were indexed using default options"><option value="indexed">Use a built-in index</option>
@@ -168,221 +129,109 @@
<param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select the reference genome" /></when><!-- history --></conditional><!-- refGenomeSource -->
- <conditional name="singlePaired">
- <param name="sPaired" type="select" label="Is this library mate-paired?">
- <option value="single">Single-end</option>
- <option value="paired">Paired-end</option>
+ <conditional name="params">
+ <param name="settingsType" type="select" label="TopHat settings to use" help="You can use the default settings or set custom values for any of Tophat's parameters.">
+ <option value="preSet">Use Defaults</option>
+ <option value="full">Full parameter list</option></param>
- <when value="single">
- <conditional name="sParams">
- <param name="sSettingsType" type="select" label="TopHat settings to use" help="You can use the default settings or set custom values for any of Tophat's parameters.">
- <option value="preSet">Use Defaults</option>
- <option value="full">Full parameter list</option>
- </param>
- <when value="preSet" />
- <!-- Full/advanced params. -->
- <when value="full">
- <param name="library_type" type="select" label="Library Type" help="TopHat will treat the reads as strand specific. Every read alignment will have an XS attribute tag. Consider supplying library type options below to select the correct RNA-seq protocol.">
- <option value="fr-unstranded">FR Unstranded</option>
- <option value="fr-firststrand">FR First Strand</option>
- <option value="fr-secondstrand">FR Second Strand</option>
+ <when value="preSet" />
+ <!-- Full/advanced params. -->
+ <when value="full">
+ <param name="library_type" type="select" label="Library Type" help="TopHat will treat the reads as strand specific. Every read alignment will have an XS attribute tag. Consider supplying library type options below to select the correct RNA-seq protocol.">
+ <option value="fr-unstranded">FR Unstranded</option>
+ <option value="fr-firststrand">FR First Strand</option>
+ <option value="fr-secondstrand">FR Second Strand</option>
+ </param>
+ <param name="anchor_length" type="integer" value="8" label="Anchor length (at least 3)" help="Report junctions spanned by reads with at least this many bases on each side of the junction." />
+ <param name="splice_mismatches" type="integer" value="0" label="Maximum number of mismatches that can appear in the anchor region of spliced alignment" />
+ <param name="min_intron_length" type="integer" value="70" label="The minimum intron length" help="TopHat will ignore donor/acceptor pairs closer than this many bases apart." />
+ <param name="max_intron_length" type="integer" value="500000" label="The maximum intron length" help="When searching for junctions ab initio, TopHat will ignore donor/acceptor pairs farther than this many bases apart, except when such a pair is supported by a split segment alignment of a long read." />
+ <conditional name="indel_search">
+ <param name="allow_indel_search" type="select" label="Allow indel search">
+ <option value="Yes">Yes</option>
+ <option value="No">No</option></param>
- <param name="anchor_length" type="integer" value="8" label="Anchor length (at least 3)" help="Report junctions spanned by reads with at least this many bases on each side of the junction." />
- <param name="splice_mismatches" type="integer" value="0" label="Maximum number of mismatches that can appear in the anchor region of spliced alignment" />
- <param name="min_intron_length" type="integer" value="70" label="The minimum intron length" help="TopHat will ignore donor/acceptor pairs closer than this many bases apart." />
- <param name="max_intron_length" type="integer" value="500000" label="The maximum intron length" help="When searching for junctions ab initio, TopHat will ignore donor/acceptor pairs farther than this many bases apart, except when such a pair is supported by a split segment alignment of a long read." />
- <conditional name="indel_search">
- <param name="allow_indel_search" type="select" label="Allow indel search">
- <option value="Yes">Yes</option>
- <option value="No">No</option>
- </param>
- <when value="No"/>
- <when value="Yes">
- <param name="max_insertion_length" type="integer" value="3" label="Max insertion length." help="The maximum insertion length." />
- <param name="max_deletion_length" type="integer" value="3" label="Max deletion length." help="The maximum deletion length." />
- </when>
- </conditional>
-alignments (number of reads divided by average depth of coverage)" help="0.0 to 1.0 (0 to turn off)" />
- <param name="max_multihits" type="integer" value="20" label="Maximum number of alignments to be allowed" />
- <param name="min_segment_intron" type="integer" value="50" label="Minimum intron length that may be found during split-segment (default) search" />
- <param name="max_segment_intron" type="integer" value="500000" label="Maximum intron length that may be found during split-segment (default) search" />
- <param name="initial_read_mismatches" type="integer" min="0" value="2" label="Number of mismatches allowed in the initial read mapping" />
- <param name="seg_mismatches" type="integer" min="0" max="3" value="2" label="Number of mismatches allowed in each segment alignment for reads mapped independently" />
- <param name="seg_length" type="integer" value="25" label="Minimum length of read segments" />
-
- <!-- Options for supplying own junctions. -->
- <conditional name="own_junctions">
- <param name="use_junctions" type="select" label="Use Own Junctions">
+ <when value="No"/>
+ <when value="Yes">
+ <param name="max_insertion_length" type="integer" value="3" label="Max insertion length." help="The maximum insertion length." />
+ <param name="max_deletion_length" type="integer" value="3" label="Max deletion length." help="The maximum deletion length." />
+ </when>
+ </conditional>
+ alignments (number of reads divided by average depth of coverage)" help="0.0 to 1.0 (0 to turn off)" />
+ <param name="max_multihits" type="integer" value="20" label="Maximum number of alignments to be allowed" />
+ <param name="min_segment_intron" type="integer" value="50" label="Minimum intron length that may be found during split-segment (default) search" />
+ <param name="max_segment_intron" type="integer" value="500000" label="Maximum intron length that may be found during split-segment (default) search" />
+ <param name="initial_read_mismatches" type="integer" min="0" value="2" label="Number of mismatches allowed in the initial read mapping" />
+ <param name="seg_mismatches" type="integer" min="0" max="3" value="2" label="Number of mismatches allowed in each segment alignment for reads mapped independently" />
+ <param name="seg_length" type="integer" value="25" label="Minimum length of read segments" />
+
+ <!-- Options for supplying own junctions. -->
+ <conditional name="own_junctions">
+ <param name="use_junctions" type="select" label="Use Own Junctions">
+ <option value="No">No</option>
+ <option value="Yes">Yes</option>
+ </param>
+ <when value="Yes">
+ <conditional name="gene_model_ann">
+ <param name="use_annotations" type="select" label="Use Gene Annotation Model">
+ <option value="No">No</option>
+ <option value="Yes">Yes</option>
+ </param>
+ <when value="No" />
+ <when value="Yes">
+ <param format="gtf" name="gene_annotation_model" type="data" label="Gene Model Annotations" help="TopHat will use the exon records in this file to build a set of known splice junctions for each gene, and will attempt to align reads to these junctions even if they would not normally be covered by the initial mapping."/>
+ </when>
+ </conditional>
+ <conditional name="raw_juncs">
+ <param name="use_juncs" type="select" label="Use Raw Junctions">
+ <option value="No">No</option>
+ <option value="Yes">Yes</option>
+ </param>
+ <when value="No" />
+ <when value="Yes">
+ <param format="interval" name="raw_juncs" type="data" label="Raw Junctions" help="Supply TopHat with a list of raw junctions. Junctions are specified one per line, in a tab-delimited format. Records look like: [chrom] [left] [right] [+/-] left and right are zero-based coordinates, and specify the last character of the left sequenced to be spliced to the first character of the right sequence, inclusive."/>
+ </when>
+ </conditional>
+ <param name="no_novel_juncs" type="select" label="Only look for supplied junctions"><option value="No">No</option><option value="Yes">Yes</option></param>
- <when value="Yes">
- <conditional name="gene_model_ann">
- <param name="use_annotations" type="select" label="Use Gene Annotation Model">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- <when value="No" />
- <when value="Yes">
- <param format="gtf" name="gene_annotation_model" type="data" label="Gene Model Annotations" help="TopHat will use the exon records in this file to build a set of known splice junctions for each gene, and will attempt to align reads to these junctions even if they would not normally be covered by the initial mapping."/>
- </when>
- </conditional>
- <conditional name="raw_juncs">
- <param name="use_juncs" type="select" label="Use Raw Junctions">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- <when value="No" />
- <when value="Yes">
- <param format="interval" name="raw_juncs" type="data" label="Raw Junctions" help="Supply TopHat with a list of raw junctions. Junctions are specified one per line, in a tab-delimited format. Records look like: [chrom] [left] [right] [+/-] left and right are zero-based coordinates, and specify the last character of the left sequenced to be spliced to the first character of the right sequence, inclusive."/>
- </when>
- </conditional>
- <param name="no_novel_juncs" type="select" label="Only look for supplied junctions">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- </when>
- <when value="No" />
- </conditional><!-- /own_junctions -->
-
- <!-- Closure search. -->
- <conditional name="closure_search">
- <param name="use_search" type="select" label="Use Closure Search">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- <when value="Yes">
- <param name="min_closure_exon" type="integer" value="50" label="During closure search for paired end reads, exonic hops in the potential splice graph must be at least this long. The default is 50." />
- <param name="min_closure_intron" type="integer" value="50" label="Minimum intron length that may be found during closure search" />
- <param name="max_closure_intron" type="integer" value="5000" label="Maximum intron length that may be found during closure search" />
- </when>
- <when value="No" />
- </conditional>
- <!-- Coverage search. -->
- <conditional name="coverage_search">
- <param name="use_search" type="select" label="Use Coverage Search">
- <option selected="true" value="Yes">Yes</option>
- <option value="No">No</option>
- </param>
- <when value="Yes">
- <param name="min_coverage_intron" type="integer" value="50" label="Minimum intron length that may be found during coverage search" />
- <param name="max_coverage_intron" type="integer" value="20000" label="Maximum intron length that may be found during coverage search" />
- </when>
- <when value="No" />
- </conditional>
- <param name="microexon_search" type="select" label="Use Microexon Search" help="With this option, the pipeline will attempt to find alignments incident to microexons. Works only for reads 50bp or longer.">
+ </when>
+ <when value="No" />
+ </conditional><!-- /own_junctions -->
+
+ <!-- Closure search. -->
+ <conditional name="closure_search">
+ <param name="use_search" type="select" label="Use Closure Search">
+ <option value="No">No</option>
+ <option value="Yes">Yes</option>
+ </param>
+ <when value="Yes">
+ <param name="min_closure_exon" type="integer" value="50" label="During closure search for paired end reads, exonic hops in the potential splice graph must be at least this long. The default is 50." />
+ <param name="min_closure_intron" type="integer" value="50" label="Minimum intron length that may be found during closure search" />
+ <param name="max_closure_intron" type="integer" value="5000" label="Maximum intron length that may be found during closure search" />
+ </when>
+ <when value="No" />
+ </conditional>
+
+ <!-- Coverage search. -->
+ <conditional name="coverage_search">
+ <param name="use_search" type="select" label="Use Coverage Search">
+ <option selected="true" value="Yes">Yes</option><option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- </when><!-- full -->
- </conditional><!-- sParams -->
- </when><!-- single -->
- <when value="paired">
- <param format="fastqsanger" name="input2" type="data" label="RNA-Seq FASTQ file" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33" />
- <param name="mate_inner_distance" type="integer" value="20" label="Mean Inner Distance between Mate Pairs" />
- <conditional name="pParams">
- <param name="pSettingsType" type="select" label="TopHat settings to use" help="For most mapping needs use Commonly used settings. If you want full control use Full parameter list">
- <option value="preSet">Commonly used</option>
- <option value="full">Full parameter list</option></param>
- <when value="preSet" />
- <!-- Full/advanced params. -->
- <when value="full">
- <param name="library_type" type="select" label="Library Type" help="TopHat will treat the reads as strand specific. Every read alignment will have an XS attribute tag. Consider supplying library type options below to select the correct RNA-seq protocol.">
- <option value="fr-unstranded">FR Unstranded</option>
- <option value="fr-firststrand">FR First Strand</option>
- <option value="fr-secondstrand">FR Second Strand</option>
- </param>
- <param name="mate_std_dev" type="integer" value="20" label="Std. Dev for Distance between Mate Pairs" help="The standard deviation for the distribution on inner distances between mate pairs."/>
- <param name="anchor_length" type="integer" value="8" label="Anchor length (at least 3)" help="Report junctions spanned by reads with at least this many bases on each side of the junction." />
- <param name="splice_mismatches" type="integer" value="0" label="Maximum number of mismatches that can appear in the anchor region of spliced alignment" />
- <param name="min_intron_length" type="integer" value="70" label="The minimum intron length" help="TopHat will ignore donor/acceptor pairs closer than this many bases apart." />
- <param name="max_intron_length" type="integer" value="500000" label="The maximum intron length" help="When searching for junctions ab initio, TopHat will ignore donor/acceptor pairs farther than this many bases apart, except when such a pair is supported by a split segment alignment of a long read." />
- <conditional name="indel_search">
- <param name="allow_indel_search" type="select" label="Allow indel search">
- <option value="Yes">Yes</option>
- <option value="No">No</option>
- </param>
- <when value="No"/>
- <when value="Yes">
- <param name="max_insertion_length" type="integer" value="3" label="Max insertion length." help="The maximum insertion length." />
- <param name="max_deletion_length" type="integer" value="3" label="Max deletion length." help="The maximum deletion length." />
- </when>
- </conditional>
- <param name="max_multihits" type="integer" value="20" label="Maximum number of alignments to be allowed" />
- <param name="min_segment_intron" type="integer" value="50" label="Minimum intron length that may be found during split-segment (default) search" />
- <param name="max_segment_intron" type="integer" value="500000" label="Maximum intron length that may be found during split-segment (default) search" />
- <param name="initial_read_mismatches" type="integer" min="0" value="2" label="Number of mismatches allowed in the initial read mapping" />
- <param name="seg_mismatches" type="integer" min="0" max="3" value="2" label="Number of mismatches allowed in each segment alignment for reads mapped independently" />
- <param name="seg_length" type="integer" value="25" label="Minimum length of read segments" />
- <!-- Options for supplying own junctions. -->
- <conditional name="own_junctions">
- <param name="use_junctions" type="select" label="Use Own Junctions">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- <when value="Yes">
- <conditional name="gene_model_ann">
- <param name="use_annotations" type="select" label="Use Gene Annotation Model">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- <when value="No" />
- <when value="Yes">
- <param format="gtf" name="gene_annotation_model" type="data" label="Gene Model Annotations" help="TopHat will use the exon records in this file to build a set of known splice junctions for each gene, and will attempt to align reads to these junctions even if they would not normally be covered by the initial mapping."/>
- </when>
- </conditional>
- <conditional name="raw_juncs">
- <param name="use_juncs" type="select" label="Use Raw Junctions">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- <when value="No" />
- <when value="Yes">
- <param format="interval" name="raw_juncs" type="data" label="Raw Junctions" help="Supply TopHat with a list of raw junctions. Junctions are specified one per line, in a tab-delimited format. Records look like: [chrom] [left] [right] [+/-] left and right are zero-based coordinates, and specify the last character of the left sequenced to be spliced to the first character of the right sequence, inclusive."/>
- </when>
- </conditional>
- <param name="no_novel_juncs" type="select" label="Only look for supplied junctions">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- </when>
- <when value="No" />
- </conditional><!-- /own_junctions -->
-
- <!-- Closure search. -->
- <conditional name="closure_search">
- <param name="use_search" type="select" label="Use Closure Search">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- <when value="Yes">
- <param name="min_closure_exon" type="integer" value="50" label="During closure search for paired end reads, exonic hops in the potential splice graph must be at least this long. The default is 50." />
- <param name="min_closure_intron" type="integer" value="50" label="Minimum intron length that may be found during closure search" />
- <param name="max_closure_intron" type="integer" value="5000" label="Maximum intron length that may be found during closure search" />
- </when>
- <when value="No" />
- </conditional>
- <!-- Coverage search. -->
- <conditional name="coverage_search">
- <param name="use_search" type="select" label="Use Coverage Search">
- <option selected="true" value="Yes">Yes</option>
- <option value="No">No</option>
- </param>
- <when value="Yes">
- <param name="min_coverage_intron" type="integer" value="50" label="Minimum intron length that may be found during coverage search" />
- <param name="max_coverage_intron" type="integer" value="20000" label="Maximum intron length that may be found during coverage search" />
- </when>
- <when value="No" />
- </conditional>
- <param name="microexon_search" type="select" label="Use Microexon Search" help="With this option, the pipeline will attempt to find alignments incident to microexons. Works only for reads 50bp or longer.">
- <option value="No">No</option>
- <option value="Yes">Yes</option>
- </param>
- </when><!-- full -->
- </conditional><!-- pParams -->
- </when><!-- paired -->
- </conditional>
+ <when value="Yes">
+ <param name="min_coverage_intron" type="integer" value="50" label="Minimum intron length that may be found during coverage search" />
+ <param name="max_coverage_intron" type="integer" value="20000" label="Maximum intron length that may be found during coverage search" />
+ </when>
+ <when value="No" />
+ </conditional>
+ <param name="microexon_search" type="select" label="Use Microexon Search" help="With this option, the pipeline will attempt to find alignments incident to microexons. Works only for reads 50bp or longer.">
+ <option value="No">No</option>
+ <option value="Yes">Yes</option>
+ </param>
+ </when><!-- full -->
+ </conditional><!-- params --></inputs><outputs>
@@ -471,11 +320,11 @@
tophat -o tmp_dir -p 1 tophat_in1 test-data/tophat_in2.fastqsanger
Rename the files in tmp_dir appropriately
-->
+ <param name="sPaired" value="single" /><param name="input1" ftype="fastqsanger" value="tophat_in2.fastqsanger" /><param name="genomeSource" value="indexed" /><param name="index" value="tophat_test" />
- <param name="sPaired" value="single" />
- <param name="sSettingsType" value="preSet" />
+ <param name="settingsType" value="preSet" /><output name="junctions" file="tophat_out1j.bed" /><output name="accepted_hits" file="tophat_out1h.bam" compare="sim_size" /></test>
@@ -486,13 +335,13 @@
tophat -o tmp_dir -p 1 -r 20 tophat_in1 test-data/tophat_in2.fastqsanger test-data/tophat_in3.fastqsanger
Rename the files in tmp_dir appropriately
-->
+ <param name="sPaired" value="paired" /><param name="input1" ftype="fastqsanger" value="tophat_in2.fastqsanger" />
+ <param name="input2" ftype="fastqsanger" value="tophat_in3.fastqsanger" /><param name="genomeSource" value="history" /><param name="ownFile" ftype="fasta" value="tophat_in1.fasta" />
- <param name="sPaired" value="paired" />
- <param name="input2" ftype="fastqsanger" value="tophat_in3.fastqsanger" /><param name="mate_inner_distance" value="20" />
- <param name="pSettingsType" value="preSet" />
+ <param name="settingsType" value="preSet" /><output name="junctions" file="tophat_out2j.bed" /><output name="accepted_hits" file="tophat_out2h.bam" compare="sim_size" /></test>
@@ -500,15 +349,15 @@
<test><!-- Tophat commands:
bowtie-build -f test-data/tophat_in1.fasta tophat_in1
- tophat -o tmp_dir -p 1 -a 8 -m 0 -i 70 -I 500000 -F 0.15 -g 40 +coverage-search +min-coverage-intron 50 +max-coverage-intro 20000 +segment-mismatches 2 +segment-length 25 +closure-search +min-closure-exon 50 +min-closure-intron 50 +max-closure-intro 5000 +microexon-search tophat_in1 test-data/tophat_in2.fastqsanger
+ tophat -o tmp_dir -p 1 -a 8 -m 0 -i 70 -I 500000 -F 0.15 -g 40 +coverage-search +min-coverage-intron 50 +max-coverage-intro 20000 +segment-mismatches 2 +segment-length 25 +microexon-search tophat_in1 test-data/tophat_in2.fastqsanger
Replace the + with double-dash
Rename the files in tmp_dir appropriately
-->
+ <param name="sPaired" value="single"/><param name="input1" ftype="fastqsanger" value="tophat_in2.fastqsanger"/><param name="genomeSource" value="history"/><param name="ownFile" value="tophat_in1.fasta"/>
- <param name="sPaired" value="single"/>
- <param name="sSettingsType" value="full"/>
+ <param name="settingsType" value="full"/><param name="library_type" value="FR Unstranded"/><param name="anchor_length" value="8"/><param name="splice_mismatches" value="0"/>
@@ -546,13 +395,13 @@
Replace the + with double-dash
Rename the files in tmp_dir appropriately
-->
+ <param name="sPaired" value="paired"/><param name="input1" ftype="fastqsanger" value="tophat_in2.fastqsanger"/>
+ <param name="input2" ftype="fastqsanger" value="tophat_in3.fastqsanger"/><param name="genomeSource" value="indexed"/><param name="index" value="tophat_test"/>
- <param name="sPaired" value="paired"/>
- <param name="input2" ftype="fastqsanger" value="tophat_in3.fastqsanger"/><param name="mate_inner_distance" value="20"/>
- <param name="pSettingsType" value="full"/>
+ <param name="settingsType" value="full"/><param name="library_type" value="FR Unstranded"/><param name="mate_std_dev" value="20"/><param name="anchor_length" value="8"/>
@@ -644,16 +493,15 @@
-j/--raw-juncs [juncs file] Supply TopHat with a list of raw junctions. Junctions are specified one per line, in a tab-delimited format. Records look like: [chrom] [left] [right] [+/-], left and right are zero-based coordinates, and specify the last character of the left sequenced to be spliced to the first character of the right sequence, inclusive.
-no-novel-juncs Only look for junctions indicated in the supplied GFF file. (ignored without -G)
--no-closure-search Disables the mate pair closure-based search for junctions. Currently, has no effect - closure search is off by default.
- --closure-search Enables the mate pair closure-based search for junctions. Closure-based search should only be used when the expected inner distance between mates is small (about or less than 50bp)
+ --closure-search Enables the mate pair closure-based search for junctions. Closure-based search should only be used when the
+ --min-closure-exon During closure search for paired end reads, exonic hops in the potential splice graph must be at least this long. The default is 50.
+ --min-closure-intron The minimum intron length that may be found during closure search. The default is 50.
+ --max-closure-intron The maximum intron length that may be found during closure search. The default is 5000. expected inner distance between mates is small (about or less than 50bp)
--no-coverage-search Disables the coverage based search for junctions.
--coverage-search Enables the coverage based search for junctions. Use when coverage search is disabled by default (such as for reads 75bp or longer), for maximum sensitivity.
--microexon-search With this option, the pipeline will attempt to find alignments incident to microexons. Works only for reads 50bp or longer.
- --butterfly-search TopHat will use a slower but potentially more sensitive algorithm to find junctions in addition to its standard search. Consider using this if you expect that your experiment produced a lot of reads from pre-mRNA, that fall within the introns of your transcripts.
--segment-mismatches Read segments are mapped independently, allowing up to this many mismatches in each segment alignment. The default is 2.
--segment-length Each read is cut up into segments, each at least this long. These segments are mapped independently. The default is 25.
- --min-closure-exon During closure search for paired end reads, exonic hops in the potential splice graph must be at least this long. The default is 50.
- --min-closure-intron The minimum intron length that may be found during closure search. The default is 50.
- --max-closure-intron The maximum intron length that may be found during closure search. The default is 5000.
--min-coverage-intron The minimum intron length that may be found during coverage search. The default is 50.
--max-coverage-intron The maximum intron length that may be found during coverage search. The default is 20000.
--min-segment-intron The minimum intron length that may be found during split-segment search. The default is 50.
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/51fccbc2e9bc/
changeset: 51fccbc2e9bc
user: jgoecks
date: 2012-04-26 21:28:17
summary: Skeleton wrapper for Bowtie2.
affected #: 5 files
diff -r 1c8eb226af94b29ef8484c4fbed557282170259e -r 51fccbc2e9bc401c83b52447b513e201fe776ba2 tool-data/bowtie2_indices.loc.sample
--- /dev/null
+++ b/tool-data/bowtie2_indices.loc.sample
@@ -0,0 +1,37 @@
+#This is a sample file distributed with Galaxy that enables tools
+#to use a directory of Bowtie2 indexed sequences data files. You will
+#need to create these data files and then create a bowtie_indices.loc
+#file similar to this one (store it in this directory) that points to
+#the directories in which those files are stored. The bowtie2_indices.loc
+#file has this format (longer white space characters are TAB characters):
+#
+#<unique_build_id><dbkey><display_name><file_base_path>
+#
+#So, for example, if you had hg18 indexed stored in
+#/depot/data2/galaxy/bowtie2/hg18/,
+#then the bowtie2_indices.loc entry would look like this:
+#
+#hg18 hg18 hg18 /depot/data2/galaxy/bowtie2/hg18/hg18
+#
+#and your /depot/data2/galaxy/bowtie2/hg18/ directory
+#would contain hg18.*.ebwt files:
+#
+#-rw-r--r-- 1 james universe 830134 2005-09-13 10:12 hg18.1.ebwt
+#-rw-r--r-- 1 james universe 527388 2005-09-13 10:12 hg18.2.ebwt
+#-rw-r--r-- 1 james universe 269808 2005-09-13 10:12 hg18.3.ebwt
+#...etc...
+#
+#Your bowtie2_indices.loc file should include an entry per line for each
+#index set you have stored. The "file" in the path does not actually
+#exist, but it is the prefix for the actual index files. For example:
+#
+#hg18canon hg18 hg18 Canonical /depot/data2/galaxy/bowtie2/hg18/hg18canon
+#hg18full hg18 hg18 Full /depot/data2/galaxy/bowtie2/hg18/hg18full
+#/orig/path/hg19 hg19 hg19 /depot/data2/galaxy/bowtie2/hg19/hg19
+#...etc...
+#
+#Note that for backwards compatibility with workflows, the unique ID of
+#an entry must be the path that was in the original loc file, because that
+#is the value stored in the workflow for that parameter. That is why the
+#hg19 entry above looks odd. New genomes can be better-looking.
+#
diff -r 1c8eb226af94b29ef8484c4fbed557282170259e -r 51fccbc2e9bc401c83b52447b513e201fe776ba2 tool_conf.xml.sample
--- a/tool_conf.xml.sample
+++ b/tool_conf.xml.sample
@@ -336,6 +336,7 @@
<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/bowtie2_wrapper.xml" /><tool file="sr_mapping/bowtie_color_wrapper.xml" /><tool file="sr_mapping/bwa_wrapper.xml" /><tool file="sr_mapping/bwa_color_wrapper.xml" />
diff -r 1c8eb226af94b29ef8484c4fbed557282170259e -r 51fccbc2e9bc401c83b52447b513e201fe776ba2 tool_data_table_conf.xml.sample
--- a/tool_data_table_conf.xml.sample
+++ b/tool_data_table_conf.xml.sample
@@ -25,6 +25,11 @@
<columns>value, dbkey, name, path</columns><file path="tool-data/bowtie_indices.loc" /></table>
+ <!-- Locations of indexes in the Bowtie2 mapper format -->
+ <table name="bowtie2_indexes" comment_char="#">
+ <columns>value, dbkey, name, path</columns>
+ <file path="tool-data/bowtie2_indices.loc" />
+ </table><!-- Locations of indexes in the Bowtie color-space mapper format --><table name="bowtie_indexes_color" comment_char="#"><columns>value, dbkey, name, path</columns>
diff -r 1c8eb226af94b29ef8484c4fbed557282170259e -r 51fccbc2e9bc401c83b52447b513e201fe776ba2 tools/sr_mapping/bowtie2_wrapper.py
--- /dev/null
+++ b/tools/sr_mapping/bowtie2_wrapper.py
@@ -0,0 +1,115 @@
+#!/usr/bin/env python
+
+import optparse, os, shutil, subprocess, sys, tempfile, fileinput
+
+def stop_err( msg ):
+ sys.stderr.write( "%s\n" % msg )
+ sys.exit()
+
+def __main__():
+ #Parse Command Line
+ parser = optparse.OptionParser()
+ parser.add_option( '-p', '--num-threads', dest='num_threads', help='Use this many threads to align reads. The default is 1.' )
+ parser.add_option( '', '--own-file', dest='own_file', help='' )
+ parser.add_option( '-D', '--indexes-path', dest='index_path', help='Indexes directory; location of .ebwt and .fa files.' )
+
+ # Wrapper options.
+ parser.add_option( '-O', '--output', dest='output' )
+ parser.add_option( '-1', '--input1', dest='input1', help='The (forward or single-end) reads file in Sanger FASTQ format' )
+ parser.add_option( '-2', '--input2', dest='input2', help='The reverse reads file in Sanger FASTQ format' )
+ parser.add_option( '', '--single-paired', dest='single_paired', help='' )
+ parser.add_option( '', '--settings', dest='settings', help='' )
+
+ (options, args) = parser.parse_args()
+
+ # Creat bowtie index if necessary.
+ tmp_index_dir = tempfile.mkdtemp()
+ if options.own_file:
+ index_path = os.path.join( tmp_index_dir, '.'.join( os.path.split( options.own_file )[1].split( '.' )[:-1] ) )
+ try:
+ os.link( options.own_file, index_path + '.fa' )
+ except:
+ # Bowtie prefers (but doesn't require) fasta file to be in same directory, with .fa extension
+ pass
+ cmd_index = 'bowtie2-build -f %s %s' % ( options.own_file, index_path )
+ try:
+ tmp = tempfile.NamedTemporaryFile( dir=tmp_index_dir ).name
+ tmp_stderr = open( tmp, 'wb' )
+ proc = subprocess.Popen( args=cmd_index, shell=True, cwd=tmp_index_dir, stderr=tmp_stderr.fileno() )
+ returncode = proc.wait()
+ tmp_stderr.close()
+ # get stderr, allowing for case where it's very large
+ tmp_stderr = open( tmp, 'rb' )
+ stderr = ''
+ buffsize = 1048576
+ try:
+ while True:
+ stderr += tmp_stderr.read( buffsize )
+ if not stderr or len( stderr ) % buffsize != 0:
+ break
+ except OverflowError:
+ pass
+ tmp_stderr.close()
+ if returncode != 0:
+ raise Exception, stderr
+ except Exception, e:
+ if os.path.exists( tmp_index_dir ):
+ shutil.rmtree( tmp_index_dir )
+ stop_err( 'Error indexing reference sequence\n' + str( e ) )
+ else:
+ index_path = options.index_path
+
+ # Build bowtie command.
+ cmd = 'bowtie2 %s -x %s %s -S %s'
+
+ # Set up reads.
+ if options.single_paired == 'paired':
+ reads = " -1 %s -2 %s" % ( options.input1, options.input2 )
+ else:
+ reads = " -U %s" % ( options.input1 )
+
+ # Set up options.
+ opts = '-p %s' % ( options.num_threads )
+ if options.settings == 'preSet':
+ pass
+ else:
+ pass
+
+ # Final command:
+ cmd = cmd % ( opts, index_path, reads, options.output )
+ print cmd
+
+ # Run
+ try:
+ tmp_out = tempfile.NamedTemporaryFile().name
+ tmp_stdout = open( tmp_out, 'wb' )
+ tmp_err = tempfile.NamedTemporaryFile().name
+ tmp_stderr = open( tmp_err, 'wb' )
+ proc = subprocess.Popen( args=cmd, shell=True, cwd=".", stdout=tmp_stdout, stderr=tmp_stderr )
+ returncode = proc.wait()
+ tmp_stderr.close()
+ # get stderr, allowing for case where it's very large
+ tmp_stderr = open( tmp_err, 'rb' )
+ stderr = ''
+ buffsize = 1048576
+ try:
+ while True:
+ stderr += tmp_stderr.read( buffsize )
+ if not stderr or len( stderr ) % buffsize != 0:
+ break
+ except OverflowError:
+ pass
+ tmp_stdout.close()
+ tmp_stderr.close()
+ if returncode != 0:
+ raise Exception, stderr
+
+ # TODO: look for errors in program output.
+ except Exception, e:
+ stop_err( 'Error in bowtie2:\n' + str( e ) )
+
+ # Clean up temp dirs
+ if os.path.exists( tmp_index_dir ):
+ shutil.rmtree( tmp_index_dir )
+
+if __name__=="__main__": __main__()
diff -r 1c8eb226af94b29ef8484c4fbed557282170259e -r 51fccbc2e9bc401c83b52447b513e201fe776ba2 tools/sr_mapping/bowtie2_wrapper.xml
--- /dev/null
+++ b/tools/sr_mapping/bowtie2_wrapper.xml
@@ -0,0 +1,109 @@
+<tool id="bowtie2" name="Bowtie2" version="0.1">
+ <!-- Wrapper compatible with Bowtie version 2.0.0 -->
+ <description>is a short-read mapper</description>
+ <version_command>bowtie2 --version</version_command>
+ <requirements>
+ <requirement type="package">bowtie2</requirement>
+ </requirements>
+ <command interpreter="python">
+ bowtie2_wrapper.py
+
+ ## Change this to accommodate the number of threads you have available.
+ --num-threads="4"
+
+ ## Outputs.
+ --output=$output
+
+ ## Handle reference file.
+ #if $refGenomeSource.genomeSource == "history":
+ --own-file=$refGenomeSource.ownFile
+ #else:
+ --indexes-path="${refGenomeSource.index.fields.path}"
+ #end if
+
+ ## Are reads single-end or paired?
+ --single-paired=$singlePaired.sPaired
+
+ ## First input file always required.
+ --input1=$input1
+
+ ## Second input only if input is paired-end.
+ #if $singlePaired.sPaired == "paired"
+ --input2=$singlePaired.input2
+ #end if
+
+ ## Set params.
+ --settings=$params.settingsType
+ </command>
+ <inputs>
+ <conditional name="singlePaired">
+ <param name="sPaired" type="select" label="Is this library mate-paired?">
+ <option value="single">Single-end</option>
+ <option value="paired">Paired-end</option>
+ </param>
+ <when value="single">
+ <param format="fastqsanger" name="input1" type="data" label="FASTQ file" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33"/>
+ </when>
+ <when value="paired">
+ <param format="fastqsanger" name="input1" type="data" label="FASTQ file" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33" />
+ <param format="fastqsanger" name="input2" type="data" label="FASTQ file" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33" />
+ <!-- TODO: paired-end specific parameters. -->
+ </when>
+ </conditional>
+ <conditional name="refGenomeSource">
+ <param name="genomeSource" type="select" label="Will you select a reference genome from your history or use a built-in index?" help="Built-ins were indexed using default options">
+ <option value="indexed">Use a built-in index</option>
+ <option value="history">Use one from the history</option>
+ </param>
+ <when value="indexed">
+ <param name="index" type="select" label="Select a reference genome" help="If your genome of interest is not listed, contact the Galaxy team">
+ <options from_data_table="bowtie2_indexes">
+ <filter type="sort_by" column="2"/>
+ <validator type="no_options" message="No indexes are available for the selected input dataset"/>
+ </options>
+ </param>
+ </when>
+ <when value="history">
+ <param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select the reference genome" />
+ </when><!-- history -->
+ </conditional><!-- refGenomeSource -->
+ <conditional name="params">
+ <param name="settingsType" type="select" label="Bowtie settings to use" help="You can use the default settings or set custom values for any of Bowtie's parameters.">
+ <option value="preSet">Use Defaults</option>
+ <option value="full">Full parameter list</option>
+ </param>
+ <when value="preSet" />
+ <!-- Full/advanced params. -->
+ <when value="full">
+ </when><!-- full -->
+ </conditional><!-- params -->
+ </inputs>
+
+ <outputs>
+ <data format="sam" name="output" label="${tool.name} on ${on_string}: mapped reads">
+ <actions>
+ <conditional name="refGenomeSource.genomeSource">
+ <when value="indexed">
+ <action type="metadata" name="dbkey">
+ <option type="from_data_table" name="bowtie2_indexes" column="1" offset="0">
+ <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
+ <filter type="param_value" ref="refGenomeSource.index" column="0"/>
+ </option>
+ </action>
+ </when>
+ <when value="history">
+ <action type="metadata" name="dbkey">
+ <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
+ </action>
+ </when>
+ </conditional>
+ </actions>
+ </data>
+ </outputs>
+
+ <tests>
+ </tests>
+
+ <help>
+ </help>
+</tool>
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: jgoecks: Remove version code from tophat wrappers as this is now handled by <version> tag.
by Bitbucket 26 Apr '12
by Bitbucket 26 Apr '12
26 Apr '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/1c8eb226af94/
changeset: 1c8eb226af94
user: jgoecks
date: 2012-04-26 20:25:01
summary: Remove version code from tophat wrappers as this is now handled by <version> tag.
affected #: 2 files
diff -r c16adb4630e58fe4001e488367e27e911d7ec0cb -r 1c8eb226af94b29ef8484c4fbed557282170259e tools/ngs_rna/tophat2_wrapper.py
--- a/tools/ngs_rna/tophat2_wrapper.py
+++ b/tools/ngs_rna/tophat2_wrapper.py
@@ -80,21 +80,6 @@
(options, args) = parser.parse_args()
- # output version # of tool
- try:
- tmp = tempfile.NamedTemporaryFile().name
- tmp_stdout = open( tmp, 'wb' )
- proc = subprocess.Popen( args='tophat -v', shell=True, stdout=tmp_stdout )
- tmp_stdout.close()
- returncode = proc.wait()
- stdout = open( tmp_stdout.name, 'rb' ).readline().strip()
- if stdout:
- sys.stdout.write( '%s\n' % stdout )
- else:
- raise Exception
- except:
- sys.stdout.write( 'Could not determine Tophat version\n' )
-
# Color or base space
space = ''
if options.color_space:
diff -r c16adb4630e58fe4001e488367e27e911d7ec0cb -r 1c8eb226af94b29ef8484c4fbed557282170259e tools/ngs_rna/tophat_wrapper.py
--- a/tools/ngs_rna/tophat_wrapper.py
+++ b/tools/ngs_rna/tophat_wrapper.py
@@ -73,21 +73,6 @@
(options, args) = parser.parse_args()
- # output version # of tool
- try:
- tmp = tempfile.NamedTemporaryFile().name
- tmp_stdout = open( tmp, 'wb' )
- proc = subprocess.Popen( args='tophat -v', shell=True, stdout=tmp_stdout )
- tmp_stdout.close()
- returncode = proc.wait()
- stdout = open( tmp_stdout.name, 'rb' ).readline().strip()
- if stdout:
- sys.stdout.write( '%s\n' % stdout )
- else:
- raise Exception
- except:
- sys.stdout.write( 'Could not determine Tophat version\n' )
-
# Color or base space
space = ''
if options.color_space:
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
26 Apr '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/c16adb4630e5/
changeset: c16adb4630e5
user: jgoecks
date: 2012-04-26 19:59:03
summary: Fix version references in tophat2 wrapper.
affected #: 1 file
diff -r 9884af7d49189f1af3f8ae60931064d2abcc62cc -r c16adb4630e58fe4001e488367e27e911d7ec0cb tools/ngs_rna/tophat2_wrapper.xml
--- a/tools/ngs_rna/tophat2_wrapper.xml
+++ b/tools/ngs_rna/tophat2_wrapper.xml
@@ -1,9 +1,9 @@
<tool id="tophat2" name="Tophat2" version="0.5"><!-- Wrapper compatible with Tophat version 2.0.0 --><description>Gapped-read mapper for RNA-seq data</description>
- <version_command>tophat --version</version_command>
+ <version_command>tophat2 --version</version_command><requirements>
- <requirement type="package">tophat</requirement>
+ <requirement type="package">tophat2</requirement></requirements><command interpreter="python">
tophat2_wrapper.py
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: jgoecks: Make history export work for optional data inputs.
by Bitbucket 26 Apr '12
by Bitbucket 26 Apr '12
26 Apr '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/9884af7d4918/
changeset: 9884af7d4918
user: jgoecks
date: 2012-04-26 19:32:04
summary: Make history export work for optional data inputs.
affected #: 1 file
diff -r 0a0b01a980eac2f4c98d317bbde3ff572aca13e9 -r 9884af7d49189f1af3f8ae60931064d2abcc62cc lib/galaxy/tools/imp_exp/__init__.py
--- a/lib/galaxy/tools/imp_exp/__init__.py
+++ b/lib/galaxy/tools/imp_exp/__init__.py
@@ -415,8 +415,13 @@
params_dict[ name ] = value
job_attrs[ 'params' ] = params_dict
- # Get input, output datasets.
- input_datasets = [ assoc.dataset.hid for assoc in job.input_datasets ]
+ # -- Get input, output datasets. --
+
+ input_datasets = []
+ for assoc in job.input_datasets:
+ # Optional data inputs will not have a dataset.
+ if assoc.dataset:
+ input_datasets.append( assoc.dataset.hid )
job_attrs[ 'input_datasets' ] = input_datasets
output_datasets = [ assoc.dataset.hid for assoc in job.output_datasets ]
job_attrs[ 'output_datasets' ] = output_datasets
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0