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.
- #ensembl_link ⇒ Object
- #feature_dump ⇒ Object
-
#function ⇒ Object
Function.
- #go_entries ⇒ Object
- #go_terms ⇒ Object
-
#intact ⇒ Object
Intact accession number.
- #intact_link ⇒ Object
-
#ipi ⇒ Object
IPI Accession number.
-
#location ⇒ Object
Subcellular Location.
- #ncbi_taxon_id ⇒ Object
-
#nextbio ⇒ Object
NextBIO accession number.
- #nextbio_link ⇒ Object
-
#num_transmem ⇒ Object
Number of transmembrane regions.
-
#pride ⇒ Object
Pride accession number.
- #pride_link ⇒ Object
-
#recname ⇒ Object
The recommended name for the Protein.
- #ref_dump ⇒ Object
-
#safely_get_drentry_for_key(key) ⇒ Object
Helper Function to create links.
- #seq_dump ⇒ Object
-
#signalp ⇒ Object
Number of signal peptide features.
-
#similarity ⇒ Object
Similarity.
- #species_dump ⇒ Object
-
#subunit ⇒ Object
Subunit.
-
#tissues ⇒ Object
Tissue Specificity.
- #uniprot_link ⇒ Object
Instance Method Details
#accessions ⇒ Object
SwissProt Accessions
92 93 94 |
# File 'lib/protk/bio_sptr_extensions.rb', line 92 def accessions return self.ac 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
185 186 187 |
# File 'lib/protk/bio_sptr_extensions.rb', line 185 def ensembl return self.safely_get_drentry_for_key("Ensembl") end |
#ensembl_link ⇒ Object
211 212 213 |
# File 'lib/protk/bio_sptr_extensions.rb', line 211 def ensembl_link return "http://www.ensembl.org/Homo_sapiens/Transcript/Summary?db=core;t=#{self.ensembl}" end |
#feature_dump ⇒ Object
260 261 262 |
# File 'lib/protk/bio_sptr_extensions.rb', line 260 def feature_dump return self.ft.to_s 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 |
#go_entries ⇒ Object
166 167 168 |
# File 'lib/protk/bio_sptr_extensions.rb', line 166 def go_entries return self.dr["GO"] end |
#go_terms ⇒ Object
157 158 159 160 161 162 163 164 |
# File 'lib/protk/bio_sptr_extensions.rb', line 157 def go_terms terms = self.dr["GO"] if terms return terms.collect { |e| e[0] } else return nil end end |
#intact ⇒ Object
Intact accession number
173 174 175 |
# File 'lib/protk/bio_sptr_extensions.rb', line 173 def intact return self.safely_get_drentry_for_key("PRIDE") end |
#intact_link ⇒ Object
203 204 205 |
# File 'lib/protk/bio_sptr_extensions.rb', line 203 def intact_link return "http://www.ebi.ac.uk/intact/pages/interactions/interactions.xhtml?query=#{self.intact}*" end |
#ipi ⇒ Object
IPI Accession number
153 154 155 |
# File 'lib/protk/bio_sptr_extensions.rb', line 153 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 |
#ncbi_taxon_id ⇒ Object
252 253 254 |
# File 'lib/protk/bio_sptr_extensions.rb', line 252 def ncbi_taxon_id return self.ox["NCBI_TaxID"] end |
#nextbio ⇒ Object
NextBIO accession number
191 192 193 |
# File 'lib/protk/bio_sptr_extensions.rb', line 191 def nextbio return self.safely_get_drentry_for_key("NextBio") end |
#nextbio_link ⇒ Object
199 200 201 |
# File 'lib/protk/bio_sptr_extensions.rb', line 199 def nextbio_link return "http://www.nextbio.com/b/home/home.nb?id=#{self.nextbio}&type=feature" end |
#num_transmem ⇒ Object
Number of transmembrane regions
217 218 219 220 221 222 223 224 225 226 227 |
# File 'lib/protk/bio_sptr_extensions.rb', line 217 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
179 180 181 |
# File 'lib/protk/bio_sptr_extensions.rb', line 179 def pride return self.safely_get_drentry_for_key("PRIDE") end |
#pride_link ⇒ Object
207 208 209 |
# File 'lib/protk/bio_sptr_extensions.rb', line 207 def pride_link return "http://www.ebi.ac.uk/pride/searchSummary.do?queryTypeSelected=identification%20accession%20number&identificationAccessionNumber=#{self.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 |
#ref_dump ⇒ Object
244 245 246 |
# File 'lib/protk/bio_sptr_extensions.rb', line 244 def ref_dump return self.ref.to_s end |
#safely_get_drentry_for_key(key) ⇒ Object
Helper Function to create links
143 144 145 146 147 148 149 |
# File 'lib/protk/bio_sptr_extensions.rb', line 143 def safely_get_drentry_for_key(key) if ( self.dr[key]==nil) return "" end return dr[key][0][0] end |
#seq_dump ⇒ Object
248 249 250 |
# File 'lib/protk/bio_sptr_extensions.rb', line 248 def seq_dump return self.seq.to_s end |
#signalp ⇒ Object
Number of signal peptide features
232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/protk/bio_sptr_extensions.rb', line 232 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 |
#species_dump ⇒ Object
256 257 258 |
# File 'lib/protk/bio_sptr_extensions.rb', line 256 def species_dump return self.os.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 |
#uniprot_link ⇒ Object
195 196 197 |
# File 'lib/protk/bio_sptr_extensions.rb', line 195 def uniprot_link return "http://www.uniprot.org/uniprot/#{self.accession}.html" end |