Map Paths

Click the gear icon ⚙️️ on any connection in the pipeline to open the Map Paths menu. When changes are made to the Map Paths menu, click Confirm for those changes to take effect.

Map the Source Path to the Destination Path

The Map Paths function enables the user to map the source data (a dataset or a capsule’s results) to where the destination capsule expects to find it. This ensures data with different subfolders or different file names can be passed to a capsule without making any changes to the capsule itself. The following example demonstrates the utility of the mapping paths.

Map Paths Example

The TestData dataset is passed to a capsule called Demo Capsule. This results in an error because Demo Capsule expects to find a text file called sample-data.txt in its data folder but will instead find a folder called folder1.

By providing the name of the source data and the file name that the destination capsule expects, datasets with different subfolder structures and file names can be used without making any changes to the destination capsules.

The Global Switch

The Map Paths menu between a dataset and a capsule or between two capsules will have a Global switch. This switch determines how the source capsule’s results will affect the execution of the destination capsule.

Nextflow executes instances of the destination capsule according to the results generated by the source capsule. By default, Nextflow will execute a destination capsule instance for every instance of the source capsule:

Turning the Global switch on tells Nextflow to execute a single destination capsule instance for all instances of the source capsule. This will pass the outputs from all source capsule instances as input to one destination capsule:

The Global switch should be turned on when all the outputs of the source capsule are needed by the destination capsule.

Generate Indexed Folders

The Map Paths menu between a capsule and the Results Bucket will have a Generate indexed folders switch. By default, files will be written to the Results Bucket in the same way they’re written to the capsule’s results folder. Turning on generate indexed folders will write files to a unique folder for each instance of the source capsule.

Write Files to a Folder in the Results Bucket

To write files to a new folder in the Results Bucket, open the Map Paths menu between a capsule and the Results Bucket and type the folder name followed by a slash into the destination path.

In this example, results from the capsule Demo Capsule will be written to the Results Bucket in a folder called new_folder.

Last updated