Tutorial for "Manage Components"

Quick Links

Manage Components

  1. Open "Manage Components" page from the Portal Navigation Menu.

  2. This is the "Manage Components" interface.
    In here, we can add Components and Upload code

  3. New components must be added as sub-components of an abstract component (greyed out icon). To add a new abstract component, refer to the tutorial on managing component types. Once you have selected an abstract component, the new component will become a sub-component of the selected abstract component or the selected category.

    One can also right-click on the component type

  4. A window will popup asking for the name of the new Component.

  5. The newly created Component is shown in "Red". This indicates that there is no code associated with it.

  6. Click on "HTMLTagCount" to get a view of the UI that appears on the right.
    Now this component's IO (Inputs/Outputs) can be described.

  7. The Input and Output Data from the Abstract Component appear on the right.
    Click on the "Add" button to add more Input Data, Input Parameters, or Output Data. The type of the data can also be specialized. For example, we can change sampleInputFile1 from being a FormattedFile to a HTMLFile

  8. We can also add software and hardware dependencies for the component. The list of software dependencies is defined the the System Administrator from the "Manage Resources" interface

  9. Click the "Save" button to save the Component Description

  10. Click on "Set Component" to upload the component package, but first we need to make the Component Package.

  11. Download io.sh into a folder named "HTMLTagCount"

  12. create a new file named run with the following code:

    On Line 11, . $BASEDIR/io.sh 1 1 1 "$@" indicates that there is 1 Input, 1 Parameter, 1 Output. It reads the inputs and outputs and then finally calls htmltagcount.pl.

    It could read differently for a different component, depending on how many inputs (including input parameters) and outputs there are. For example, if there are 2 inputs and 1 output (no input parameters), the file would contain the following code:

    If the file is named differently than "htmltagcount.pl", make sure to replace the file name on Line 17, directly after $BASEDIR/".

    Examples of line 17 for code in different languages:

    • R: R CMD BATCH --no-save --no-restore "--args $INPUTS1 $PARAMS1 $OUTPUTS1" $BASEDIR/htmlTagCount.R
    • Java: java -classpath $BASEDIR HtmlTagCount $INPUTS1 $PARAMS1 $OUTPUTS1
    • Python: python $BASEDIR/htmlTagCount.py $INPUTS1 $PARAMS1 $OUTPUTS1
    • Perl: perl $BASEDIR/htmlTagCount.pl $INPUTS1 $PARAMS1 $OUTPUTS1
  13. Create a new file named htmltagcount.pl with the following code:

    In this example, this code is written in a programming language called Perl, so it has the file extension ".pl" The process of uploading and managing components in Wings is the same regardless of the programming language your code is in. Only the file extension and the code in the file created in this step and the file name on Line 17 in Step 6 will change based on the programming language and the code being used.

  14. Zip the Component Folder

  15. A dialog appears where the path to the component needs to be entered. Click on the "Upload Component" text at the bottom of the dialog

  16. The dialog expands. Now click on the "Add File" button

  17. Select the component's zip file and click 'Open'

  18. The file now appears in the file list. Click on 'Upload'

  19. The Component icon turns "yellow" which means that it is a "Concrete" component (i.e. has code and is executable)