ms-in_silico 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History +4 -0
- data/lib/ms/in_silico/digest.rb +1 -1
- data/lib/ms/in_silico/fragment.rb +18 -25
- metadata +2 -2
data/History
CHANGED
data/lib/ms/in_silico/digest.rb
CHANGED
@@ -5,7 +5,7 @@ module Ms
|
|
5
5
|
# Ms::InSilico::Digest::manifest digest a protein sequence into peptides
|
6
6
|
# Digest a protein sequence into an array of peptides.
|
7
7
|
#
|
8
|
-
# % rap digest MIVIGRSIVHPYITNEYEPFAAEKQQILSIMAG
|
8
|
+
# % rap digest MIVIGRSIVHPYITNEYEPFAAEKQQILSIMAG --: dump --no-audit
|
9
9
|
# I[14:37:55] digest MIVIGRSIVHP... to 3 peptides
|
10
10
|
# # date: 2008-09-15 14:37:55
|
11
11
|
# ---
|
@@ -3,32 +3,14 @@ require 'ms/in_silico/spectrum'
|
|
3
3
|
module Ms
|
4
4
|
module InSilico
|
5
5
|
|
6
|
-
#
|
6
|
+
# :startdoc::manifest calculates a theoretical ms/ms spectrum
|
7
7
|
#
|
8
|
-
# Calculates the
|
9
|
-
#
|
10
|
-
#
|
8
|
+
# Calculates the theoretical ms/ms spectrum for a peptide sequence.
|
9
|
+
# Configurations allow the specification of one or more fragmentation series
|
10
|
+
# to include, as well as charge, and intensity.
|
11
11
|
#
|
12
|
-
#
|
13
|
-
#
|
14
|
-
# ---
|
15
|
-
# ms/in_silico/fragment (:...:):
|
16
|
-
# - - 717.377745628191
|
17
|
-
# - - 102.054954926291
|
18
|
-
# - 132.101905118891
|
19
|
-
# - 201.123368842491
|
20
|
-
# - 261.144498215091
|
21
|
-
# - 329.181946353891
|
22
|
-
# - 389.203075726491
|
23
|
-
# - 457.240523865291
|
24
|
-
# - 517.261653237891
|
25
|
-
# - 586.283116961491
|
26
|
-
# - 616.330067154091
|
27
|
-
# - 699.367180941891
|
28
|
-
# - 717.377745628191
|
29
|
-
#
|
30
|
-
# In the output, the parent ion mass is given first, followed by an
|
31
|
-
# array of the sorted fragmentation data.
|
12
|
+
# In the output the sorted fragmentation data is given first, followed by
|
13
|
+
# a hash of header data, including the parent ion mass.
|
32
14
|
class Fragment < Tap::Task
|
33
15
|
|
34
16
|
# A block to validate a config input
|
@@ -48,6 +30,17 @@ module Ms
|
|
48
30
|
config :sort, true, &c.switch # sorts the data by mass
|
49
31
|
config :unmask, true, &c.switch # remove masked (negative) masses
|
50
32
|
|
33
|
+
# Constructs a hash of header data pertinent to the spectrum.
|
34
|
+
def headers(spec)
|
35
|
+
{
|
36
|
+
:charge => charge,
|
37
|
+
:parent_ion_mass => spec.parent_ion_mass(charge),
|
38
|
+
:series => series,
|
39
|
+
:nterm => spec.nterm.to_s,
|
40
|
+
:cterm => spec.cterm.to_s
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
51
44
|
def process(peptide)
|
52
45
|
log :fragment, peptide
|
53
46
|
spec = spectrum(peptide)
|
@@ -58,7 +51,7 @@ module Ms
|
|
58
51
|
masses.sort! if sort
|
59
52
|
masses.collect! {|m| [m, intensity] } if intensity
|
60
53
|
|
61
|
-
[spec
|
54
|
+
[masses, headers(spec)]
|
62
55
|
end
|
63
56
|
|
64
57
|
protected
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ms-in_silico
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Chiang
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-02-
|
12
|
+
date: 2009-02-24 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|