0% found this document useful (0 votes)
26 views8 pages

CMDLINE

The document outlines the command line options for the Lib2NIST v1.0.6.5 (beta) library conversion utility, detailing how to execute the utility from a batch file and the specific formatting rules for input text files. It provides a comprehensive list of command line options, including logging, input and output file specifications, and various conversion settings. Additionally, it addresses concurrency issues and compatibility with different Windows operating systems.

Uploaded by

Laura Gomez Rios
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views8 pages

CMDLINE

The document outlines the command line options for the Lib2NIST v1.0.6.5 (beta) library conversion utility, detailing how to execute the utility from a batch file and the specific formatting rules for input text files. It provides a comprehensive list of command line options, including logging, input and output file specifications, and various conversion settings. Additionally, it addresses concurrency issues and compatibility with different Windows operating systems.

Uploaded by

Laura Gomez Rios
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

May 10, 2017.

Lib2NIST v1.0.6.5 (beta) command line options

Starting from version 1.0.0.6 (beta), the Lib2NIST library conversion utility can be run from a batch file. This
possibility is reserved for advanced users and is not necessary for most conversions.

Important: In all input text files, lines must end with Carriage Return/Line Feed characters (CRLF, "\r\n")

General Lib2NIST command line options rules:


 Options are separated by spaces.
 Options are not case-sensitive.
 If an option must contain spaces, it should be enclosed in "double quotes".
 Options containing characters equal sign “=” or colon “:” should not have spaces around them.
 Since the command line is read by Lib2NIST from left to right, meaning of an option may be affected by options
located to the left from it.
 Variable parts of options described below are in Bold Italics; fixed parts (necessary to recognize options) are in
Bold.
 Lib2NIST differentiates between options according to the following characteristic features:
 starting with a slash “/”
 starting with a slash and containing an equal sign “=” or colon “:” inside
 starting with an equal sign “=” (an output library or file name)
 ending with a backslash “\” (an output path)
 file (path)name with a predefined extension (.INI or .LOG)

COMMAND LINE OPTIONS

The following command line options are recognized. Whenever a file name without the path is used as a command
line option, the current path or the default path from the Registry or .INI file is used.

/LOGn (example: /LOG3). Write logfile, details level 3.


 Contents of all dialogs informing the user about errors and warnings are redirected to the logfile. All questions
asked in the dialog (non-logged) mode are automatically answered Yes and logged. Lib2NIST automatically
terminates upon completion.
 n=0..11 sets level of warnings; the greater the n, the more detailed information is written into the logfile.
 The default logfile name is Lib2NIST.LOG; it is located on the current path.
 Most of the warnings lines contained in the logfile start with the level number (for example, L3 for details level 3)
 Lines without indentation refer to the spectrum ID located below them.

Logfile.LOG Logfile (path)name, must have extension .LOG


 Set custom logfile name or pathname. If /LOGn option is not used, level n is 0.
 If neither /LOGn nor Logfile.LOG option is used then the logging is disabled.

/LOGINI Dump current Registry settings


 Dump current Lib2NIST Windows Registry settings (as they are at the startup) into the file Lib2NistSaved.INI
located on the current path.

Inifile.INI Custom initialization file; must have extension .INI


 Read settings from this file; missing settings are read from the Windows Registry. Changes in settings will be

Page 1 of 8
written to this file instead of the Registry. This option prevents Registry from changing.

InputFile or InputLibrary One or more Input datafiles or library names with full pathnames.
 This option suppresses normally displayed on startup "Select Input Library or DataFile" dialog and starts
conversion immediately.
 Datafiles must have extensions from the following list: .SDF, .MSP, .JDX, .DX, .HPJ, .JX, .JC, .JCM
 HP/Agilent MS library folders should have extension “.L”
 NIST MS User library is recognized according to the contents of the library directory.
 Full pathname overrides .INI and Registry input path settings
 INI file setting of [Directory] Input= overrides Registry settings
 /UCP option (see below) overrides .INI and Registry input path settings unless full pathname is specified.

