BinderScriptNotebook

LabelFreeProteinQuantification

After JoinQuantPepIonsWithProteins every quantified peptide ion carries its protein group. LabelFreeProteinQuantification turns these ion intensities into one intensity per protein group and run. It works in up to three steps. The first merges the charge states of a peptide, the second merges the modified forms of a peptide, and the third merges all peptides of a protein group. The first two steps are optional. Each step has the same shape: transform the values, drop single values or outliers within a group, then aggregate what is left. Only light rows (GlobalMod 0) go in, so this tool is for unlabeled samples. For labeled samples use LabeledProteinQuantification.

Inputs and outputs

Flag

Meaning

Comes from

-i

one or more .quantAndProt files, or a directory that is searched for *.quantAndProt

JoinQuantPepIonsWithProteins

-o

the output directory, created when missing

-p

the parameter file in JSON

this page

Logs go to LabeledProteinQuantification_log.txt and LabeledQuantification_log.txt in the output directory.

The tool writes up to four tab separated tables into the output directory. ChargeAggregation.txt appears only when the charge step runs and ModificationAggregation.txt only when the modification step runs. ProteinAggregation.txt has one row per protein group and run with the aggregated intensity, the number of values that went into it, and its CV, standard deviation and SEM. LabelFreeQuant.txt is the same table pivoted, one row per protein group and one block of columns per input file, named <run>.Quant_Light, <run>.ItemsUsedForQuant_Light and so on. Protein groups missing in a run have empty cells there.

Parameters

Parameter

Default

Meaning

Alignment_QValue

None

Rows that came from alignment and have an alignment q-value at or above this value are dropped, None keeps everything.

ModificationFilter

UseModifiedPeptides.All

Which peptides enter the aggregation. All keeps every peptide, No drops every peptide with a modification, UseOnly mods keeps unmodified peptides and peptides whose modifications are all in the list.

AggregatePeptideChargeStatesParams

None

Some params runs the charge step with the given AggregationParams. None skips it.

AggregateModifiedPeptidesParams

None

Some params runs the modification step. None skips it.

AggregateToProteinGroupsParams

{ Transform = None; SingleFilters = None; GroupFilters = None; Aggregation = { Light = Mean } }

The protein step, always run.

An AggregationParams record describes one step.

Parameter

Default

Meaning

Transform

None

Some { Light = Some Log2 } applies a NumericTransform (Log2, Add, Substract, MultiplyBy, DivideBy) to every intensity before filtering and aggregation.

SingleFilters

None

Some { Light = Some (seq [IsBiggerThan 4.0]) } keeps only intensities that pass every NumericFilter (IsBiggerThan, IsSmallerThan).

GroupFilters

None

Some { Light = Some (seq [Tukey 1.5]) } removes outliers within each group before aggregation. GroupFilter is Tukey factor, Stdev factor or TopX count.

Aggregation

{ Light = Mean }

How the remaining values of a group are combined. NumericAggregation is Mean, Median or Sum.

Four default files exist. LabelFreeQuantificationParams.json is the table above and only runs the protein step. LabelFreeQuantificationParams_ChargeAgg.json adds the charge step with Mean. LabelFreeQuantificationParams_ChargeAgg_ModAgg.json adds the charge and the modification step, both with Mean. LabelFreeQuantificationParams_Transform_Filter_Sum.json runs only the protein step, but log2 transforms the intensities, keeps those above 4.0 and sums them.

Writing a parameter file

open System.IO
open ProteomIQon

// The protein step of the default file: no transform, no filters, mean of the peptide intensities.
let proteinStep : Common.LabelFreeQuantification.AggregationParams =
    {
        Transform     = None
        SingleFilters = None
        GroupFilters  = None
        Aggregation   = { Light = NumericAggregation.Mean }
    }

let labelFreeQuantificationParams : Dto.LabelFreeQuantificationParams =
    {
        Alignment_QValue                   = None
        ModificationFilter                 = UseModifiedPeptides.All
        AggregatePeptideChargeStatesParams = None
        AggregateModifiedPeptidesParams    = None
        AggregateToProteinGroupsParams     = proteinStep
    }

