Repository revision
5:3bf5661c0280

Repository 'table_compute'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/table_compute

Table Compute tool metadata
Miscellaneous
computes operations on table data
table_compute
toolshed.g2.bx.psu.edu/repos/iuc/table_compute/table_compute/1.2.4+galaxy0
1.2.4+galaxy0
python '$__tool_directory__/scripts/table_compute.py' --version
True
Version lineage of this tool (guids ordered most recent to oldest)
toolshed.g2.bx.psu.edu/repos/iuc/table_compute/table_compute/1.2.4+galaxy0 (this tool)
toolshed.g2.bx.psu.edu/repos/iuc/table_compute/table_compute/0.9.2
toolshed.g2.bx.psu.edu/repos/iuc/table_compute/table_compute/0.9.1
toolshed.g2.bx.psu.edu/repos/iuc/table_compute/table_compute/0.8
table_compute
Requirements (dependencies defined in the <requirements> tag set)
name version type
pandas 1.2.4 package
numpy 1.19.2 package
Additional information about this tool
## Can only import generated userconfig.py if calling
        ## script is in the same directory. Soft-linking does
        ## not satisfy importing, so we copy everything.
        cp '$userconf' ./userconfig.py &&
        cp '$__tool_directory__/scripts/safety.py' ./safety.py &&
        cp '$__tool_directory__/scripts/table_compute.py' ./table_compute.py &&
        python ./table_compute.py
    
