Class: Bio::SPTR
- Inherits:
-
EMBLDB
- Object
- EMBLDB
- Bio::SPTR
- Defined in:
- lib/protk/bio_sptr_extensions.rb
Instance Method Summary collapse
-
#accessions ⇒ Object
SwissProt Accessions.
-
#altnames ⇒ Object
All alternate names.
-
#cd ⇒ Object
The CD Antigen name.
-
#disease ⇒ Object
Disease.
-
#domain ⇒ Object
Domain.
-
#ensembl ⇒ Object
Ensembl accession number.
-
#function ⇒ Object
Function.
-
#intact ⇒ Object
Intact accession number.
-
#ipi ⇒ Object
IPI Accession number.
-
#location ⇒ Object
Subcellular Location.
-
#nextbio ⇒ Object
NextBIO accession number.
-
#num_transmem ⇒ Object
Number of transmembrane regions.
-
#pride ⇒ Object
Pride accession number.
-
#recname ⇒ Object
The recommended name for the Protein.
-
#safely_get_drentry_for_key(key) ⇒ Object
Helper Function to create links.
-
#signalp ⇒ Object
Number of signal peptide features.
-
#similarity ⇒ Object
Similarity.
-
#subunit ⇒ Object
Subunit.
-
#tissues ⇒ Object
Tissue Specificity.
Instance Method Details
#accessions ⇒ Object
SwissProt Accessions
92 93 94 |
# File 'lib/protk/bio_sptr_extensions.rb', line 92 def accessions return "" end |
#altnames ⇒ Object
All alternate names
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/protk/bio_sptr_extensions.rb', line 68 def altnames altnames="" pname_field=self.de entries=pname_field.split(";") entries.each do |entry| m=entry.match(/\s*(.*?):\s*(.*?)=(.*)/) if ( m!=nil) if ( (m[1]=="AltName") && (m[2]!="CD_antigen") ) altnames << "#{m[3]}; " end end end if ( altnames!="") # Get ride of extraneous "; " altnames.chop!.chop! end return altnames end |
#cd ⇒ Object
The CD Antigen name
51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/protk/bio_sptr_extensions.rb', line 51 def cd pname_field=self.de entries=pname_field.split(";") entries.each do |entry| m=entry.match(/\s*(.*?):\s*(.*?)=(.*)/) if ( m!=nil) if ( (m[1]=="AltName") && (m[2]=="CD_antigen") ) return m[3] end end end return "" end |
#disease ⇒ Object
Disease
122 123 124 |
# File 'lib/protk/bio_sptr_extensions.rb', line 122 def disease return self.cc["DISEASE"].to_s end |
#domain ⇒ Object
Domain
132 133 134 |
# File 'lib/protk/bio_sptr_extensions.rb', line 132 def domain return self.cc["DOMAIN"].to_s end |
#ensembl ⇒ Object
Ensembl accession number
170 171 172 |
# File 'lib/protk/bio_sptr_extensions.rb', line 170 def ensembl return self.safely_get_drentry_for_key("Ensembl") end |
#function ⇒ Object
Function
104 105 106 |
# File 'lib/protk/bio_sptr_extensions.rb', line 104 def function return self.cc["FUNCTION"].to_s end |
#intact ⇒ Object
Intact accession number
158 159 160 |
# File 'lib/protk/bio_sptr_extensions.rb', line 158 def intact return self.safely_get_drentry_for_key("PRIDE") end |
#ipi ⇒ Object
IPI Accession number
152 153 154 |
# File 'lib/protk/bio_sptr_extensions.rb', line 152 def ipi return self.safely_get_drentry_for_key("IPI") end |
#location ⇒ Object
Subcellular Location
98 99 100 |
# File 'lib/protk/bio_sptr_extensions.rb', line 98 def location return self.cc["SUBCELLULAR LOCATION"].to_s end |
#nextbio ⇒ Object
NextBIO accession number
176 177 178 |
# File 'lib/protk/bio_sptr_extensions.rb', line 176 def nextbio return self.safely_get_drentry_for_key("NextBio") end |
#num_transmem ⇒ Object
Number of transmembrane regions
183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/protk/bio_sptr_extensions.rb', line 183 def num_transmem begin if ( self.ft["TRANSMEM"]==nil) return 0.to_s else return self.ft["TRANSMEM"].length.to_s end rescue p "Warning: Unable to parse feature table for entry #{self.accession}" end end |
#pride ⇒ Object
Pride accession number
164 165 166 |
# File 'lib/protk/bio_sptr_extensions.rb', line 164 def pride return self.safely_get_drentry_for_key("PRIDE") end |
#recname ⇒ Object
The recommended name for the Protein
35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/protk/bio_sptr_extensions.rb', line 35 def recname pname_field=self.de entries=pname_field.split(";") entries.each do |entry| m=entry.match(/\s*(.*?):\s*(.*?)=(.*)/) if ( m!=nil) if ( m[1]=="RecName") return m[3] end end end return "" end |
#safely_get_drentry_for_key(key) ⇒ Object
Helper Function to create links
142 143 144 145 146 147 148 |
# File 'lib/protk/bio_sptr_extensions.rb', line 142 def safely_get_drentry_for_key(key) if ( self.dr[key]==nil) return "" end return dr[key][0][0] end |
#signalp ⇒ Object
Number of signal peptide features
198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/protk/bio_sptr_extensions.rb', line 198 def signalp begin if ( self.ft["SIGNAL"]==nil) return 0.to_s else return self.ft["SIGNAL"].length.to_s end rescue p "Warning: Unable to parse feature table for entry #{self.accession}" end end |
#similarity ⇒ Object
Similarity
110 111 112 |
# File 'lib/protk/bio_sptr_extensions.rb', line 110 def similarity return self.cc["SIMILARITY"].to_s end |
#subunit ⇒ Object
Subunit
127 128 129 |
# File 'lib/protk/bio_sptr_extensions.rb', line 127 def subunit return self.cc["SUBUNIT"].to_s end |
#tissues ⇒ Object
Tissue Specificity
116 117 118 |
# File 'lib/protk/bio_sptr_extensions.rb', line 116 def tissues return self.cc["TISSUE SPECIFICITY"].to_s end |