![]() |
MergeTextFilesWithSD.pl - Merge CSV or TSV TextFile(s) into SDFile
MergeTextFilesWithSD.pl SDFile TextFile(s)...
MergeTextFilesWithSD.pl [-h, --help] [--indelim comma | semicolon] [-c, --columns colnum,...;... | collabel,...;...] [-k, --keys colkeynum;... | colkeylabel;...] [-m, --mode colnum | collabel] [-o, --overwrite] [-r, --root rootname] [-s, --sdkey sdfieldname] [-w, --workingdir dirname] SDFile TextFile(s)...
Merge multiple CSV or TSV TextFile(s) into SDFile. Unless -k --keys option is used, data rows from all TextFile(s) are added to SDFile in a sequential order, and the number of compounds in SDFile is used to determine how many rows of data are added from TextFile(s).
Multiple TextFile(s) names are separated by spaces. The valid file extensions are .csv and .tsv for comma/semicolon and tab delimited text files respectively. All other file names are ignored. All the text files in a current directory can be specified by *.csv, *.tsv, or the current directory name. The --indelim option determines the format of TextFile(s). Any file which doesn't correspond to the format indicated by --indelim option is ignored.
Default value: all;all;.... By default, all columns from TextFile(s) are merged into SDFile.
For colnum mode, input value format is: colnum,...;colnum,...;.... Example:
For collabel mode, input value format is: collabel,...;collabel,...;.... Example:
By default, data rows from TextFile(s) are merged into SDFile in the order they appear.
For colnum mode, input value format is:colkeynum, colkeynum;.... Example:
For collabel mode, input value format is:colkeylabel, colkeylabel;.... Example:
To merge Sample1.csv and Sample2.csv into Sample.sdf and generate NewSample.sdf, type:
To merge all Sample*.tsv into Sample.sdf and generate NewSample.sdf file, type:
To merge column numbers ''1,2'' and ''3,4,5'' from Sample2.csv and Sample3.csv into Sample.sdf and to generate NewSample.sdf, type:
To merge column ''Mol_ID,Formula,MolWeight'' and ''Mol_ID,ChemBankID,NAME'' from Sample1.csv and Sample2.csv into Sample.sdf using ''Mol_ID'' as SD and column keys to generate NewSample.sdf, type:
ExtractFromSDFiles.pl, FilterSDFiles.pl, InfoSDFiles.pl, JoinSDFiles.pl, JoinTextFiles.pl,  MergeTextFiles.pl, ModifyTextFilesFormat.pl, SplitSDFiles.pl, SplitTextFiles.pl
Copyright (C) 2004-2008 Manish Sud. All rights reserved.
This file is part of MayaChemTools.
MayaChemTools is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.