Repository revision
10:aff5135563c6

Repository 'column_maker'
hg clone https://toolshed.g2.bx.psu.edu/repos/devteam/column_maker

Compute tool metadata
Miscellaneous
Compute
on rows
Add_a_column1
toolshed.g2.bx.psu.edu/repos/devteam/column_maker/Add_a_column1/2.1
2.1
None
True
Version lineage of this tool (guids ordered most recent to oldest)
toolshed.g2.bx.psu.edu/repos/devteam/column_maker/Add_a_column1/2.1 (this tool)
toolshed.g2.bx.psu.edu/repos/devteam/column_maker/Add_a_column1/2.0
toolshed.g2.bx.psu.edu/repos/devteam/column_maker/Add_a_column1/1.6
toolshed.g2.bx.psu.edu/repos/devteam/column_maker/Add_a_column1/1.5
toolshed.g2.bx.psu.edu/repos/devteam/column_maker/Add_a_column1/1.4
toolshed.g2.bx.psu.edu/repos/devteam/column_maker/Add_a_column1/1.3.1
toolshed.g2.bx.psu.edu/repos/devteam/column_maker/Add_a_column1/1.3.0
toolshed.g2.bx.psu.edu/repos/devteam/column_maker/Add_a_column1/1.2.0
toolshed.g2.bx.psu.edu/repos/devteam/column_maker/Add_a_column1/1.1.0
Add_a_column1
Requirements (dependencies defined in the <requirements> tag set)
name version type
python 3.12 package
numpy 2.1.0 package
Additional information about this tool
python '$__tool_directory__/column_maker.py'
#if str($error_handling.auto_col_types) == 'on':
    #set $col_types = $input.metadata.column_types
#else:
    #set $col_types = ','.join(['str' for t in $input.metadata.column_types.split(',')])
#end if
--column-types $col_types
$avoid_scientific_notation
#if str($ops.header_lines_select) == 'yes':
    --header
#end if
--file '$expressions_file'
$error_handling.fail_on_non_existent_columns
$error_handling.non_computable.action
#if str($error_handling.non_computable.action) == '--non-computable-default':
    '$error_handling.non_computable.default_value'
#end if
'$input'
'$out_file1'
    
None
False
Functional tests
name inputs outputs required files
Test-1 input: 1.bed
ops|expressions_0|cond: float(c3-c2)
name: value
1.bed
value
Test-2 input: 1.interval
ops|expressions_0|cond: c4*1.
name: value
1.interval
value
Test-3 input: 1.header.tsv
ops|expressions_0|cond: c4*1.
ops|expressions_0|new_column_name: value1_again
ops|header_lines_select: yes
name: value
1.header.tsv
value
Test-4 input: 1.interval
ops|expressions_0|cond: round(c4*1)
name: value
1.interval
value
Test-5 input: 1.tab
ops|expressions_0|cond: c1/10
name: value
1.tab
value
Test-6 input: 1.bed
ops|expressions_0|cond: float(.0000000000001)
name: value
1.bed
value
Test-7 input: 1.bed
ops|expressions_0|cond: float(.0000000000001)
avoid_scientific_notation: True
name: value
1.bed
value
Test-8 input: 1.tab
ops|expressions_0|cond: c1/10
ops|expressions_0|add_column|pos: 1
ops|expressions_0|add_column|mode: R
ops|expressions_1|cond: round(c1*10)
ops|expressions_1|add_column|pos: 1
ops|expressions_1|add_column|mode: I
name: value
1.tab
value
Test-9 input: 1.bed
ops|expressions_0|cond: cos(pi)+sin(tau)*c2
name: value
1.bed
value
Test-10 input: bed12.bed
ops|expressions_0|cond: max(map(int, c11))
ops|expressions_0|add_column|pos: 5
ops|expressions_0|add_column|mode: R
name: value
bed12.bed
value
Test-11 input: short_line_test.tab
ops|expressions_0|cond: c6
ops|expressions_0|add_column|pos: 6
ops|expressions_0|add_column|mode: R
error_handling|fail_on_non_existent_columns: False
error_handling|non_computable|default_value: .
error_handling|non_computable|action: --non-computable-default
name: value
short_line_test.tab
value
Test-12 input: olympics.tsv
ops|expressions_0|cond: int(c8) / (int(c7) * int(c7)) * 10000
ops|expressions_0|new_column_name: BMI
ops|header_lines_select: yes
error_handling|auto_col_types: False
error_handling|non_computable|default_value: NA
error_handling|non_computable|action: --non-computable-default
name: value
olympics.tsv
value
Test-13 input: chrom_pos_ref.tab
ops|expressions_0|cond: int(c2) - (len(c3) == 1)
ops|expressions_0|add_column|pos: 2
ops|expressions_0|add_column|mode: R
ops|expressions_1|cond: int(c2) + ((len(c3) - 1) or 1)
ops|expressions_1|add_column|pos: 3
ops|expressions_1|add_column|mode: R
name: value
chrom_pos_ref.tab
value
Test-14 input: 1.bed
ops|expressions_0|cond: c3- = c2
1.bed
Test-15 input: 1.bed
ops|expressions_0|cond: floatfloat(c3-c2)
1.bed
Test-16 input: 1.bed
ops|expressions_0|cond: c7 - c2
1.bed
Test-17 input: 1.bed
ops|expressions_0|cond: c3 / 0
1.bed
Test-18 input: 1.bed
ops|expressions_0|cond: c3 / 0
error_handling|non_computable|action: --keep-non-computable
name: value
1.bed
value