Skip to content

Merge crosstabs (pivot tables) that share the same column layout

Notifications You must be signed in to change notification settings

PNNL-Comp-Mass-Spec/Crosstab-Merger

Repository files navigation

Overview

The Crosstab Merger combines crosstab files (aka PivotTables) that have a similar format, creating a single merged crosstab file.

Downloads

Download a .zip file with the program from: https://github.com/PNNL-Comp-Mass-Spec/Crosstab-Merger/releases

Example Data Files

Browse example input and output files at
https://github.com/PNNL-Comp-Mass-Spec/Crosstab-Merger/tree/master/Docs

Console Switches

The CrossTab Merger is a command line application.
Syntax:

CrosstabMerger.exe
 /I:InputFilePathSpec [/O:OutputFileNameOrPath]
 [/D:OutputDirectory] [/Y]
 [/H:HeaderRowCount] [/K:KeyColumnCount] [/Preview]
 [/Conf:KeyValueParamFilePath] [/CreateParamFile] 

Use /I to specify the pattern to use to find files to merge

  • The name must contain a wildcard character (either * or ?) so that multiple files can be found
  • For example, use Block*.csv to match all CSV files that start with "Block"
  • Or, use Block?_RelativeAbundanceRatios.csv to match these four CSV files at https://github.com/PNNL-Comp-Mass-Spec/Crosstab-Merger/tree/master/Docs
    • Block1_RelativeAbundanceRatios.csv
    • Block2_RelativeAbundanceRatios.csv
    • Block3_RelativeAbundanceRatios.csv
    • Block4_RelativeAbundanceRatios.csv

The output file name is optional, but can be specified using /O

  • For example, /O:MergedAbundanceRatios.csv
  • If omitted, the output file will be auto-named, based on InputFilePathSpec

Use /D to specify the output directory

Use /Y to allow overwriting an existing output file

Use /H to specify the number of header rows

Use /K to specify the number of key columns

  • This is the number of columns that provide metadata about the crosstab data
    • If the crosstab has peptide quantitation values, and the data file lists protein name in the first column and peptide sequence in the second column, the file has two key columns
  • As mentioned for /H, the PeptideQuantitation text files on GitHub have one key column
    • The RelativeAbundanceRatios CSV files on GitHub have two key columns

Use /Preview to read the input files and see the number of datasets found and rows that would be written

Use /P or /Conf to define a key/value parameter file with settings to load

Contacts

Written by Matthew Monroe for the Department of Energy (PNNL, Richland, WA)
E-mail: matthew.monroe@pnnl.gov or proteomics@pnnl.gov
Website: https://github.com/PNNL-Comp-Mass-Spec/ or https://panomics.pnnl.gov/ or https://www.pnnl.gov/integrative-omics

License

Crosstab Merger is licensed under the 2-Clause BSD License; you may not use this program except in compliance with the License. You may obtain a copy of the License at https://opensource.org/licenses/BSD-2-Clause

Copyright 2020 Battelle Memorial Institute