/UCP or Use current path for input datafile or library


/UseCurrentPathForInputData
 In case of missing path in the InputFile or InputLibrary this option forces Lib2NIST to use current path instead
of INI file setting of [Directory] Input=.. It is also used in case of a relative OutputPath\.

OutputPath\ Set destination path. Must end with a backslash, “\”.


 Write conversion results to the specified path. This option overrides .INI file setting of [Directory] Output=

=OutputName Set single destination file or library name. No spaces after “=” allowed. .
 Write conversion results of all input files and/or libraries to the specified destination. This option creates one
library or datafile out of several input libraries and/or files. The option turns off after the completion of the first
successful conversion. If the name is invalid, then the option is ignored.

=OutputPath\OutputName Set single destination file or library. No spaces after “=” allowed. .
 Write conversion results of all input files and/or libraries to the specified destination. This option creates one
library or datafile out of several input libraries and/or files. If OutputPath does not exist it will be created. The
option turns off after the completion of the first successful conversion; however, it overrides .INI file setting of
[Directory] Output= . If the pathname is invalid, then the option is ignored.

/1stID=nnn Set the first output spectrum ID; create sequential IDs. No spaces allowed.
 Set the value of the ID of the first spectrum to be converted. All other spectra will have sequential ID values. This
option temporarily overrides ini or Registry [Output]KeepIDs=1 setting and forces the IDs to be written into the
output file(s). This option does not apply to HP-JCAMP output.
Example: /1stID=1500

/NOEXTRA Ignore HP-JCAMP-specific extra data in comments


 Without this option Lib2NIST recognizes |BP:nnn|MP:nnn|RI:nnn| within the comments of the input spectra as
boiling point, melting point and retention index values. When BP, MP, or RI is defined, this information in the
same format is added to the comments in the output NIST MS User library spectra and in the output .MSP file.
This option enforces old behavior of Lib2NIST when comments are not interpreted and are left unchanged.

/NoAlias Do not create a folder with file alias.msd in NIST MS Search folder.
 Normally, when Lib2NIST creates a library, it also creates a subfolder in NIST MS Search base folder that
contains file ALIAS.MSD. The only line in this folder is the path pointing to the newly created library. After
NIST MS Search has been restarted, this file provides to the MS Search a link to the new library. The
ALIAS.MSD creation may be prevented in two ways: use /NoAlias option or line NIST=<None> in the Directory
section of the ini file.

/AllowNoPeaks Do not require mass spectral peaks. Useful for creating chemical structure library.
/Z Do not discard mass spectral peaks that have zero abundances; see also /Z:S below.
Page 2 of 8
/KeepAbund Copy original peak abundances from HP/Agilent MS library to the output text file
/StdRounding Round m/z in imported EI spectra to the nearest integer.
/OutLib Output MS Library. Equivalent to Output Format = NIST MS Library)
/OutMSP Output .MSP file. Equivalent to Output Format = Text File (.MSP)
/OutSDF Output SDfile. Equivalent to Output Format = SDFile (.SDF)
/OutJCAMP Output JAMP file. Equivalent to Output Format = HP JCAMP File (.HPJ)
/com2tag Extract and remove tagged expressions1 from the comment. An example of tagged
expression is Ion_type=[M+H]+. Technically, tagged expressions are moved into $:nn-
type synonyms. Supported formats are NIST MS library, text files in MSP and SDF
formats.
/MsmsIncNames In case of MS/MS library output, create MS Search Names window content specific for
NIST 14 MS/MS libraries. Precursor type or in-source spectrum type entries in the
spectra are required. Incompatible with /PepIncNames option.
/PepIncNames In case of MS/MS library output, create MS Search Names window content specific for
NIST Tandem Peptide Libraries. Incompatible with /MsmsIncNames option.
/MSKEY=ms_label /SDFKEY=sdf_label Merge linked mass spectral file and SDfile into one output. No spaces
around “=” allowed
 Convert mass spectral data from .MSP or JCAMP format and data (including structures) from the linked to it
