Repository revision
2:1f4a30d19264

Repository 'giant_factor_generator'
hg clone https://toolshed.g2.bx.psu.edu/repos/vandelj/giant_factor_generator

GIANT-Factor file generator tool metadata
Miscellaneous
Generate factor file used by other GIANT tools
giant_factor_generator
toolshed.g2.bx.psu.edu/repos/vandelj/giant_factor_generator/giant_factor_generator/0.1.3
0.1.3
None
True
Version lineage of this tool (guids ordered most recent to oldest)
toolshed.g2.bx.psu.edu/repos/vandelj/giant_factor_generator/giant_factor_generator/0.1.3 (this tool)
toolshed.g2.bx.psu.edu/repos/vandelj/giant_factor_generator/giant_factor_generator/0.1.2
giant_factor_generator
Requirements (dependencies defined in the <requirements> tag set)
No requirements defined
Additional information about this tool
#import imp
  #set $general_functions=$imp.load_source('General_functions', $__tool_directory__+'/../../src/General_functions.py')
  ##change for Planemo test
  ##set $general_functions=$imp.load_source('General_functions', $__tool_directory__+'/src/General_functions.py')

  #if $inputCondition.selection == "CELcollection" and $inputCondition.selectCollectionStrat.how=="group_tags":
    #set $temp_factor_names = list()
    #for $factor in $inputCondition.selectCollectionStrat.factorListBis:
          #set $temp_factor = list()
          #for $level in $factor.valueList:
            #set $temp_level = ''
            #for $group in $level.valueConditions.value:
                #for $file in $inputCondition.inputData.get_datasets_for_group($group):
                    printf "$group\t $file.element_identifier\n" >> ./TAGmatching.csv;
                    #if $temp_level == '':
                      #set $temp_level = str($file.element_identifier)
                    #else:
                      #set $temp_level += ','+str($file.element_identifier)
                    #end if
                #end for
            #end for
            $temp_factor.append( {'valueName':str($level.valueName), 'valueConditions':$temp_level} )
          #end for
          $temp_factor.reverse()
          $temp_factor_names.append( {'factorName':str($factor.factorName), 'valueList':$temp_factor} )
    #end for
  #end if

  #if $inputCondition.selection == "CELcollection":
    #if $inputCondition.selectCollectionStrat.how=="group_tags":
      #set $ret_code=$general_functions.generateFactorFile($inputCondition.inputData.collection,$temp_factor_names,$outputData.file_name,$log.file_name)
    #else:
      #set $ret_code=$general_functions.generateFactorFile($inputCondition.inputData.collection,$inputCondition.selectCollectionStrat.factorListBis,$outputData.file_name,$log.file_name)
    #end if
  #else:
    #set $ret_code=$general_functions.generateFactorFile($inputCondition.inputData,$inputCondition.factorList,$outputData.file_name,$log.file_name)
  #end if

  if [ $ret_code != 0 ]; then
    printf "[ERROR]Error during factor file generation\n" >> $log;
    exit $ret_code;
  fi;

  printf "[INFO]End of tool script" >> $log; 
	
  
None
False
Functional tests
name inputs outputs required files
Test-1 inputCondition|inputData: ./NormalizedData.tabular
inputCondition|factorList_0|factorName: Strain
inputCondition|factorList_0|valueList_0|valueName: WT
inputCondition|factorList_0|valueList_0|valueConditions: ['GSM205769.CEL', 'GSM205772.CEL', 'GSM205768.CEL', 'GSM205767.CEL', 'GSM205766.CEL', 'GSM205771.CEL', 'GSM205770.CEL']
inputCondition|factorList_0|valueList_1|valueName: KO
inputCondition|factorList_0|valueList_1|valueConditions: ['GSM205777.CEL', 'GSM205776.CEL', 'GSM205781.CEL', 'GSM205773.CEL', 'GSM205780.CEL', 'GSM205779.CEL', 'GSM205782.CEL', 'GSM205775.CEL', 'GSM205774.CEL', 'GSM205778.CEL']
inputCondition|factorList_1|factorName: Treatment
inputCondition|factorList_1|valueList_0|valueName: Control
inputCondition|factorList_1|valueList_0|valueConditions: ['GSM205777.CEL', 'GSM205776.CEL', 'GSM205773.CEL', 'GSM205775.CEL', 'GSM205774.CEL', 'GSM205768.CEL', 'GSM205767.CEL', 'GSM205766.CEL']
inputCondition|factorList_1|valueList_1|valueName: Treat
inputCondition|factorList_1|valueList_1|valueConditions: ['GSM205781.CEL', 'GSM205769.CEL', 'GSM205772.CEL', 'GSM205780.CEL', 'GSM205779.CEL', 'GSM205782.CEL', 'GSM205778.CEL', 'GSM205771.CEL', 'GSM205770.CEL']
inputCondition|selection: normalizedData
name: value
name: value
./NormalizedData.tabular
value