Example program for retrieving search parameter data.
#!/usr/local/bin/perl ############################################################################## # file: resfile_params.pl # # 'msparser' toolkit # # Test harness / example code # ############################################################################## # COPYRIGHT NOTICE # # Copyright 1998-2010 Matrix Science Limited All Rights Reserved. # # # ############################################################################## # $Source: parser/examples/test_perl/resfile_params.pl $ # # $Author: villek@matrixscience.com $ # # $Date: 2018-07-30 16:23:53 +0100 $ # # $Revision: 1b450440f9c97e1e41d0fc6016a27d68951d4532 | MSPARSER_REL_2_8_1-0-gea32989045 $ # # $NoKeywords:: $ # ############################################################################## use strict; ############################################################################## use msparser; if (!defined($ARGV[0])) { die "Must specify results filename as parameter"; } my $file = new msparser::ms_mascotresfile($ARGV[0]); if ($file->isValid) { searchParameters($file); } ############################################################################## # searchParameters # # Display parameters from the ms_searchparams object. # # The values come from the parameters and the masses sections of the file # ############################################################################## sub searchParameters { my ($resfile) = @_; my $params = $resfile->params; my $fmt = "%-20s: %s\n"; print "Search parameters from ms_searchparams" , "\n"; print "=========================================" , "\n"; printf $fmt, "License" , $params->getLICENSE(); printf $fmt, "Search title" , $params->getCOM(); printf $fmt, "SEG mass" , $params->getSEG(); printf $fmt, "Peptide tol" , $params->getTOL(); printf $fmt, "Peptide tol units" , $params->getTOLU(); printf $fmt, "Fragment tol" , $params->getITOL(); printf $fmt, "Fragment tol units" , $params->getITOLU(); printf $fmt, "Missed cleavages" , $params->getPFA(); printf $fmt, "Database" , $params->getDB(); printf $fmt, "Static mods" , $params->getMODS(); printf $fmt, "Average/monoisotopic", $params->getMASS(); printf $fmt, "Enzyme" , $params->getCLE(); printf $fmt, "Raw data file name" , $params->getFILENAME(); printf $fmt, "Input data" , $params->getQUE(); printf $fmt, "Type of search" , $params->getSEARCH(); printf $fmt, "User name" , $params->getUSERNAME(); printf $fmt, "User email" , $params->getUSEREMAIL(); printf $fmt, "Charge state" , $params->getCHARGE(); printf $fmt, "Repeat search file" , $params->getINTERMEDIATE(); printf $fmt, "Num hits to display" , $params->getREPORT(); printf $fmt, "Show overview" , $params->getOVERVIEW(); printf $fmt, "Data file format" , $params->getFORMAT(); printf $fmt, "Form version" , $params->getFORMVER(); printf $fmt, "Variable mods" , $params->getIT_MODS(); for my $i (0 .. 12) { printf $fmt, sprintf("User%02d", $i), $params->getUSERField($i); } printf $fmt, "Precursor mass" , $params->getPRECURSOR(); printf $fmt, "Taxonomy filter" , $params->getTAXONOMY(); printf $fmt, "Type of report" , $params->getREPTYPE(); printf $fmt, "Accessions to search", $params->getACCESSION(); printf $fmt, "Subcluster used" , $params->getSUBCLUSTER(); printf $fmt, "ICAT search?" , $params->getICAT(); printf $fmt, "Instrument type" , $params->getINSTRUMENT(); printf $fmt, "Error tolerant?" , $params->getERRORTOLERANT(); printf $fmt, "Rules (ions series)" , $params->getRULES(); for my $ch (ord('A') .. ord('Z')) { printf $fmt, join(' ', "Residue", chr($ch)), $params->getResidueMass(chr($ch)); } printf $fmt, "C terminus mass" , $params->getCTermMass(); printf $fmt, "N terminus mass" , $params->getNTermMass(); printf $fmt, "Mass of hydrogen", $params->getHydrogenMass(); printf $fmt, "Mass of oxygen" , $params->getOxygenMass(); printf $fmt, "Mass of carbon" , $params->getCarbonMass(); printf $fmt, "Mass of nitrogen", $params->getNitrogenMass(); printf $fmt, "Mass of electron", $params->getElectronMass(); my $i = 1; while ($params->getVarModsName($i)) { printf $fmt, "Variable mod name" , $params->getVarModsName($i); printf $fmt, "Variable mod delta" , $params->getVarModsDelta($i), "\n"; printf $fmt, "Variable mod neutral", $params->getVarModsNeutralLoss($i), "\n"; $i++; } print "\n\n"; } =pod Running the program as perl -I../bin resfile_params.pl ../data/F981123.dat will give the following output under Mascot Server 2.3: Search parameters from ms_searchparams ========================================= License : Licensed to: Matrix Science Internal use only - Frill, (4 processors). Search title : MS/MS Example SEG mass : -1 Peptide tol : 0.2 Peptide tol units : Da Fragment tol : 0.2 Fragment tol units : Da Missed cleavages : 1 Database : SwissProt Static mods : Average/monoisotopic: Monoisotopic Enzyme : Trypsin Raw data file name : C:\Auto MSMS output\Sample 1.pkl Input data : Type of search : MIS User name : User email : Charge state : 2+ Repeat search file : ../data/F981123.dat Num hits to display : 0 Show overview : Data file format : Mascot generic Form version : 1.01 Variable mods : Oxidation (M) User00 : User01 : User02 : User03 : User04 : User05 : User06 : User07 : User08 : User09 : User10 : User11 : User12 : Precursor mass : 0 Taxonomy filter : All entries Type of report : Peptide Accessions to search: Subcluster used : -1 ICAT search? : Instrument type : ESI-QUAD-TOF Error tolerant? : Rules (ions series) : 1,2,8,9,10,13,14,15 Residue A : 71.037114 Residue B : 114.53494 Residue C : 103.009185 Residue D : 115.026943 Residue E : 129.042593 Residue F : 147.068414 Residue G : 57.021464 Residue H : 137.058912 Residue I : 113.084064 Residue J : 0 Residue K : 128.094963 Residue L : 113.084064 Residue M : 131.040485 Residue N : 114.042927 Residue O : 0 Residue P : 97.052764 Residue Q : 128.058578 Residue R : 156.101111 Residue S : 87.032028 Residue T : 101.047679 Residue U : 150.95363 Residue V : 99.068414 Residue W : 186.079313 Residue X : 111 Residue Y : 163.063329 Residue Z : 128.55059 C terminus mass : 17.00274 N terminus mass : 1.007825 Mass of hydrogen : 1.007825 Mass of oxygen : 15.994915 Mass of carbon : 12 Mass of nitrogen : 14.003074 Mass of electron : 0.000549 Variable mod name : Oxidation (M) Variable mod delta : 15.994919 Variable mod neutral: 0 =cut
Copyright © 2022 Matrix Science Ltd. All Rights Reserved. Generated on Thu Mar 31 2022 01:12:29 |