// Replace the temp folder with your project folder.
let outputPath = Path.Combine(Path.GetTempPath(), "LabelFreeQuantificationParams.json")

Json.serializeAndWrite outputPath labelFreeQuantificationParams

Running the tool

The tool installs with dotnet tool install --global ProteomIQon.LabelFreeProteinQuantification. A single run:

proteomiqon-labelfreeproteinquantification -i path/to/run.quantAndProt -o path/to/output -p path/to/LabelFreeQuantificationParams.json

Several runs in one table, from a list or from a directory:

proteomiqon-labelfreeproteinquantification -i path/to/run1.quantAndProt path/to/run2.quantAndProt -o path/to/output -p path/to/LabelFreeQuantificationParams.json
proteomiqon-labelfreeproteinquantification -i path/to/quantAndProt -o path/to/output -p path/to/LabelFreeQuantificationParams.json

All flags:

proteomiqon-labelfreeproteinquantification --help
namespace System
namespace System.IO
namespace ProteomIQon
val proteinStep: LabelFreeQuantification.AggregationParams
module Common from ProteomIQon
module LabelFreeQuantification from ProteomIQon.Common
Multiple items
module AggregationParams from ProteomIQon.Common.LabelFreeQuantification

--------------------
type AggregationParams = { Transform: Transforms option SingleFilters: SingleFilters option GroupFilters: GroupFilters option Aggregation: Aggregations } member Equals: AggregationParams * IEqualityComparer -> bool
union case Option.None: Option<'T>
Multiple items
module NumericAggregation from ProteomIQon.Common

--------------------
type NumericAggregation = | Mean | Median | Sum member Equals: NumericAggregation * IEqualityComparer -> bool member IsMean: bool member IsMedian: bool member IsSum: bool
union case NumericAggregation.Mean: NumericAggregation
val labelFreeQuantificationParams: Dto.LabelFreeQuantificationParams
module Dto from ProteomIQon
Multiple items
module LabelFreeQuantificationParams from ProteomIQon.Dto

--------------------
type LabelFreeQuantificationParams = { Alignment_QValue: float option ModificationFilter: UseModifiedPeptides AggregatePeptideChargeStatesParams: AggregationParams option AggregateModifiedPeptidesParams: AggregationParams option AggregateToProteinGroupsParams: AggregationParams } member Equals: LabelFreeQuantificationParams * IEqualityComparer -> bool
Multiple items
module UseModifiedPeptides from ProteomIQon.Common

--------------------
type UseModifiedPeptides = | All | No | UseOnly of Modification seq member Equals: UseModifiedPeptides * IEqualityComparer -> bool member IsAll: bool member IsNo: bool member IsUseOnly: bool
union case UseModifiedPeptides.All: UseModifiedPeptides
val outputPath: string
type Path = static member ChangeExtension: path: string * extension: string -> string static member Combine: path1: string * path2: string -> string + 4 overloads static member EndsInDirectorySeparator: path: ReadOnlySpan<char> -> bool + 1 overload static member Exists: path: string -> bool static member GetDirectoryName: path: ReadOnlySpan<char> -> ReadOnlySpan<char> + 1 overload static member GetExtension: path: ReadOnlySpan<char> -> ReadOnlySpan<char> + 1 overload static member GetFileName: path: ReadOnlySpan<char> -> ReadOnlySpan<char> + 1 overload static member GetFileNameWithoutExtension: path: ReadOnlySpan<char> -> ReadOnlySpan<char> + 1 overload static member GetFullPath: path: string -> string + 1 overload static member GetInvalidFileNameChars: unit -> char array ...
<summary>Performs operations on <see cref="T:System.String" /> instances that contain file or directory path information. These operations are performed in a cross-platform manner.</summary>
Path.Combine(paths: System.ReadOnlySpan<string>) : string
Path.Combine([<System.ParamArray>] paths: string array) : string
Path.Combine(path1: string, path2: string) : string
Path.Combine(path1: string, path2: string, path3: string) : string
Path.Combine(path1: string, path2: string, path3: string, path4: string) : string
Path.GetTempPath() : string
module Json from ProteomIQon
val serializeAndWrite: path: string -> obj: 'a -> unit