commit/galaxy-central: 2 new changesets
2 new changesets in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/ca9a43ca12f5/ changeset: r5241:ca9a43ca12f5 user: jgoecks date: 2011-03-21 18:01:24 summary: Add count GFF features tool and tests. Tool counts the number of features in a GFF file; this is different than the number of lines b/c GFF features are often multiline. affected #: 5 files (1.5 KB) --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/count_gff_features_out1.txt Mon Mar 21 13:01:24 2011 -0400 @@ -0,0 +1,1 @@ +3 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/count_gff_features_out2.txt Mon Mar 21 13:01:24 2011 -0400 @@ -0,0 +1,1 @@ +14 --- a/tool_conf.xml.sample Mon Mar 21 11:08:32 2011 -0400 +++ b/tool_conf.xml.sample Mon Mar 21 13:01:24 2011 -0400 @@ -142,6 +142,8 @@ <tool file="stats/plot_from_lda.xml" /><tool file="regVariation/t_test_two_samples.xml" /><tool file="regVariation/compute_q_values.xml" /> + <label text="GFF" id="gff" /> + <tool file="stats/count_gff_features.xml" /></section><section name="Wavelet Analysis" id="dwt"><tool file="discreteWavelet/execute_dwt_IvC_all.xml" /> --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/stats/count_gff_features.py Mon Mar 21 13:01:24 2011 -0400 @@ -0,0 +1,18 @@ +#!/usr/bin/env python +# This tool takes a gff file as input and counts the number of features in it. + +import sys, fileinput +from galaxy import eggs +from galaxy.datatypes.util.gff_util import GFFReaderWrapper +from bx.intervals.io import GenomicInterval + +# Get args. +input_file = sys.argv[1:] + +# Count features. +count = 0 +for feature in GFFReaderWrapper( fileinput.FileInput( input_file ), fix_strand=True ): + if isinstance( feature, GenomicInterval ): + count += 1 + +print count \ No newline at end of file --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/stats/count_gff_features.xml Mon Mar 21 13:01:24 2011 -0400 @@ -0,0 +1,26 @@ +<tool id="count_gff_features" name="Count GFF Features" version="0.1"> + <description></description> + <command interpreter="python"> + count_gff_features.py $input > $output + </command> + <inputs> + <param format="gff" name="input" type="data" label="GFF Dataset to Filter"/> + </inputs> + <outputs> + <data format="txt" name="output"/> + </outputs> + <tests> + <test> + <param name="input" value="gff2bed_in2.gff"/> + <output name="output" file="count_gff_features_out1.txt"/> + </test> + <test> + <param name="input" value="gff_filter_by_feature_count_out1.gff"/> + <output name="output" file="count_gff_features_out2.txt"/> + </test> + </tests> + <help> + Counts the number of features in a GFF dataset. GFF features are often spread across multiple lines; this tool counts the number of + features in dataset rather than the number of lines. + </help> +</tool> http://bitbucket.org/galaxy/galaxy-central/changeset/8d476956222e/ changeset: r5242:8d476956222e user: jgoecks date: 2011-03-21 20:24:05 summary: Merge. affected #: 0 files (0 bytes) --- a/tools/filters/trimmer.xml Mon Mar 21 13:01:24 2011 -0400 +++ b/tools/filters/trimmer.xml Mon Mar 21 15:24:05 2011 -0400 @@ -1,11 +1,11 @@ -<tool id="trimmer" name="Trim" version="0.0.1"> - <description>leading or trailing characters</description> +<tool id="trimmer" name="Trim" version="0.0.1"> + <description>leading or trailing characters</description><command interpreter="python"> - trimmer.py -a -f $input1 -c $col -s $start -e $end -i $ignore $fastq > $out_file1 - </command> - <inputs> + trimmer.py -a -f $input1 -c $col -s $start -e $end -i $ignore $fastq > $out_file1 + </command> + <inputs><param format="tabular,txt" name="input1" type="data" label="this dataset"/> - <param name="col" type="integer" value="0" label="Trim this column only" help="0 = process entire line" /> + <param name="col" type="integer" value="0" label="Trim this column only" help="0 = process entire line" /><param name="start" type="integer" size="10" value="1" label="Trim from the beginning to this position" help="1 = do not trim the beginning"/><param name="end" type="integer" size="10" value="0" label="Remove everything from this position to the end" help="0 = do not trim the end"/><param name="fastq" type="select" label="Is input dataset in fastq format?" help="If set to YES, the tool will not trim evenly numbered lines (0, 2, 4, etc...)"> @@ -30,9 +30,9 @@ <option value="94">^</option><option value="35">#</option></param> - </inputs> - <outputs> - <data name="out_file1" format="input" metadata_source="input1"/> + </inputs> + <outputs> + <data name="out_file1" format="input" metadata_source="input1"/></outputs><tests><test> @@ -55,42 +55,42 @@ </test></tests> - - <help> - - -**What it does** - -Trims specified number of characters from a dataset or its field (if dataset is tab-delimited). - ------ - -**Example 1** - -Trimming this dataset:: + + <help> + + +**What it does** + +Trims specified number of characters from a dataset or its field (if dataset is tab-delimited). + +----- + +**Example 1** + +Trimming this dataset:: 1234567890 - abcdefghijk - + abcdefghijk + by setting **Trim from the beginning to this position** to *2* and **Remove everything from this position to the end** to *6* will produce:: 23456 - bcdef + bcdef ----- -**Eaxmple 2** +**Example 2** Trimming column 2 of this dataset:: - bcde 12345 fghij 67890 - fghij 67890 abcde 12345 + abcde 12345 fghij 67890 + fghij 67890 abcde 12345 -by setting **Trim content of this column only** to *2*, **Trim from the beginning to this position** to *2*, and **Remove everything from this position to the end** to *4* will produce:: +by setting **Trim content of this column only** to *2*, **Trim from the beginning to this position** to *2*, and **Remove everything from this position to the end** to *4* will produce:: - abcde 234 fghij 67890 - fghij 789 abcde 12345 - + abcde 234 fghij 67890 + fghij 789 abcde 12345 + ----- **Trimming FASTQ datasets** @@ -111,10 +111,10 @@ **Note** that headers are skipped. -.. class:: warningmark - -**WARNING:** This tool will only work on properly formatted fastq datasets where (1) each read and quality string occupy one line and (2) '@' (read header) and "+" (quality header) lines are evenly numbered like in the above example. +.. class:: warningmark - - </help> -</tool> +**WARNING:** This tool will only work on properly formatted fastq datasets where (1) each read and quality string occupy one line and (2) '@' (read header) and "+" (quality header) lines are evenly numbered like in the above example. + + + </help> +</tool> --- a/tools/new_operations/join.xml Mon Mar 21 13:01:24 2011 -0400 +++ b/tools/new_operations/join.xml Mon Mar 21 15:24:05 2011 -0400 @@ -11,12 +11,12 @@ <param name="min" size="4" type="integer" value="1" help="(bp)"><label>with min overlap</label></param> - <param name="fill" type="select" label="Return"> - <option value="none">Only records that are joined (INNER JOIN)</option> - <option value="right">All records of first dataset (fill null with ".")</option> - <option value="left">All records of second dataset (fill null with ".")</option> - <option value="both">All records of both datasets (fill nulls with ".")</option> - </param> + <param name="fill" type="select" label="Return"> + <option value="none">Only records that are joined (INNER JOIN)</option> + <option value="right">All records of first dataset (fill null with ".")</option> + <option value="left">All records of second dataset (fill null with ".")</option> + <option value="both">All records of both datasets (fill nulls with ".")</option> + </param></inputs><outputs><data format="interval" name="output" metadata_source="input1" /> 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