Mercurial > repos > eslerm > vkmz
diff vkmz.py @ 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 | b02af8eb8e6e |
children | 35b984684450 |
line wrap: on
line diff
--- 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]