None
False
Functional tests
name inputs outputs required files
Test-1 singtabop|input: small.tsv
singtabop|user|select_cols_wanted: 2:4,2,2
singtabop|user|select_rows_wanted: 2:5,3,3
singtabop|user|select_keepdupe: select_cols_keepdupe
singtabop|user|mode: select
singtabop|use_type: single
precision: 2
name: value
small.tsv
value
Test-2 singtabop|input: small.tsv
singtabop|user|select_cols_wanted: 2:4,2,2
singtabop|user|select_keepdupe: ['select_cols_keepdupe', 'select_rows_keepdupe']
singtabop|user|mode: select
singtabop|use_type: single
precision: 2
name: value
small.tsv
value
Test-3 singtabop|input: small.tsv
singtabop|user|select_rows_wanted: 2:5,3,3
singtabop|user|select_keepdupe: select_cols_keepdupe
singtabop|user|mode: select
singtabop|use_type: single
precision: 2
name: value
small.tsv
value
Test-4 singtabop|input: small.tsv
singtabop|user|axis: 1
singtabop|user|filtersumval_mode|operation: sum
singtabop|user|filtersumval_mode|compare_op: gt
singtabop|user|filtersumval_mode|against: 50
singtabop|user|filtersumval_mode|use: operation
singtabop|user|mode: filtersumval
singtabop|use_type: single
precision: 2
name: value
small.tsv
value
Test-5 singtabop|input: small.tsv
singtabop|user|axis: 0
singtabop|user|filtersumval_mode|operation: sum
singtabop|user|filtersumval_mode|compare_op: ne
singtabop|user|filtersumval_mode|against: 0
singtabop|user|filtersumval_mode|use: operation
singtabop|user|mode: filtersumval
singtabop|use_type: single
precision: 2
name: value
small.tsv
value
Test-6 singtabop|input: small.tsv
singtabop|user|axis: 0
singtabop|user|filtersumval_mode|operation: sum
singtabop|user|filtersumval_mode|compare_op: gt
singtabop|user|filtersumval_mode|against: 10
singtabop|user|filtersumval_mode|use: operation
singtabop|user|mode: filtersumval
singtabop|use_type: single
precision: 2
name: value
small.tsv
value
Test-7 singtabop|input: small.tsv
singtabop|user|axis: 0
singtabop|user|filtersumval_mode|operation: median
singtabop|user|filtersumval_mode|compare_op: ge
singtabop|user|filtersumval_mode|against: 2
singtabop|user|filtersumval_mode|use: operation
singtabop|user|mode: filtersumval
singtabop|use_type: single
precision: 5
name: value
small.tsv
value
Test-8 singtabop|input: small.tsv
singtabop|user|axis: 1
singtabop|user|filtersumval_mode|minmatch: 2
singtabop|user|filtersumval_mode|operation: gt
singtabop|user|filtersumval_mode|against: 2
singtabop|user|filtersumval_mode|use: element
singtabop|user|mode: filtersumval
singtabop|use_type: single
precision: 5
name: value
small.tsv
value
Test-9 singtabop|input: small.tsv
singtabop|user|axis: 0
singtabop|user|filtersumval_mode|minmatch: 4
singtabop|user|filtersumval_mode|operation: str_ne
singtabop|user|filtersumval_mode|against: 0
singtabop|user|filtersumval_mode|use: element
singtabop|user|mode: filtersumval
singtabop|use_type: single
precision: 3
name: value
small.tsv
value
Test-10 singtabop|input: small.tsv
singtabop|user|matrixapply_func|vector_op: max
singtabop|user|dimension: 1
singtabop|user|mode: matrixapply
singtabop|use_type: single
out_opts: ['ignore_nas', 'output_headers_row']
precision: 0
name: value
small.tsv
value
Test-11 singtabop|input: small.tsv
singtabop|user|element|scale_op: mod
singtabop|user|element|scale_value: 5
singtabop|user|element|mode: scale
singtabop|user|elem_val|element_op: None
singtabop|user|mode: element
singtabop|use_type: single
precision: 2
name: value
small.tsv
value
Test-12 singtabop|input: small.tsv
singtabop|user|matrixapply_func|custom_func: vec.sum()+vec.median()
singtabop|user|matrixapply_func|vector_op: custom
singtabop|user|dimension: 0
singtabop|user|mode: matrixapply
singtabop|use_type: single
out_opts: ['ignore_nas', 'output_headers_row']
precision: 2
name: value
small.tsv
value
Test-13 singtabop|input: small.tsv
singtabop|user|element|custom_expr: (math.log10(elem)+elem)/elem if (elem < math.inf) else 1.0
singtabop|user|element|mode: custom
singtabop|user|elem_val|element_value: 0
singtabop|user|elem_val|element_op: gt
singtabop|user|mode: element
singtabop|use_type: single
name: value
small.tsv
value
Test-14 singtabop|input: mat1.umi.tsv
singtabop|user|element|custom_expr: -math.log(1 - elem/4096) * 4096 if elem != 4096 else elem - 0.5
singtabop|user|element|mode: custom
singtabop|user|elem_val|element_op: None
singtabop|user|mode: element
name: value
mat1.umi.tsv
value
Test-15 singtabop|input: mat2.umi.tsv
singtabop|user|element|custom_expr: -math.log(1 - elem/4096) * 4096 if elem != 4096 else elem - 0.5
singtabop|user|element|mode: custom
singtabop|user|elem_val|element_op: None
singtabop|user|mode: element
name: value
mat2.umi.tsv
value
Test-16 singtabop|input: small.tsv
singtabop|user|general|fulltable_custom_expr: table - table.mean(0) / table.std(0)
singtabop|user|general|use: custom
singtabop|user|mode: fulltable
singtabop|use_type: single
name: value
small.tsv
value
Test-17 singtabop|tables_0|input: small.tsv
singtabop|tables_1|input: small.tsv
singtabop|tables_2|input: small.tsv
singtabop|fulltable_custom_expr: (3 * table1) + np.log(table3 + 20) - table2
singtabop|use_type: multiple
name: value
small.tsv
value
Test-18 singtabop|input: small.tsv
singtabop|user|general|fulltable_custom_expr: table * 2
singtabop|user|general|use: custom
singtabop|user|mode: fulltable
singtabop|use_type: single
name: value
small.tsv
value
Test-19 singtabop|input: small.tsv
singtabop|user|general|fulltable_custom_expr: table == 5
singtabop|user|general|use: custom
singtabop|user|mode: fulltable
singtabop|use_type: single
name: value
small.tsv
value
Test-20 singtabop|input: small.tsv
singtabop|user|general|fulltable_custom_expr: for n in table: n = n + 1
singtabop|user|general|use: custom
singtabop|user|mode: fulltable
singtabop|use_type: single
small.tsv
Test-21 singtabop|input: small.tsv
singtabop|user|general|fulltable_custom_expr: table + table[0,0]
singtabop|user|general|use: custom
singtabop|user|mode: fulltable
singtabop|use_type: single
small.tsv
Test-22 singtabop|input: small.tsv
singtabop|user|general|use: transpose
singtabop|user|mode: fulltable
singtabop|use_type: single
out_opts: ['ignore_nas', 'output_headers_col']
name: value
small.tsv
value
Test-23 singtabop|input: small.tsv
singtabop|user|general|id_vars: cell1,cell3
singtabop|user|general|value_vars: cell5,cell6
singtabop|user|general|use: melt
singtabop|user|mode: fulltable
singtabop|use_type: single
out_opts: ['ignore_nas', 'output_headers_col']
name: value
small.tsv
value
Test-24 singtabop|input: small.tsv
singtabop|user|general|index: cell1
singtabop|user|general|column: cell2
singtabop|user|general|values: cell3,cell7,cell9
singtabop|user|general|use: pivot
singtabop|user|mode: fulltable
singtabop|use_type: single
name: value
small.tsv
value
Test-25 singtabop|input: examples.1.tsv
singtabop|col_row_names: ['has_col_names', 'has_row_names']
singtabop|user|select_cols_wanted: 1,1,3
singtabop|user|select_rows_wanted: 1:3,2
singtabop|user|select_keepdupe: ['select_cols_keepdupe', 'select_rows_keepdupe']
singtabop|user|mode: select
singtabop|use_type: single
name: value
examples.1.tsv
value
Test-26 singtabop|input: examples.2.tsv
singtabop|col_row_names: ['has_col_names', 'has_row_names']
singtabop|user|axis: 1
singtabop|user|filtersumval_mode|operation: sum
singtabop|user|filtersumval_mode|compare_op: lt
singtabop|user|filtersumval_mode|against: 50
singtabop|user|filtersumval_mode|use: operation
singtabop|user|mode: filtersumval
singtabop|use_type: single
name: value
examples.2.tsv
value
Test-27 singtabop|input: examples.3p1.tsv
singtabop|col_row_names: ['has_col_names', 'has_row_names']
singtabop|user|element|custom_expr: elem < 10
singtabop|user|element|mode: custom
singtabop|user|elem_val|element_op: None
singtabop|user|mode: element
singtabop|use_type: single
name: value
examples.3p1.tsv
value
Test-28 singtabop|input: examples.3p2.tsv
singtabop|col_row_names: ['has_col_names', 'has_row_names']
singtabop|user|matrixapply_func|vector_op: sum
singtabop|user|dimension: 1
singtabop|user|mode: matrixapply
singtabop|use_type: single
name: value
examples.3p2.tsv
value
Test-29 singtabop|input: examples.4.tsv
singtabop|col_row_names: ['has_col_names', 'has_row_names']
singtabop|user|element|custom_expr: (math.log(elem) / elem) if (elem > 5) else 1
singtabop|user|element|mode: custom
singtabop|user|mode: element
singtabop|use_type: single
name: value
examples.4.tsv
value
Test-30 singtabop|input: examples.5.tsv
singtabop|col_row_names: ['has_col_names', 'has_row_names']
singtabop|user|general|fulltable_custom_expr: table - table.mean(0)/table.std(0)
singtabop|user|general|use: custom
singtabop|user|mode: fulltable
singtabop|use_type: single
name: value
examples.5.tsv
value
Test-31 singtabop|tables_0|input: examples.6p1.tsv
singtabop|tables_0|col_row_names: ['has_col_names', 'has_row_names']
singtabop|tables_1|input: examples.6p2.tsv
singtabop|tables_1|col_row_names: ['has_col_names', 'has_row_names']
singtabop|tables_2|input: examples.6p3.tsv
singtabop|tables_2|col_row_names: ['has_col_names', 'has_row_names']
singtabop|fulltable_custom_expr: table1 / min(np.max(np.max(table2)), np.max(np.max(table3)))
singtabop|use_type: multiple
name: value
examples.6p1.tsv
examples.6p2.tsv
examples.6p3.tsv
value
Test-32 singtabop|input: examples.7.tsv
singtabop|col_row_names: ['has_col_names', 'has_row_names']
singtabop|user|general|id_vars: A
singtabop|user|general|value_vars: B,C
singtabop|user|general|use: melt
singtabop|user|mode: fulltable
singtabop|use_type: single
name: value
examples.7.tsv
value
Test-33 singtabop|input: examples.8.tsv
singtabop|col_row_names: ['has_col_names', 'has_row_names']
singtabop|user|general|index: foo
singtabop|user|general|column: bar
singtabop|user|general|values: baz
singtabop|user|general|use: pivot
singtabop|user|mode: fulltable
singtabop|use_type: single
name: value
examples.8.tsv
value
Test-34 singtabop|input: examples.1.tsv
singtabop|user|select_cols_wanted: -2:2,1,-1
singtabop|user|select_rows_wanted: 1,3:-3,1
singtabop|user|mode: select
singtabop|use_type: single
name: value
examples.1.tsv
value
Test-35 singtabop|input: examples.1.tsv
singtabop|user|select_cols_wanted: -1,-3,3:-3,2
singtabop|user|select_rows_wanted: 3:-1
singtabop|user|select_keepdupe:
singtabop|user|mode: select
singtabop|use_type: single
name: value
examples.1.tsv
value
Test-36 singtabop|input: skiplines.tsv
singtabop|adv|header: 2
singtabop|adv|nrows: 4
singtabop|adv|skip_blank_lines: True
singtabop|user|mode: precision
singtabop|use_type: single
precision: 2
name: value
skiplines.tsv
value
Test-37 singtabop|input: skiplines.tsv
singtabop|adv|header: 2
singtabop|adv|skipfooter: 2
singtabop|adv|skip_blank_lines: False
singtabop|user|mode: precision
singtabop|use_type: single
out_opts:
precision: 2
name: value
skiplines.tsv
value
Test-38 singtabop|input: examples.1.tsv
singtabop|col_row_names: ['has_col_names', 'has_row_names']
singtabop|user|element|replace_value: chr{elem:.0f}
singtabop|user|element|mode: replace
singtabop|user|elem_val|select_cols_wanted: 2
singtabop|user|elem_val|select_rows_wanted: 2,4
singtabop|user|elem_val|inclusive_selection: True
singtabop|user|elem_val|element_op: rowcol
singtabop|user|mode: element
singtabop|use_type: single
name: value
examples.1.tsv
value
Test-39 singtabop|input: examples.1.tsv
singtabop|col_row_names: ['has_col_names', 'has_row_names']
singtabop|user|element|replace_value: chr{elem:.0f}
singtabop|user|element|mode: replace
singtabop|user|elem_val|select_cols_wanted: 2
singtabop|user|elem_val|select_rows_wanted: 2,4
singtabop|user|elem_val|inclusive_selection: False
singtabop|user|elem_val|element_op: rowcol
singtabop|user|mode: element
singtabop|use_type: single
name: value
examples.1.tsv
value
Test-40 singtabop|input: examples.1.tsv
singtabop|col_row_names: ['has_col_names', 'has_row_names']
singtabop|user|element|replace_value: a'+'b
singtabop|user|element|mode: replace
singtabop|user|elem_val|element_op: None
singtabop|user|mode: element
singtabop|use_type: single
name: value
examples.1.tsv
value
Test-41 singtabop|input: examples.4.tsv
singtabop|col_row_names: ['has_col_names', 'has_row_names']
singtabop|user|element|custom_expr: el'+'em
singtabop|user|element|mode: custom
singtabop|user|mode: element
singtabop|use_type: single
examples.4.tsv
Test-42 singtabop|input: pivot.tsv
singtabop|col_row_names: ['has_col_names', 'has_row_names']
singtabop|user|general|index: Position
singtabop|user|general|colfun_map_0|column: Age
singtabop|user|general|colfun_map_0|functions_0|aggfunc: mean
singtabop|user|general|colfun_map_1|column: Random
singtabop|user|general|colfun_map_1|functions_0|aggfunc: mean
singtabop|user|general|colfun_map_1|functions_1|aggfunc: std
singtabop|user|general|use: pivot
singtabop|user|mode: fulltable
singtabop|use_type: single
name: value
pivot.tsv
value
Test-43 singtabop|input: table1.tsv
singtabop|col_row_names: has_col_names
singtabop|user|general|index: A
singtabop|user|general|column: C
singtabop|user|general|values: D
singtabop|user|general|aggfunc: max
singtabop|user|general|use: pivot
singtabop|user|mode: fulltable
singtabop|use_type: single
name: value
table1.tsv
value