galaxy-commits
Threads by month
- ----- 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
April 2012
- 1 participants
- 170 discussions
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