Skip to content

Commit

Permalink
Add in peak-fit-mode parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris7 committed Sep 14, 2017
1 parent f539d11 commit 5f97b78
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pyquant/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@

peak_parameters = pyquant_parser.add_argument_group('Peak Fitting Parameters')
peak_parameters.add_argument('--peak-find-method', help='The method to use to identify peaks within data. For LC-MS, relative-max is usually best. For smooth data, derivative is better.', type=str, choices=(PEAK_FINDING_REL_MAX, PEAK_FINDING_DERIVATIVE), default=PEAK_FINDING_REL_MAX)
peak_parameters.add_argument(
'--peak-find-mode',
help='This picks some predefined parameters for various use cases. Fast is good for robust data with few peaks, slow is good for complex data with overlapping peaks of very different size.',
type=str,
choices=(PEAK_FIT_MODE_SLOW, PEAK_FIT_MODE_AVERAGE, PEAK_FIT_MODE_FAST),
default=PEAK_FIT_MODE_AVERAGE
)
peak_parameters.add_argument('--gap-interpolation', help='This interpolates missing data in scans. The parameter should be a number that is the maximal gap size to fill (ie 2 means a gap of 2 scans). Can be useful for low intensity LC-MS data.', type=int, default=0)
peak_parameters.add_argument('--remove-baseline', help='Fit a separate line for the baseline of each peak.', action='store_true')
peak_parameters.add_argument('--peak-cutoff', help='The threshold from the initial retention time a peak can fall by before being discarded', type=float, default=0.05)
Expand Down
1 change: 1 addition & 0 deletions pyquant/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def __init__(self, queue=None, results=None, precision=6, raw_name=None, mass_la
'smooth': self.parser_args.xic_smooth,
'r2_cutoff': self.parser_args.r2_cutoff,
'gap_interpolation': self.parser_args.gap_interpolation,
'fit_mode': self.parser_args.peak_find_mode,
}

def get_calibrated_mass(self, mass):
Expand Down

0 comments on commit 5f97b78

Please sign in to comment.