mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-24 02:04:04 +08:00
fixing on_string again. Add job title to tophat2
This commit is contained in:
@@ -106,6 +106,7 @@ class Configuration( object ):
|
||||
self.allow_user_creation = string_as_bool( kwargs.get( "allow_user_creation", "True" ) )
|
||||
self.allow_user_deletion = string_as_bool( kwargs.get( "allow_user_deletion", "False" ) )
|
||||
self.allow_user_dataset_purge = string_as_bool( kwargs.get( "allow_user_dataset_purge", "False" ) )
|
||||
self.use_data_id_on_string = string_as_bool( kwargs.get( "use_data_id_on_string", "False" ) )
|
||||
self.allow_user_impersonation = string_as_bool( kwargs.get( "allow_user_impersonation", "False" ) )
|
||||
self.new_user_dataset_access_role_default_private = string_as_bool( kwargs.get( "new_user_dataset_access_role_default_private", "False" ) )
|
||||
self.collect_outputs_from = [ x.strip() for x in kwargs.get( 'collect_outputs_from', 'new_file_path,job_working_directory' ).lower().split(',') ]
|
||||
|
||||
@@ -191,14 +191,20 @@ class DefaultToolAction( object ):
|
||||
data = data.to_history_dataset_association( None )
|
||||
inp_data[name] = data
|
||||
|
||||
else: # HDA
|
||||
if data.hid:
|
||||
input_names.append( 'data %s' % data.hid )
|
||||
# else: # HDA
|
||||
# if data.hid:
|
||||
# input_names.append( 'data %s' % data.hid )
|
||||
input_ext = data.ext
|
||||
|
||||
if data.dbkey not in [None, '?']:
|
||||
input_dbkey = data.dbkey
|
||||
|
||||
data_name_sane = re.sub('[^a-zA-Z0-9_]+', '', data.name)
|
||||
if trans.app.config.use_data_id_on_string:
|
||||
# we want names in our on_strings not numbers
|
||||
input_names.append(data_name_sane)
|
||||
else:
|
||||
if data.hid:
|
||||
input_names.append('data %s' % data.hid)
|
||||
# Collect chromInfo dataset and add as parameters to incoming
|
||||
db_datasets = {}
|
||||
db_dataset = trans.db_dataset_for( input_dbkey )
|
||||
@@ -232,11 +238,14 @@ class DefaultToolAction( object ):
|
||||
if len( input_names ) == 1:
|
||||
on_text = input_names[0]
|
||||
elif len( input_names ) == 2:
|
||||
on_text = '%s and %s' % tuple(input_names[0:2])
|
||||
#on_text = '%s and %s' % tuple(input_names[0:2])
|
||||
on_text = '%s_%s' % tuple(input_names[0:2])
|
||||
elif len( input_names ) == 3:
|
||||
on_text = '%s, %s, and %s' % tuple(input_names[0:3])
|
||||
#on_text = '%s, %s, and %s' % tuple(input_names[0:3])
|
||||
on_text = '%s_%s_%s' % tuple(input_names[0:3])
|
||||
elif len( input_names ) > 3:
|
||||
on_text = '%s, %s, and others' % tuple(input_names[0:2])
|
||||
#on_text = '%s, %s, and others' % tuple(input_names[0:2])
|
||||
on_text = '%s_%s_and_others' % tuple(input_names[0:2])
|
||||
else:
|
||||
on_text = ""
|
||||
# Add the dbkey to the incoming parameters
|
||||
|
||||
@@ -126,6 +126,14 @@
|
||||
</command>
|
||||
|
||||
<inputs>
|
||||
<param name="jobname" type="text" value="Tophat2" size="80" label="Job title for outputs"
|
||||
help="Output name to remind you what this was for">
|
||||
<sanitizer invalid_char="">
|
||||
<valid initial="string.letters,string.digits">
|
||||
<add value="_" />
|
||||
</valid>
|
||||
</sanitizer>
|
||||
</param>
|
||||
<conditional name="singlePaired">
|
||||
<param name="sPaired" type="select" label="Is this library mate-paired?">
|
||||
<option value="single">Single-end</option>
|
||||
@@ -273,19 +281,19 @@
|
||||
</stdio>
|
||||
|
||||
<outputs>
|
||||
<data format="tabular" name="fusions" label="${on_string}_tophat2fus.xls" from_work_dir="tophat_out/fusions.out">
|
||||
<data format="tabular" name="fusions" label="${on_string}_${jobname}_fusions.xls" from_work_dir="tophat_out/fusions.out">
|
||||
<filter>(params['settingsType'] == 'full' and params['fusion_search']['do_search'] == 'Yes')</filter>
|
||||
</data>
|
||||
<data format="bed" name="insertions" label="${on_string}_tophat2ins.bed" from_work_dir="tophat_out/insertions.bed">
|
||||
<data format="bed" name="insertions" label="${on_string}_${jobname}_ins.bed" from_work_dir="tophat_out/insertions.bed">
|
||||
<expand macro="dbKeyActions" />
|
||||
</data>
|
||||
<data format="bed" name="deletions" label="${on_string}_tophhat2del.bed" from_work_dir="tophat_out/deletions.bed">
|
||||
<data format="bed" name="deletions" label="${on_string}_${jobname}_del.bed" from_work_dir="tophat_out/deletions.bed">
|
||||
<expand macro="dbKeyActions" />
|
||||
</data>
|
||||
<data format="bed" name="junctions" label="${on_string}tophat2sj.bed" from_work_dir="tophat_out/junctions.bed">
|
||||
<data format="bed" name="junctions" label="${on_string}_${jobname}_splicejunc.bed" from_work_dir="tophat_out/junctions.bed">
|
||||
<expand macro="dbKeyActions" />
|
||||
</data>
|
||||
<data format="bam" name="accepted_hits" label="${on_string}tophat2hits.bam" from_work_dir="tophat_out/accepted_hits.bam">
|
||||
<data format="bam" name="accepted_hits" label="${on_string}_${jobname}_hits.bam" from_work_dir="tophat_out/accepted_hits.bam">
|
||||
<expand macro="dbKeyActions" />
|
||||
</data>
|
||||
</outputs>
|
||||
|
||||
@@ -95,15 +95,14 @@
|
||||
#end if
|
||||
|
||||
## view/sort and output file
|
||||
| samtools view -Su - | samtools sort -o - - > $output;
|
||||
| samtools view -Su - | samtools sort -o - - > $output
|
||||
|
||||
## rename unaligned sequence files
|
||||
#if $library.type == "paired" and $output_unaligned_reads_l and $output_unaligned_reads_r:
|
||||
#set left = str($output_unaligned_reads_l).replace( '.dat', '.1.dat' )
|
||||
#set right = str($output_unaligned_reads_l).replace( '.dat', '.2.dat' )
|
||||
|
||||
mv $left $output_unaligned_reads_l;
|
||||
mv $right $output_unaligned_reads_r;
|
||||
;mv $left $output_unaligned_reads_l;
|
||||
mv $right $output_unaligned_reads_r
|
||||
#end if
|
||||
</command>
|
||||
|
||||
@@ -218,7 +217,7 @@
|
||||
|
||||
<!-- define outputs -->
|
||||
<outputs>
|
||||
<data format="fastqsanger" name="output_unaligned_reads_l" label="${on_string}_{jobtitle}_unaligL.fastq" >
|
||||
<data format="fastqsanger" name="output_unaligned_reads_l" label="${on_string}_${jobtitle}_unaligL.fastq" >
|
||||
<filter>unaligned_file is True</filter>
|
||||
<actions>
|
||||
<action type="format">
|
||||
@@ -226,7 +225,7 @@
|
||||
</action>
|
||||
</actions>
|
||||
</data>
|
||||
<data format="fastqsanger" name="output_unaligned_reads_r" label="${on_string}_{jobtitle}_unaligR.fastq)">
|
||||
<data format="fastqsanger" name="output_unaligned_reads_r" label="${on_string}_${jobtitle}_unaligR.fastq)">
|
||||
<filter>library['type'] == "paired" and unaligned_file is True</filter>
|
||||
<actions>
|
||||
<action type="format">
|
||||
@@ -234,7 +233,7 @@
|
||||
</action>
|
||||
</actions>
|
||||
</data>
|
||||
<data format="bam" name="output" label="${tool.name} on ${on_string}_{jobtitle}_aligned.bam">
|
||||
<data format="bam" name="output" label="${tool.name} on ${on_string}_${jobtitle}_aligned.bam">
|
||||
<actions>
|
||||
<conditional name="reference_genome.source">
|
||||
<when value="indexed">
|
||||
|
||||
Reference in New Issue
Block a user