Skip to content

Commit

Permalink
DOC: improved documentation of process template
Browse files Browse the repository at this point in the history
  • Loading branch information
pebert committed Dec 30, 2016
1 parent 1eb2904 commit 9f4b24a
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 8 deletions.
28 changes: 21 additions & 7 deletions template/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,44 @@
# Templates for new documents

## New Process document
In order to document a new analysis, please download the file `deep_process_template.xml` and fill out all sections with you favorite text editor.
Certain entries must appear only once, whereas others, e.g., those to specify reference and output files,
can occur as often as needed in the *Process* file - just copy the XML skeleton for a new entry.
## Create a new Process document
In order to document a new analysis, please download the file `deep_process_template.xml`
and fill out all sections with your favorite text or XML editor.
Certain entries must appear only once (*Process* name, version and author as well as the description),
whereas the remaining sections can contain as many entries as needed;
you can list any number of input, output and reference files and as many tools as needed in the
Software section to give a complete step-by-step documentation of the analysis pipeline.

An important note: please verify that the template you are using lists the following style sheet document at the top:

```xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://deep.mpi-inf.mpg.de/DAC/files/style/deep_process_style.css"?>
```
This is required to render the *Process* XML file into a nicely readable form when opened with a standard web browser.
Also, please make sure that there is no encoding specified, i.e., ***the following is considered bad practice***:

```xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/css" href="http://deep.mpi-inf.mpg.de/DAC/files/style/deep_process_style.css"?>
```

For a more detailed description, please refer to the following publication:

["A general concept for consistent documentation of computational analyses", *Database* 2015](https://dx.doi.org/10.1093/database/bav050)

#### Technical note: encoding
##### Technical note: encoding
If you are wondering why there should no encoding be specified in the *Process* document itself: the encoding for all DEEP *Process* files is set in the *XML schema* file.
This ensures that all *Process* files are read with the same encoding when using the [validation script](../validation/) and the respective schema file.


#### Technical note: style sheet
##### Technical note: style sheet
If you are wondering why the link the *Process* template does not refer to this repository: repositories are not meant for file hosting like a regular
web server. To discourage users from nevertheless doing so, the Github software forces the [MIME type](https://en.wikipedia.org/wiki/Media_type)
of the style sheet document to be `text/plain` instead of `text/css` when it is loaded in your browser. Unfortunately, the browser cannot recognize
(interpret) the style sheet as such in this scenario and, hence, the *Process* document would not be rendered as intended.
(interpret) the style sheet as such in this scenario and, hence, the *Process* document would not be rendered as intended.


## Validate the new Process document
After having created a new *Process* document, the most convenient way to check it for syntactical errors
(e.g., missing software versions or invalid characters) is to use the small Python script provided in this
repository [validation script](../validation/).
27 changes: 26 additions & 1 deletion template/deep_process_template.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://deep.mpi-inf.mpg.de/DAC/files/style/deep_process_style.css"?>
<!-- Header above: leave that unchanged -->

<!-- Process documentation: change as necessary -->
<process>
<!-- Process name: by convention, should be 3 capital letters -->
<name>PROC</name>
<!-- Process version: by convention, (single-digit) number, increment by one after update -->
<version>0</version>
<!-- Process author: state full name and valid institutional e-mail address -->
<author>
<name>Author_Name</name>
<email>Author_Email</email>
</author>
<!-- Process description: free-text field, describe what, how and why this analysis does.
If you have to use special characters like ">" or "&", remember to escape them properly. -->
<description>
Description
</description>

<!-- Process input files: you can copy the "filetype" block as often as necessary -->
<inputs>
<filetype>
<identifier>Input_ID1</identifier>
Expand All @@ -18,6 +28,8 @@
<comment>Comment_1</comment>
</filetype>
</inputs>

<!-- Process reference files: you can copy the "filetype" block as often as necessary -->
<references>
<filetype>
<identifier>Reference_ID1</identifier>
Expand All @@ -26,6 +38,10 @@
<comment>Comment_2</comment>
</filetype>
</references>

<!-- Process output files: you can copy the "filetype" block as often as necessary; you only need to document
output files that are stored, i.e., that are available in downstream analysis. Do not list intermediate or
temporary files that are anyway discarded after a successful pipeline run -->
<outputs>
<filetype>
<identifier>Output_ID1</identifier>
Expand All @@ -34,13 +50,22 @@
<comment>Comment_3</comment>
</filetype>
</outputs>

<!-- Process step-by-step instructions: you can copy the "tool" block as often as necessary.
Note that special characters as part of the command line must not be escaped. Enclosing the
command line in a <![CDATA[ ]]> block avoids interpretation of its content as XML stream. -->
<software>
<tool>
<name>Tool_Name</name>
<version>Tool_Version</version>
<command_line><![CDATA[ TOOL_CMDLINE ]]></command_line>
<command_line>
<![CDATA[
TOOL_CMDLINE
]]>
</command_line>
<loop>no_looping</loop>
<comment>Comment_4</comment>
</tool>
</software>

</process>

0 comments on commit 9f4b24a

Please sign in to comment.