commit/galaxy-central: 3 new changesets
3 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/3bd8bed55631/ changeset: 3bd8bed55631 user: jgoecks date: 2012-02-10 15:23:33 summary: Tophat wrapper modifications: (a) remove parameter junctions_filter and (b) change default value of max_multihits to 20. affected #: 2 files diff -r abae2caf3da253353fbdcc077a7ce3cd64a38e54 -r 3bd8bed55631728a05a9d873ebff70b74acbfd6e tools/ngs_rna/tophat_wrapper.py --- a/tools/ngs_rna/tophat_wrapper.py +++ b/tools/ngs_rna/tophat_wrapper.py @@ -27,7 +27,6 @@ help='The minimum intron length. TopHat will ignore donor/acceptor pairs closer than this many bases apart.' ) parser.add_option( '-I', '--max-intron-length', dest='max_intron_length', help='The maximum intron length. 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.' ) - parser.add_option( '-F', '--junction_filter', dest='junction_filter', help='Filter out junctions supported by too few alignments (number of reads divided by average depth of coverage)' ) parser.add_option( '-g', '--max_multihits', dest='max_multihits', help='Maximum number of alignments to be allowed' ) parser.add_option( '', '--initial-read-mismatches', dest='initial_read_mismatches', help='Number of mismatches allowed in the initial read mapping' ) parser.add_option( '', '--seg-mismatches', dest='seg_mismatches', help='Number of mismatches allowed in each segment alignment for reads mapped independently' ) @@ -150,8 +149,6 @@ opts += ' -m %s' % options.splice_mismatches opts += ' -i %s' % options.min_intron_length opts += ' -I %s' % options.max_intron_length - if float( options.junction_filter ) != 0.0: - opts += ' -F %s' % options.junction_filter opts += ' -g %s' % options.max_multihits # Custom junctions options. if options.gene_model_annotations: diff -r abae2caf3da253353fbdcc077a7ce3cd64a38e54 -r 3bd8bed55631728a05a9d873ebff70b74acbfd6e tools/ngs_rna/tophat_wrapper.xml --- a/tools/ngs_rna/tophat_wrapper.xml +++ b/tools/ngs_rna/tophat_wrapper.xml @@ -34,7 +34,6 @@ -m $singlePaired.sParams.splice_mismatches -i $singlePaired.sParams.min_intron_length -I $singlePaired.sParams.max_intron_length - -F $singlePaired.sParams.junction_filter -g $singlePaired.sParams.max_multihits --min-segment-intron $singlePaired.sParams.min_segment_intron --max-segment-intron $singlePaired.sParams.max_segment_intron @@ -96,7 +95,6 @@ -m $singlePaired.pParams.splice_mismatches -i $singlePaired.pParams.min_intron_length -I $singlePaired.pParams.max_intron_length - -F $singlePaired.pParams.junction_filter -g $singlePaired.pParams.max_multihits --min-segment-intron $singlePaired.pParams.min_segment_intron --max-segment-intron $singlePaired.pParams.max_segment_intron @@ -203,8 +201,8 @@ <param name="max_deletion_length" type="integer" value="3" label="Max deletion length." help="The maximum deletion length." /></when></conditional> - <param name="junction_filter" type="float" value="0.15" label="Minimum isoform fraction: filter out junctions supported by too few 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="40" label="Maximum number of alignments to be allowed" /> +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" /> @@ -310,8 +308,7 @@ <param name="max_deletion_length" type="integer" value="3" label="Max deletion length." help="The maximum deletion length." /></when></conditional> - <param name="junction_filter" type="float" value="0.15" label="Minimum isoform fraction: filter out junctions supported by too few 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="40" label="Maximum number of alignments to be allowed" /> + <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" /> @@ -532,7 +529,6 @@ <param name="splice_mismatches" value="0"/><param name="min_intron_length" value="70"/><param name="max_intron_length" value="500000"/> - <param name="junction_filter" value="0.15"/><param name="max_multihits" value="40"/><param name="min_segment_intron" value="50" /><param name="max_segment_intron" value="500000" /> @@ -578,7 +574,6 @@ <param name="splice_mismatches" value="0"/><param name="min_intron_length" value="70"/><param name="max_intron_length" value="500000"/> - <param name="junction_filter" value="0.15"/><param name="max_multihits" value="40"/><param name="min_segment_intron" value="50" /><param name="max_segment_intron" value="500000" /> https://bitbucket.org/galaxy/galaxy-central/changeset/3a9fecf3be20/ changeset: 3a9fecf3be20 user: jgoecks date: 2012-02-10 15:52:01 summary: Trackster: filter bug fix and abstract filter display control. affected #: 3 files diff -r 3bd8bed55631728a05a9d873ebff70b74acbfd6e -r 3a9fecf3be20e2413e8993738312246695fda2d3 lib/galaxy/web/base/controller.py --- a/lib/galaxy/web/base/controller.py +++ b/lib/galaxy/web/base/controller.py @@ -355,7 +355,8 @@ 'name': collection_dict.get( 'name', 'dummy' ), 'obj_type': collection_dict[ 'obj_type' ], 'drawables': drawables, - 'prefs': collection_dict.get( 'prefs', [] ) + 'prefs': collection_dict.get( 'prefs', [] ), + 'filters': collection_dict.get( 'filters', {} ) } def encode_dbkey( dbkey ): diff -r 3bd8bed55631728a05a9d873ebff70b74acbfd6e -r 3a9fecf3be20e2413e8993738312246695fda2d3 lib/galaxy/web/controllers/tracks.py --- a/lib/galaxy/web/controllers/tracks.py +++ b/lib/galaxy/web/controllers/tracks.py @@ -252,7 +252,7 @@ "hda_ldda": hda_ldda, "dataset_id": trans.security.encode_id( dataset.id ), "prefs": {}, - "filters": track_data_provider.get_filters(), + "filters": { 'filters' : track_data_provider.get_filters() }, "tool": get_tool_def( trans, dataset ) } return track @@ -671,7 +671,8 @@ "name": collection_json.get( 'name', '' ), "obj_type": collection_json[ 'obj_type' ], "drawables": unpacked_drawables, - "prefs": collection_json.get( 'prefs' , [] ) + "prefs": collection_json.get( 'prefs' , [] ), + "filters": collection_json.get( 'filters', None ) } # TODO: unpack and validate bookmarks: diff -r 3bd8bed55631728a05a9d873ebff70b74acbfd6e -r 3a9fecf3be20e2413e8993738312246695fda2d3 static/scripts/trackster.js --- a/static/scripts/trackster.js +++ b/static/scripts/trackster.js @@ -1032,8 +1032,7 @@ // Set up filters. this.filters_manager = new FiltersManager(this); - this.filters_div = this.filters_manager.parent_div; - this.header_div.after(this.filters_div); + this.header_div.after(this.filters_manager.parent_div); // For saving drawables' filter managers when group-level filtering is done: this.saved_filters_managers = null; }; @@ -1059,7 +1058,7 @@ css_class: "filters-icon", on_click_fn: function(group) { // TODO: update tipsy text. - if (group.filters_div.is(":visible")) { + if (group.filters_manager.visible()) { // Hiding filters. group.filters_manager.clear_filters(); @@ -1090,7 +1089,7 @@ group.filters_manager.init_filters(); group.request_draw(true); } - group.filters_div.toggle(); + group.filters_manager.toggle(); } }, Drawable.prototype.action_icons_def[2] @@ -2421,7 +2420,6 @@ this.track = track; this.alpha_filter = null; this.height_filter = null; - this.visible = false; this.filters = []; // @@ -2489,6 +2487,11 @@ }; extend(FiltersManager.prototype, { + // HTML manipulation and inspection. + show: function() { this.parent_div.show(); }, + hide: function() { this.parent_div.hide(); }, + toggle: function() { this.parent_div.toggle(); }, + visible: function() { return this.parent_div.is(":visible"); }, /** * Returns dictionary for manager. */ @@ -3071,13 +3074,13 @@ css_class: "filters-icon", on_click_fn: function(drawable) { // TODO: update tipsy text. - if (drawable.filters_div.is(":visible")) { + if (drawable.filters_manager.visible()) { drawable.filters_manager.clear_filters(); } else { drawable.filters_manager.init_filters(); } - drawable.filters_div.toggle(); + drawable.filters_manager.toggle(); } }, // Toggle track tool. @@ -3337,8 +3340,7 @@ */ set_filters_manager: function(filters_manager) { this.filters_manager = filters_manager; - this.filters_div = this.filters_manager.parent_div; - this.header_div.after(this.filters_div); + this.header_div.after(this.filters_manager.parent_div); }, /** * Returns representation of object in a dictionary for easy saving. @@ -4405,7 +4407,7 @@ if (track.filters_available !== filters_available) { track.filters_available = filters_available; if (!track.filters_available) { - track.filters_div.hide(); + track.filters_manager.hide(); } track.update_icons(); } https://bitbucket.org/galaxy/galaxy-central/changeset/60d72f4bd1ea/ changeset: 60d72f4bd1ea user: jgoecks date: 2012-02-10 15:52:14 summary: Merge affected #: 2 files diff -r 3a9fecf3be20e2413e8993738312246695fda2d3 -r 60d72f4bd1ea1930487e7eedfc3ce78372c00e9c tools/rgenetics/rgFastQC.py --- a/tools/rgenetics/rgFastQC.py +++ b/tools/rgenetics/rgFastQC.py @@ -37,6 +37,7 @@ fastqc_data.txt per_base_gc_content.png per_base_sequence_content.png sequence_length_distribution.png warning.png """ + serr = '' dummy,tlog = tempfile.mkstemp(prefix='rgFastQClog') sout = open(tlog, 'w') fastq = os.path.basename(self.opts.input) @@ -45,12 +46,18 @@ cl.append('-f %s' % self.opts.informat) if self.opts.contaminants <> None : cl.append('-c %s' % self.opts.contaminants) - cl.append(self.opts.input) + # patch suggested by bwlang https://bitbucket.org/galaxy/galaxy-central/pull-request/30 + # use a symlink in a temporary directory so that the FastQC report reflects the history input file name + fastqinfilename = os.path.basename(self.opts.inputfilename).replace(' ','_') + link_name = os.path.join(self.opts.outputdir, fastqinfilename) + os.symlink(self.opts.input, link_name) + cl.append(link_name) p = subprocess.Popen(' '.join(cl), shell=True, stderr=sout, stdout=sout, cwd=self.opts.outputdir) - return_value = p.wait() + retval = p.wait() sout.close() runlog = open(tlog,'r').readlines() os.unlink(tlog) + os.unlink(link_name) flist = os.listdir(self.opts.outputdir) # fastqc plays games with its output directory name. eesh odpath = None for f in flist: @@ -65,7 +72,8 @@ rep = open(hpath,'r').readlines() # for our new html file but we need to insert our stuff after the <body> tag except: pass - if hpath == None: + if hpath == None: + serr = '\n'.join(runlog) res = ['## odpath=%s: No output found in %s. Output for the run was:<pre>\n' % (odpath,hpath),] res += runlog res += ['</pre>\n', @@ -74,7 +82,7 @@ 'It is also possible that the log shows that fastqc is not installed?<br/>\n', 'If that is the case, please tell the relevant Galaxy administrator that it can be snarfed from<br/>\n', 'http://www.bioinformatics.bbsrc.ac.uk/projects/fastqc/<br/>\n',] - return res + return res,1,serr self.fix_fastqcimages(odpath) flist = os.listdir(self.opts.outputdir) # these have now been fixed excludefiles = ['tick.png','warning.png','fastqc_icon.png','error.png'] @@ -84,7 +92,7 @@ rep[i] = rep[i].replace('Images/','') html = self.fix_fastqc(rep,flist,runlog) - return html + return html,retval,serr @@ -129,6 +137,7 @@ if __name__ == '__main__': op = optparse.OptionParser() op.add_option('-i', '--input', default=None) + op.add_option('-j', '--inputfilename', default=None) op.add_option('-o', '--htmloutput', default=None) op.add_option('-d', '--outputdir', default="/tmp/shortread") op.add_option('-f', '--informat', default='fastq') @@ -141,9 +150,12 @@ if not os.path.exists(opts.outputdir): os.makedirs(opts.outputdir) f = FastQC(opts) - html = f.run_fastqc() + html,retval,serr = f.run_fastqc() f = open(opts.htmloutput, 'w') f.write(''.join(html)) f.close() + if retval <> 0: + print >> sys.stderr, serr # indicate failure + diff -r 3a9fecf3be20e2413e8993738312246695fda2d3 -r 60d72f4bd1ea1930487e7eedfc3ce78372c00e9c tools/rgenetics/rgFastQC.xml --- a/tools/rgenetics/rgFastQC.xml +++ b/tools/rgenetics/rgFastQC.xml @@ -1,7 +1,7 @@ -<tool name="Fastqc: Fastqc QC" id="fastqc" version="0.3"> +<tool name="Fastqc: Fastqc QC" id="fastqc" version="0.4"><description>using FastQC from Babraham</description><command interpreter="python"> - rgFastQC.py -i $input_file -d $html_file.files_path -o $html_file -n "$out_prefix" -f $input_file.ext -e ${GALAXY_DATA_INDEX_DIR}/shared/jars/FastQC/fastqc + rgFastQC.py -i $input_file -d $html_file.files_path -o $html_file -n "$out_prefix" -f $input_file.ext -j $input_file.name -e ${GALAXY_DATA_INDEX_DIR}/shared/jars/FastQC/fastqc #if $contaminants.dataset and str($contaminants) > '' -c "$contaminants" #end if @@ -16,7 +16,7 @@ help="tab delimited file with 2 columns: name and sequence. For example: Illumina Small RNA RT Primer CAAGCAGAAGACGGCATACGA"/></inputs><outputs> - <data format="html" name="html_file" label="${out_prefix}.html" /> + <data format="html" name="html_file" label="${out_prefix}_${on_string}.html" /></outputs><tests><test> 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.
participants (1)
-
Bitbucket