Create your own parameter set
While we strive to provide useful parameter sets for all manner of different project types, it is inevitable that you will have data sets and parameters that you frequently use and would like to wrap them up in a parameter set of your own. Fortunately, This is a straightforward task to accomplish.
To generate a new parameter set, all we need to do is run the gkno pipeline and give values to all the arguments that we want to be part of the parameter set. A number of error checking modes are deactivated when we are creating a parameter set; for example, it is not necessary for the command line to be a complete, executable command line. Required input files do not need to be included and gkno will not check for their existence. When all arguments have been set, we need to add one last argument: --export-parameter-set or -ep. This argument must be accompanied by the name you wish to give to your parameter set, which must not already be used. That's it!
Example
To demonstrate this, let's do a test. We will create a parameter set for the coverage pipeline. We will generate a new parameter set called example that gives the --reference-sequences (-s) argument the value ref.txt. We will do this with the following command line:
  • gkno coverage -s ref.txt -ep example
The parameter set has now been generated. You are told that it is recommended to check that the parameter set is as expected. We can easily do that by running the pipeline, selecting the parameter set and asking for help.
  • gkno coverage -ps example -h
At the end of the help text, the parameter set information is displayed, but it contains more values than just the --reference -sequences argument that we set. Why is this?
Removing the default parameter set
When we created the example parameter set, the default parameter set was loaded up in addition to the values we set on the command line. This means that the created set included all of the default values, with the --reference-sequences value overridden by the value we set. It is quite possible that we wanted our example parameter set to only include the values we supplied, though. If this is what we need, we need to run the pipeline with no parameter set - not even the default one. We can do that by using the none parameter set.
  • gkno coverage -ps none -s ref.txt -ep example2
Now lets check this parameter set:
  • gkno coverage -ps example2 -h
Now the parameter set only contains the values we specified.
Where is the parameter set stored?
We've now created two new parameter sets; where are they stored? There is no need to manually play with the parameter sets, but if you're interested, here's a little bit of information about the parameter set philosophy. All of the pipelines are defined in configuration files stored in your installation of gkno. Specifically for the coverage pipeline, the configuration file is located at <path to gkno>/gkno_launcher/config_files/pipes/coverage.json. This file is described elsewhere, but one of the things contained within it are all of the parameter sets that come with gkno. Any parameter sets you created will be put in the file coverage-parameter-sets.json that only exists if you have created your own parameter sets. If you update gkno, the coverage.json could be updated and if your own parameter sets were stored there, you would lose them. This is why this additional file is created. This will never be affected by updating gkno.
Removing a parameter set
We created the example data set, but it included information that we didn't want. This parameter set is just adding clutter to the help message for the coverage tool, since all available parameter sets are listed there.
Let's get rid of the example parameter set using the --remove-parameter-set (-rp) command.
  • gkno coverage -rp example
We can check the help message to ensure that the parameter set is gone. If we also remove the example2 parameter set, the file created to hold the parameter sets will be removed. Let's get rid of that parameter set as well.
  • gkno coverage -rp example2
  • gkno coverage -h
The last command prints out the available parameter sets and we can see that both of the example sets that we created have been removed.
Sharing parameter sets
We also encourage sharing parameter sets with the community so that analyses are reproducible by other groups. Please contact the gkno team (AlistairNWard@gmail.com) to get your own parameter sets incorporated into the main gkno distribution.