SDfile. ms_label and sdf_label in the command line should be substituted with corresponding labels located in
the input files.
 The SDfile must have the same name as the mass spectral datafile and have extension .SDF; it should be located
in the same directory as the mass spectral datafile.
 Mass spectra and SDfile data blocks are linked into pairs by character-to-character identical ms-value and
sdf-value located within them:

ms_label: ms-value (in MSP-file) or


##ms_ label = ms-value (in JCAMP-MS file)

and

> < sdf_ label >


sdf-value
(blank line)

 Leading and trailing spaces in ms-value and sdf-value are ignored. Letter case is not ignored.
 Names of the labels ms_label, sdf_label should not contain white spaces, ?, /, +, -, <, >,(, ), [,
], |, *, or punctuation characters ( , ; : ).
 One SDfile block can be linked to several mass spectra.

1 In /com2tag mode, tagged expressions are expected to have format Tag=value or Tag="value" and are separated by spaces.
Inside the tagged expression, spaces are allowed only in the quoted value. Letter case in the Tag is ignored. Accepted tags are
AUX, Charge, Collision_energy or CollisionV, Collision_gas, Compound_type, Cone_voltage or In-source_voltage or ConeV,
Instrument, Instrument_type, Ion_Formula, Ion_mode, Ion_MW, Ion_name, Ionization, Known_impurity, Mass_range,
Maximum_intensity, Peptide_mods or Mods, Peptide_sequence, Precursor_m/z or Mz_exact, Precursor_type, Pressure,
Related_CAS#, Salt, Salt/mix_CAS#, Sample_inlet, Special_fragmentation, Spectrum_type. MW with a decimal point and value
 1 is interpreted as exact mass. If the same tag is already present in the spectrum then it is not extracted and left in the
comment.

Page 3 of 8
 Example: Word NAME can serve as an example of both ms_label and sdf_label if names in the mass spectra and
SDfile blocks can be used for linking, that is, are identical and unique. In this case, word HYDROGEN could be
both ms-value and sdf-value to link hydrogen mass spectrum and structure together.
 Minimal set of command line options to add structures from str.SDF to inp.SDF and write results to out.SDF:
/OutSdf /CopySdf2Sdf "inp.SDF" "=out.SDF" "/StructSource=str.SDF" /MSKEY=inp_label /SDFKEY=str_label
where labels inp_label are in inp.SDF, str_label - in str.SDF. Double quotes are used to allow spaces inside.
inp.SDF, out.SDF, str.SDF may be full pathnames to SDFiles.
/msp2peplib Convert NIST peptide library MSP file (typically, *_consensus_final_true_lib.MSP) into
a peptide MS/MS library. Implies options /IncludeSynonyms:Y /KeepIDs:N
/MwFromFormula:N /MsmsOnly:Y /Msms2008-Compat:N /UseSubset:N /Z
/NOEXTRA /StdRounding /OutLib. It is not advisable to change these options. Option
/msp2peplib sorts library spectra by precursor m/z values for faster searching, shortens
protein names, truncates lists of homologues, encodes references and removes unused
ones into an overflow file. It creates two peptide library-specific files, "references.txt"
and "overflow.txt". Created in the library folder file "__log.txt" may be safely deleted.
/MspLinkedByNISTrn Add "Text File (.MSP) + MOLfiles linked by NIST#" option to Output Format drop
down list box, which creates molfiles named N<NIST r.n.>.MOL. When converting a
filename.MSP file accompanied by filename.MOL folder containing molfiles, the
molfiles are picked up according to (1) NIST r.n., (2) CAS r.n., (3) ID number.
/PeakMzDecPlaces=n Round peak m/z values to n decimal places. This may be overridden in the input MSP or
SDF file2; n = keep means do not change m/z values by removing trailing zeroes
/PrecurMzDecPlaces=n Round precursor m/z values to n decimal places. n = keep means do not change m/z
values by removing trailing zeroes
/AccuratePeakMZ In MS/MS Spectra Only mode (also set by /MsmsOnly:S option), accurate peak m/z and
intensities in the range 0.01-999 are saved in a MS/MS library even though a spectrum
does not have precursor m/z and Spectrum type does not begin with in-source or
accurate 3. The integer m/z peaks used for EI search are saved as for an EI spectrum.
In options below, S is letter Y or N
/IncludeSynonyms:S Same as “Include Synonyms” check box in Options dialog.

