Class: MS::Troll
- Inherits:
-
Object
- Object
- MS::Troll
- Defined in:
- lib/ms/sim_trollop.rb
Instance Method Summary collapse
- #get ⇒ Object
-
#initialize ⇒ Troll
constructor
A new instance of Troll.
Constructor Details
#initialize ⇒ Troll
Returns a new instance of Troll.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/ms/sim_trollop.rb', line 5 def initialize @opts = Trollop:: do version "mspire-simulator 0.0.1a (c) 2012 Brigham Young University" "\n *********************************************************************\n Description: Simulates ms runs given protein fasta files. Outputs\n a mzML file.\n\n\n Usage:\n mspire-simulator [options] <filenames>+\n\n where [options] are:\n EOS\n opt :digestor, \"Digestion Enzyme; one of: \\n\\t\\targ_c,\\n \\t\\tasp_n,\nasp_n_ambic,\n chymotrypsin,\\n \\t\\tcnbr,\n lys_c,\\n \\t\\tlys_c_p,\n pepsin_a,\\n\\t\\ttryp_cnbr,\n tryp_chymo,\\n \\t\\ttrypsin_p,\n v8_de,\\n \\t\\tv8_e,\n trypsin,\\n \\t\\tv8_e_trypsin,\n v8_de_trypsin\",\n :default => \"trypsin\" \n opt :missed_cleavages, \"Number of missed cleavages during digestion\", :default => 2\n opt :sampling_rate, \"How many scans per second\", :default => 0.5 \n opt :run_time, \"Run time in seconds\", :default => 1000.0 \n opt :noise, \"Noise on or off\", :default => \"true\"\n opt :noise_density, \"Determines the density of white noise\", :default => 10\n opt :noiseMaxInt, \"The max noise intensity level\", :default => 1000\n opt :noiseMinInt, \"The minimum noise intensity level\", :default => 50\n opt :pH, \"The pH that the sample is in - for determining charge\", :default => 2.6\n opt :out_file, \"Name of the output file\", :default => \"test.mzml\"\n opt :contaminants, \"Fasta file containing contaminant sequences\", :default => \"testFiles/contam/hum_keratin.fasta\"\n opt :dropout_percentage, \"Defines the percentage of random dropouts in the run. 0.0 <= percentage < 1.0\", :default => 0.01\n opt :shuffle, \"Option shuffles the scans to simulate 1d data\", :default => \"false\"\n opt :one_d, \"Turns on one dimension simulation; run_time is automatically set to 300.0\", :default => \"false\"\n opt :truth, \"Determines truth file type; false gives no truth file; one of: 'xml' or 'csv' or 'xml_csv' (for both)\", :default => \"csv\"\n opt :front, \"Fronting chromatography parameter\", :default => 6.65\n opt :tail, \"Tailing chromatography parameter\", :default => 0.30\n opt :mu, \"Expected value of the chromatography curve\", :default => 25.0\n opt :wobA, \"m/z wobble parameter\", :default => 0.001071\n opt :wobB, \"m/z wobble parameter\", :default => -0.5430\n opt :jagA, \"intensity variance parameter\", :default => 10.34\n opt :jagC, \"intensity variance parameter\", :default => 0.00712\n opt :jagB, \"intensity variance parameter\", :default => 0.12\n opt :overlapRange, \"range in which to determine overlapping peaks\", :default => 1.0724699230489427\n opt :email, \"Email address to send completion messages to\", :default => \"nil\"\n opt :mzml, \"Mzml file to extract simulation parameters from\", :default => \"nil\"\n opt :generations, \"If an mzml file is provided this specifies the number of generations for the curve fitting algorithm\", :default => 30000\n opt :mass_label, \"Specify a mass tag pattern\", :default => 0\n opt :ms2s, \"Number of peptide ms2s to perform on each scan\", :default => 1\n opt :ms2, \"Turn on/off ms2 (true == on)\", :default => \"true\"\n opt :databaseName, \"Name of database file\", :default => \"peptides_[Time.now.sec]\"\n opt :memory, \"Determines whether to store the database in memory or write to file (false == write to file) Note: if true no database file will be accessible after simulation\", :default => \"false\"\n opt :modifications, \"To define residue or termini modifications. Enter a string Id1R1_Id2R2_ ... where Idi is a modification Id from http://psidev.cvs.sourceforge.net/viewvc/psidev/psi/mod/data/PSI-MOD.obo and Ri is the residue/terminus to apply it to (c-term = CT, n-term = NT)\", :default => \"false\"\n\n end\n\n if @opts[:mzml] != \"nil\"\n @opts = CurveFit.get_parameters(@opts)\n end\n Trollop::die :sampling_rate, \"must be greater than 0\" if @opts[:sampling_rate] <= 0\n Trollop::die :run_time, \"must be non-negative\" if @opts[:run_time] < 0\n Trollop::die \"must supply a .fasta protein sequence file\" if ARGV.empty?\n Trollop::die :dropout_percentage, \"must be between greater than or equal to 0.0 or less than 1.0\" if @opts[:dropout_percentage] < 0.0 or @opts[:dropout_percentage] >= 1.0\n @opts[:overlapRange] = (@opts[:overlapRange]*10.0**-6)/2.0\nend\n" |
Instance Method Details
#get ⇒ Object
75 |
# File 'lib/ms/sim_trollop.rb', line 75 def get; @opts; end |