Skip to content

Commit c39a471

Browse files
author
Andreas Prlic
committed
details
1 parent 9884462 commit c39a471

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

structure/externaldb.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,17 @@ The structure for a known SCOP domain can be fetched via its 7-letter domain ID
2727

2828
The SCOP classification can be accessed through the [```ScopDatabase```](http://www.biojava.org/docs/api/org/biojava/bio/structure/scop/ScopDatabase.html) class.
2929

30+
```java
3031
ScopDatabase scop = ScopFactory.getSCOP();
32+
```
3133

3234
### Inspecting SCOP domains
3335

3436
A list of domains can be retrieved for a given protein.
3537

38+
```java
3639
List<ScopDomain> domains = scop.getDomainsForPDB("4HHB");
40+
```
3741

3842
You can get lots of useful information from the [```ScopDomain```](http://www.biojava.org/docs/api/org/biojava/bio/structure/scop/ScopDomain.html) object.
3943

@@ -46,16 +50,20 @@ You can get lots of useful information from the [```ScopDomain```](http://www.bi
4650

4751
The full hierarchy is available as a tree of [```ScopNode```](http://www.biojava.org/docs/api/org/biojava/bio/structure/scop/ScopNode.html)s, which can be easily traversed using their ```getParentSunid()``` and ```getChildren()``` methods.
4852

53+
```java
4954
ScopNode node = scop.getScopNode(sunId);
5055
while (node != null){
5156
System.out.println(scop.getScopDescriptionBySunid(node.getSunid()));
5257
node = scop.getScopNode(node.getParentSunid());
5358
}
59+
```
5460

5561
ScopDatabase also provides access to all nodes at a particular level.
5662

63+
```java
5764
List<ScopDescription> superfams = scop.getByCategory(ScopCategory.Superfamily);
5865
System.out.println("Total nr. of superfamilies:" + superfams.size());
66+
```
5967

6068
### Types of ScopDatabase
6169

@@ -66,15 +74,18 @@ Several types of ```ScopDatabase``` are available. These can be instantiated man
6674

6775
Several internal BioJava classes use ```ScopFactory.getSCOP()``` when they encounter references to SCOP domains, so it is always a good idea to notify the ```ScopFactory``` when using a custom ```ScopDatabase``` instance.
6876

77+
```java
6978
ScopDatabase scop = new ScopInstallation();
7079
ScopFactory.setScopDatabase(scop);
71-
80+
```
7281
Several versions of SCOP are available.
7382

83+
```java
7484
// Use Steven Brenner's updated version of SCOP
7585
scop = ScopFactory.getSCOP(ScopFactory.VERSION_1_75C);
7686
// Use an old version globally, perhaps for an older benchmark
7787
ScopFactory.setScopDatabase(ScopFactory.VERSION_1_69);
88+
```
7889

7990
CATH
8091
----

0 commit comments

Comments
 (0)