2 For example, to set maximal number of peak m/z decimal places to 4 in a MSP file spectrum, include in the spectrum line
Max_m/z_decimal_places: 4
Include in SDfile the following 2 lines followed by a blank line in a SDfile spectrum:
> <MAX M/Z DECIMAL PLACES>
4

Note that this entry, as well as precursor m/z entry must precede mass spectral peaks.

3In an MSP file, line Spectrum_type: in-source or Spectrum_type: accurate makes Lib2NIST save the accurate product peak m/z
even though the spectrum does not have precursor m/z. In an SDfile, the following 3 lines
> <SPECTRUM TYPE>
in-source

(the 3rd line is blank) have the same effect. This line should be located before the peak list. In these cases, integer m/z peaks
used for EI search are saved as if the spectrum were MS/MS.

Page 4 of 8
/KeepIDs:S 4 Same as “KeepIDs Unchanged” check box in Options dialog.
/MakeInChIKeys:S Calculate InChIKey from each input chemical structure, add it to the spectrum, and use it
for indexing output library. Default:Y except JCAMP output. In case of N, InChIKey, if
present in the input spectrum, is used for indexing. If no InChIKeys were found or
created, file inchikey.inu contains strings “None” instead of missing InChIKeys..
/MwFromFormula:S Same as “MW from chem. formula” check box in Options dialog.
/MsmsOnly:S Same as “MS/MS spectra only” check box in Options dialog. Create MS/MS or in-source
library
/Msms2008-Compat:S Same as “2008 MS Search compatible” check box in Options dialog.
/UseSubset:S Same as check box “Use subset”.
/Z:S Y – the same as /Z. N – discard mass spectral peaks that have zero abundances even
though the spectra are treated as MS/MS
/TranslateTextInput:S Y – apply character translation table from HPTRANS.TBL file to text input file(s)
(Default). N – do not apply (behavior before v.1.0.4.26.)

Concurrency issues

Since Lib2NIST normally reads and stores conversion parameters into the Windows Registry, two instances of
Lib2NIST running simultaneously may interfere with unpredictable consequences. To avoid this, each copy of
Lib2NIST may be run with its own .INI file. Lib2NIST running with .INI file does not change contents of the
Registry. Lib2NIST reads from the Registry only if the needed conversion parameter is missing from the specified
in the command line .INI file.

Windows NT/2000/XP/Vista/7/8/10 issues

If the amount of data to be converted is significant, it may be convenient to run Lib2NIST at low priority in case of a
single core processor. To do that you may run it from the batch file using “START” command:

start /LOW /WAIT V:\Lib2NIST\lib2nist.exe <Lib2NIST command line options>

/LOW provides low priority


/WAIT means the next batch file line will be executed upon Lib2NIST termination.

Example

The following example shows how to transform HP/Agilent MS library C:\Mylib.L into the NIST User library
Mylib.HP located in the C:\NIST98\MSSEARCH directory

Command line in the batch file:

lib2nist /log9 Mylib.log Mylib.ini C:\Mylib.L c:\nist98\mssearch\

4 S=Y is ignored, as well as “KeepIDs Unchanged” check box in Options dialog, when creating a read-only (e.g. MS/MS) library.
To override, use /KeepIDs=Yes. However, note that in this case the conversion will fail if it encounters spectrum ID = 65,536×N,
where N=1, 2, 3, ... or two equal IDs. If input spectra do not have IDs, not more than 65,535 spectra may be converted into a
library.

