These are instructions on how to make a SneakerNet plugin. It does not matter which language the plugin is coded in. All that matters is that it is executable by the SneakerNet user and that it can accept certain parameters.
Please see below for language specific tips for Hello World examples.
Two major steps are described below for making a plugin.
- The first positional argument must be the MiSeq run directory
- The script must accept the following flags with the following example
values (or no values). The flags must adhere to original meaning behind
the flags. For example,
--help
must provide a help menu. The script does not necessarily need to use these flags however. - Add any desired soft-coded variables such as the location of a blast database
into
config.bak/settings
andconfig/settings
.config.bak
is tracked withgit
, andconfig
is created upon SneakerNet installation. - Inputs: the plugin can and should read sample names and properties
from
samples.tsv
. - If the plugin generates any files, please organize them into
runDirectory/SneakerNet/customdirectory
(wherecustomdirectory
is a name of your choice), and add any results for the resulting email torunDirectory/SneakerNet/forEmail
. Any files under this directory will be emailed with the SneakerNet email. - List your results in
runDirectory/SneakerNet/properties.tsv
. This will ensure that your results will be in the email report.properties.tsv
is three columns: plugin name, key, value- You should include
version
Flag | Default value | description |
---|---|---|
--help |
generate a help menu | |
--numcpus |
1 | Parallelization |
--debug |
generate more messages or any other debugging | |
--tempdir |
automatically generated, e.g., with File::Temp or mktemp |
Where temporary files are located |
--force |
This is loosely defined but can be used for many things like overwriting output files | |
--version |
Print a version in the format of X.Y or X.Y.Z | |
--citation |
Print a citation statement to give yourself credit. | |
--check-dependencies |
check all executable dependencies. Print executable dependencies to stdout and version information to stderr. |
How do you specify where the input assemblies are? Or where the kraken inputs are? After all, the only parameter is the input directory right?
Never fear! Here are some basic inputs that you have access to as a developer.
The most important input is samples.tsv
.
Here are the most common inputs you might want to have access to:
What | path from root input folder [^1] | Common source script or plugin [^2] | For more information |
---|---|---|---|
Sample information | samples.tsv |
SneakerNet.roRun.pl --createsamplesheet or sn_createSampleSheet.pl |
SneakerNetInput.md under the samples.tsv section |
Assemblies and genbank files | SneakerNet/assemblies/[samplename]/ |
assembleAll.pl |
|
Assembly and predicted gene metrics | SneakerNet/forEmail/assemblyMetrics.tsv |
assembleAll.pl |
|
Kraken output | SneakerNet/kraken/[samplename] |
sn_kraken.pl |
|
read metrics | SneakerNet/forEmail/readMetrics.tsv |
addReadMetrics.pl |
[^1] [samplename]
is the name of the sample in samples.tsv
.
[^2] It is possible that other sources would generate this information and so these are the most common sources.
- Place it in the SneakerNet.plugins folder
- chmod the script to be executable
- Add the plugin to the list of plugins in
config.bak/plugins
andconfig/plugins
Create a file under t/
and copy a previous example unit test from that directory.
To run all unit tests:
perl Makefile.PL
make
make test
There are three Hello World example plugins. For perl, there is an API. However, I would kindly take any help in other languages.
Please see the perl hello world plugin. Also, please run perldoc lib/perl5/SneakerNet.pm
for help on the library API.
Please see the python hello world plugin
Please see the hello world shell plugin