Mercurial > repos > eslerm > vkmz
changeset 5:04079c34452a draft
planemo upload for repository https://github.com/HegemanLab/VKMZ commit 3e37abe007f126480b9b748ad5322755445ac95b-dirty
author | eslerm |
---|---|
date | Thu, 31 May 2018 12:06:20 -0400 |
parents | 1c2fe3a17065 |
children | 35b984684450 |
files | README vkmz.py vkmz.xml |
diffstat | 3 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/README Wed May 30 18:35:57 2018 -0400 +++ b/README Thu May 31 12:06:20 2018 -0400 @@ -63,6 +63,8 @@ * Sets root directory for database file path * `--polarity` * Set polarity for all samples overriding input files + * `--unique` + * Remove features with multiple predictions * `--no-plot` * Disable html output
--- a/vkmz.py Wed May 30 18:35:57 2018 -0400 +++ b/vkmz.py Thu May 31 12:06:20 2018 -0400 @@ -35,7 +35,8 @@ inputSubparser.add_argument('--directory', nargs='?', default='', type=str, help='Define directory of tool.') inputSubparser.add_argument('--polarity', '-p', choices=['positive','negative'], help='Force polarity mode. Ignore variables in input file.') inputSubparser.add_argument('--no-adjustment', '-na', action='store_true', help='Use flag to turn off polarity based mass adjustment. This flag should always be used if reprocessing data generated by VKMZ.') - inputSubparser.add_argument('--multiprocessing', '-m', action='store_true', help='Use flag to turn on multiprocessing.') + inputSubparser.add_argument('--unique', '-u', action='store_true', help='Set flag to only output features which have a single match.') + inputSubparser.add_argument('--multiprocessing', '-m', action='store_true', help='Set flag to turn on multiprocessing.') inputSubparser.add_argument('--plottype', '-t', nargs='?', default='scatter-2d', choices=['scatter-2d', 'scatter-3d'], help='Select plot type.') inputSubparser.add_argument('--size', '-s', nargs='?', default=5, type=int, help='Set maxium size of plot symbols.') inputSubparser.add_argument('--size-algorithm', '-a', nargs='?', default=0, type=int, choices=[0,1], help="Symbol size algorithm selector. Algorithm 0 sets all symbols to the maxium size. Algorithm 2 determines a features symbol size by it's log intensity.") @@ -48,6 +49,8 @@ vkPolarity = getattr(args, "polarity") +vkUnique = getattr(args, "unique") + vkMultiprocessing = getattr(args, "multiprocessing") vkNoAdjustment = getattr(args, "no_adjustment") @@ -103,6 +106,8 @@ if prediction != -1: feature[2] = mass predictions = predictNeighbors(mass, uncertainty, prediction) + if vkUnique and len(predictions) > 1: + return feature.append(predictions) # feature[5] predictionClosest = predictions[0] formula = predictionClosest[1]
--- a/vkmz.xml Wed May 30 18:35:57 2018 -0400 +++ b/vkmz.xml Thu May 31 12:06:20 2018 -0400 @@ -1,4 +1,4 @@ -<tool id="VKMZ" name="VKMZ" version="1.1"> +<tool id="VKMZ" name="VKMZ" version="1.1.1"> <description>metabolomics formula prediction and van Krevelen diagram generation</description> @@ -34,6 +34,9 @@ --output vkmz --error $prediction.error --database $prediction.database_type.database + #if $prediction.unique=="True": + --unique + #end if --size $diagram.size --size-algorithm $diagram.sizealgorithm --directory $__tool_directory__/ @@ -81,6 +84,7 @@ <param name="database" label="Database" type="data" format="tabular" help="Select a custom tabular database" /> </when> </conditional> + <param name="unique" label="Unique matches" type="boolean" truevalue="True" help="Only output features with a single prediction" /> </section> <section name="diagram" title="Diagram Options" expanded="true"> <param name="size" label="Minimum Maker Size" type="integer" value="5" min="0" help="Set the base size of diagram's markers" /> @@ -163,6 +167,8 @@ *Database* can be set to heuristically generated databases for unlabeled and labeled chemcials [2] or to a custom database. +*Unique matches* removes features from the output which have multiple predictions. Low mass molecules are less affected by this filter than high mass molecules. + **Diagram Options** Predicted features are plotted as markers. The size of each marker is determined by the minimum marker size and a marker size algorithm. The marker size algorithms use minimum marker size as a variable.