Page 5 of 8
/log9: Lib2NIST will produce the most detailed output to the logfile
Mylib.log the logfile Mylib.log will be located in the current directory
Mylib.ini Lib2NIST will read conversion options from Mylib.ini located in the current directory
C:\Mylib.L Input HP/Agilent type library location
c:\nist11\mssearch\ the result will be directed to this directory

Mylib.ini contents:

[Directory]
NIST=C:\NIST98\MSSEARCH
[Output]
Text=0
TextFileType=0
DB=1
CalcMW=1
IncludeSynonyms=1
KeepIDs=1
LinkMOLfile=0
MzAdd=0
MzMpy=1
NeedSubset=0

To create NIST User library Mylib instead of Mylib.HP, use command

lib2nist /log9 Mylib.log Mylib.ini C:\Mylib.L c:\nist98\mssearch\ =Mylib


or
lib2nist /log9 "Mylib.log" "Mylib.ini" "C:\Mylib.L" "=c:\nist98\mssearch\Mylib"

Without .ini file the same may be accomplished by the following command line options:

lib2nist /log9 "Mylib.log" /OutLib /MwFromFormula:Y /IncludeSynonyms:Y /KeepIDs:Y


/StdRounding:Y /UseSubset:N "C:\Mylib.L" "=c:\nist98\mssearch\Mylib"

Currently, there is no command line option to set or ignore previously saved linking to molfiles

Below is a copy of Lib2NIST.INI file containing comments explaining its contents.

;==============================================
; Lib2NIST.ini contents explanations
; Lines starting with semicolons are comments.
;==============================================

;==============================================
[Directory]
;==============================================

; Input directory (contains libraries, datafiles).


Input=S:\INPUT

; Output directory (can be same as NIST).


Output=D:\Lib2NIST.RES

Page 6 of 8
; NIST MS Search base directory (where alias.msd goes) or <None>
NIST=S:\NIST98\MSSEARCH
;NIST=<None>

; Input type: 0=>all except JCAMP, 1=>JCAMP <=== do not use


;Type:0

;==========================================
[Output]
;==========================================

; 1=>Produce NIST MS Library, 0=>No.


DB=1

; 1=>Produce MS ASCII text file, 0=>No.


Text=0

; Output MS ASCII file type: 0=>MSP, 1=>HP-JCAMP, 2=>SDF


TextFileType=0

; 1=>Calculate normalized MW from chemical formula, 0=>get MW from the input


CalcMW=1

; 1=>Include synonyms into the output, 0=>do not include


IncludeSynonyms=1

; 0=>Auto Assign IDs (1,2,3,...), 1=> get IDs from the input
KeepIDs=0

; Output structures as MOLfiles (applies to TextFileType=0 only)


;0=>No MOLfile output, 1=>MOLfile names from ID, 2=>from CAS, 3=>Both
LinkMOLfile=0

; m/z when reading text file = floor((Input m/z)*MzMpy + MzAdd + 0.5)


MzAdd=0
MzMpy=1

; 1=>treat spectra as ms/ms; 0=>No


MsmsOnly=0

; 1=>Output MS/MS library is compatible with 2008 MS Search; 0=>Compatible with newer software
Msms2008-Compat=1

; 0=>Do not use Subset, 1=>Use subset


NeedSubset=0

;==========================================
[Subset]
;==========================================

; subset type: 1=>IDs, 2=>CAS


Type=1

Page 7 of 8
; 1=>apply subset to all input
; 0=>to the 1st input file or library only, then ask.
ForAll=1

; 0=>get subset string from this ini file (CasStr or IdStr)


; 1=> read subset from a separate file
FromFile=0

; pathname of file with subset containing CAS registry numbers


CasFile=Y:\HP\Subset.CAS

; subset string containing CAS numbers


CasStr=50362-50555

; pathname of file with subset containing input IDs


IdFile=Y:\HP\Subset.ID

; subset string containing IDs


IdStr=1-4500

Page 8 of 8

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy