# HG changeset patch # User eslerm # Date 1527782780 14400 # Node ID 04079c34452aa63f4990f59cbdd5593b65d1de30 # Parent 1c2fe3a170653bcbc4f01efea4b5f259b80f85ad planemo upload for repository https://github.com/HegemanLab/VKMZ commit 3e37abe007f126480b9b748ad5322755445ac95b-dirty diff -r 1c2fe3a17065 -r 04079c34452a README --- 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 diff -r 1c2fe3a17065 -r 04079c34452a vkmz.py --- 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] diff -r 1c2fe3a17065 -r 04079c34452a vkmz.xml --- 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 @@ - + metabolomics formula prediction and van Krevelen diagram generation @@ -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 @@ +
@@ -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.