From 587ec961b0c0c63bc64a8ae0f7933aa7f11b2098 Mon Sep 17 00:00:00 2001 From: Eduardo Pareja-Tobes Date: Tue, 27 Sep 2016 11:53:57 +0200 Subject: [PATCH] generate docs --- .../java/com/bio4j/model/ENZYMEGraph.java.md | 4 +- .../main/java/com/bio4j/model/GOGraph.java.md | 4 +- .../java/com/bio4j/model/LinkGraph.java.md | 154 ++++++++ .../com/bio4j/model/NCBITaxonomyGraph.java.md | 4 +- .../bio4j/model/UniProtENZYMEGraph.java.md | 4 +- .../com/bio4j/model/UniProtGOGraph.java.md | 4 +- .../java/com/bio4j/model/UniProtGraph.java.md | 136 +++++-- .../model/UniProtNCBITaxonomyGraph.java.md | 4 +- .../java/com/bio4j/model/UniRefGraph.java.md | 346 ++++++++++++++++++ 9 files changed, 625 insertions(+), 35 deletions(-) create mode 100644 docs/src/main/java/com/bio4j/model/LinkGraph.java.md create mode 100644 docs/src/main/java/com/bio4j/model/UniRefGraph.java.md diff --git a/docs/src/main/java/com/bio4j/model/ENZYMEGraph.java.md b/docs/src/main/java/com/bio4j/model/ENZYMEGraph.java.md index 82b90fa7..3bd00696 100644 --- a/docs/src/main/java/com/bio4j/model/ENZYMEGraph.java.md +++ b/docs/src/main/java/com/bio4j/model/ENZYMEGraph.java.md @@ -149,7 +149,9 @@ _TO DO_ explain this. Shuold this be a crossref? [main/java/com/bio4j/model/UniProtGraph.java]: UniProtGraph.java.md [main/java/com/bio4j/model/UniProtENZYMEGraph.java]: UniProtENZYMEGraph.java.md [main/java/com/bio4j/model/NCBITaxonomyGraph.java]: NCBITaxonomyGraph.java.md +[main/java/com/bio4j/model/UniRefGraph.java]: UniRefGraph.java.md [main/java/com/bio4j/model/ENZYMEGraph.java]: ENZYMEGraph.java.md [main/java/com/bio4j/model/UniProtNCBITaxonomyGraph.java]: UniProtNCBITaxonomyGraph.java.md [main/java/com/bio4j/model/GOGraph.java]: GOGraph.java.md -[main/java/com/bio4j/model/UniProtGOGraph.java]: UniProtGOGraph.java.md \ No newline at end of file +[main/java/com/bio4j/model/UniProtGOGraph.java]: UniProtGOGraph.java.md +[main/java/com/bio4j/model/LinkGraph.java]: LinkGraph.java.md \ No newline at end of file diff --git a/docs/src/main/java/com/bio4j/model/GOGraph.java.md b/docs/src/main/java/com/bio4j/model/GOGraph.java.md index 2b1ec679..d7a70c87 100644 --- a/docs/src/main/java/com/bio4j/model/GOGraph.java.md +++ b/docs/src/main/java/com/bio4j/model/GOGraph.java.md @@ -214,7 +214,9 @@ See [GO Ontology Relations](http://www.geneontology.org/GO.ontology.relations.sh [main/java/com/bio4j/model/UniProtGraph.java]: UniProtGraph.java.md [main/java/com/bio4j/model/UniProtENZYMEGraph.java]: UniProtENZYMEGraph.java.md [main/java/com/bio4j/model/NCBITaxonomyGraph.java]: NCBITaxonomyGraph.java.md +[main/java/com/bio4j/model/UniRefGraph.java]: UniRefGraph.java.md [main/java/com/bio4j/model/ENZYMEGraph.java]: ENZYMEGraph.java.md [main/java/com/bio4j/model/UniProtNCBITaxonomyGraph.java]: UniProtNCBITaxonomyGraph.java.md [main/java/com/bio4j/model/GOGraph.java]: GOGraph.java.md -[main/java/com/bio4j/model/UniProtGOGraph.java]: UniProtGOGraph.java.md \ No newline at end of file +[main/java/com/bio4j/model/UniProtGOGraph.java]: UniProtGOGraph.java.md +[main/java/com/bio4j/model/LinkGraph.java]: LinkGraph.java.md \ No newline at end of file diff --git a/docs/src/main/java/com/bio4j/model/LinkGraph.java.md b/docs/src/main/java/com/bio4j/model/LinkGraph.java.md new file mode 100644 index 00000000..b3251c5d --- /dev/null +++ b/docs/src/main/java/com/bio4j/model/LinkGraph.java.md @@ -0,0 +1,154 @@ + +```java +package com.bio4j.model; + +import com.bio4j.angulillos.*; +import java.util.Set; + +// TODO move to angulillos +public abstract class LinkGraph< + G extends LinkGraph, + RV,RE +> +extends TypedGraph { + + protected LinkGraph(UntypedGraph raw) { super(raw); } + + // TODO these two classes are duplicated here because of them being private in angulillos + private abstract class FunnyElement< + F extends FunnyElement, + FT extends FunnyElementType, + RF + > implements TypedElement { + + private final RF raw; + private final FT type; + + @Override public final RF raw() { return this.raw; } + @Override public final FT type() { return this.type; } + + // NOTE: we cannot do the same to `self`, because `super()` constructor cannot refer to `this` + protected FunnyElement(RF raw, FT type) { + this.raw = raw; + this.type = type; + } + } + + private abstract class FunnyElementType< + F extends FunnyElement, + FT extends FunnyElementType, + RF + > implements TypedElement.Type { + + @Override public final G graph() { return LinkGraph.this.self(); } + + public abstract F fromRaw(RF raw); + + protected abstract FT self(); +``` + +This set stores all properties that are defined on this element type + +```java + private final Set properties = new java.util.HashSet<>(); + public final Set properties() { return this.properties; } + + + // public abstract class Property + // implements com.bio4j.angulillos.Property { + // // NOTE: this initializer block will be inherited and will add each vertex type to the set + // { + // if ( + // ElementType.this.properties.removeIf( (AnyProperty p) -> + // p._label().equals( this._label() ) + // ) + // ) { + // throw new IllegalArgumentException( + // "Element type [" + + // ElementType.this._label() + + // "] contains duplicate property: " + + // this._label() + // ); + // } + // ElementType.this.properties.add(this); + // } + // + // private final Class valueClass; + // + // @Override public final FT elementType() { return self(); } + // @Override public final Class valueClass() { return this.valueClass; } + // + // protected Property(Class valueClass) { + // this.valueClass = valueClass; + // } + // } + } + + + public abstract class LinkEdge< + SG extends TypedGraph, + S extends TypedGraph.Vertex, + E extends LinkEdge, + TG extends TypedGraph, + T extends TypedGraph.Vertex + > extends FunnyElement,RE> + implements TypedEdge< + S, TypedGraph.VertexType, + E, LinkEdgeType, + T, TypedGraph.VertexType, + G,RV,RE + > + { + protected LinkEdge(RE raw, LinkEdgeType type) { super(raw, type); } + } + + // TODO initializer block missing + public abstract class LinkEdgeType< + SG extends TypedGraph, + S extends TypedGraph.Vertex, + E extends LinkEdge, + TG extends TypedGraph, + T extends TypedGraph.Vertex + > extends FunnyElementType, RE> + implements TypedEdge.Type< + S, TypedGraph.VertexType, + E, LinkEdgeType, + T, TypedGraph.VertexType, + G,RV,RE + > + { + + protected LinkEdgeType self() { return this; } + + private final TypedGraph.VertexType sourceType; + private final TypedGraph.VertexType targetType; + + @Override public final TypedGraph.VertexType sourceType() { return this.sourceType; } + @Override public final TypedGraph.VertexType targetType() { return this.targetType; } + + protected LinkEdgeType(TypedGraph.VertexType sourceType, TypedGraph.VertexType targetType) { + + this.sourceType = sourceType; + this.targetType = targetType; + + // private access in angulillos + // sourceType.outEdges.add( self() ); + // targetType.inEdges.add( self() ); + } + } +} + +``` + + + + +[main/java/com/bio4j/model/UniProtGraph.java]: UniProtGraph.java.md +[main/java/com/bio4j/model/UniProtENZYMEGraph.java]: UniProtENZYMEGraph.java.md +[main/java/com/bio4j/model/NCBITaxonomyGraph.java]: NCBITaxonomyGraph.java.md +[main/java/com/bio4j/model/UniRefGraph.java]: UniRefGraph.java.md +[main/java/com/bio4j/model/ENZYMEGraph.java]: ENZYMEGraph.java.md +[main/java/com/bio4j/model/UniProtNCBITaxonomyGraph.java]: UniProtNCBITaxonomyGraph.java.md +[main/java/com/bio4j/model/GOGraph.java]: GOGraph.java.md +[main/java/com/bio4j/model/UniProtGOGraph.java]: UniProtGOGraph.java.md +[main/java/com/bio4j/model/LinkGraph.java]: LinkGraph.java.md \ No newline at end of file diff --git a/docs/src/main/java/com/bio4j/model/NCBITaxonomyGraph.java.md b/docs/src/main/java/com/bio4j/model/NCBITaxonomyGraph.java.md index 369342bc..baed93b3 100644 --- a/docs/src/main/java/com/bio4j/model/NCBITaxonomyGraph.java.md +++ b/docs/src/main/java/com/bio4j/model/NCBITaxonomyGraph.java.md @@ -140,7 +140,9 @@ Every taxon *but* the root has *exactly one* parent. [main/java/com/bio4j/model/UniProtGraph.java]: UniProtGraph.java.md [main/java/com/bio4j/model/UniProtENZYMEGraph.java]: UniProtENZYMEGraph.java.md [main/java/com/bio4j/model/NCBITaxonomyGraph.java]: NCBITaxonomyGraph.java.md +[main/java/com/bio4j/model/UniRefGraph.java]: UniRefGraph.java.md [main/java/com/bio4j/model/ENZYMEGraph.java]: ENZYMEGraph.java.md [main/java/com/bio4j/model/UniProtNCBITaxonomyGraph.java]: UniProtNCBITaxonomyGraph.java.md [main/java/com/bio4j/model/GOGraph.java]: GOGraph.java.md -[main/java/com/bio4j/model/UniProtGOGraph.java]: UniProtGOGraph.java.md \ No newline at end of file +[main/java/com/bio4j/model/UniProtGOGraph.java]: UniProtGOGraph.java.md +[main/java/com/bio4j/model/LinkGraph.java]: LinkGraph.java.md \ No newline at end of file diff --git a/docs/src/main/java/com/bio4j/model/UniProtENZYMEGraph.java.md b/docs/src/main/java/com/bio4j/model/UniProtENZYMEGraph.java.md index 34e0bfdb..2cec3f5f 100644 --- a/docs/src/main/java/com/bio4j/model/UniProtENZYMEGraph.java.md +++ b/docs/src/main/java/com/bio4j/model/UniProtENZYMEGraph.java.md @@ -35,7 +35,9 @@ public final class UniProtENZYMEGraph extends TypedGraph extends TypedGraph,V, [main/java/com/bio4j/model/UniProtGraph.java]: UniProtGraph.java.md [main/java/com/bio4j/model/UniProtENZYMEGraph.java]: UniProtENZYMEGraph.java.md [main/java/com/bio4j/model/NCBITaxonomyGraph.java]: NCBITaxonomyGraph.java.md +[main/java/com/bio4j/model/UniRefGraph.java]: UniRefGraph.java.md [main/java/com/bio4j/model/ENZYMEGraph.java]: ENZYMEGraph.java.md [main/java/com/bio4j/model/UniProtNCBITaxonomyGraph.java]: UniProtNCBITaxonomyGraph.java.md [main/java/com/bio4j/model/GOGraph.java]: GOGraph.java.md -[main/java/com/bio4j/model/UniProtGOGraph.java]: UniProtGOGraph.java.md \ No newline at end of file +[main/java/com/bio4j/model/UniProtGOGraph.java]: UniProtGOGraph.java.md +[main/java/com/bio4j/model/LinkGraph.java]: LinkGraph.java.md \ No newline at end of file diff --git a/docs/src/main/java/com/bio4j/model/UniProtGraph.java.md b/docs/src/main/java/com/bio4j/model/UniProtGraph.java.md index af8495f9..74a77cf9 100644 --- a/docs/src/main/java/com/bio4j/model/UniProtGraph.java.md +++ b/docs/src/main/java/com/bio4j/model/UniProtGraph.java.md @@ -32,32 +32,36 @@ The first thing to point out as clearly as possible is: `Protein`s **do not** co ``` -#### Accession +#### ID -Accessions are the primary IDs for UniProt proteins. See http://www.uniprot.org/help/accession_numbers. Note that this is *never* the *entry* accession, but the isoform id. Those isoforms which are the canonical sequence of an entry have `isCanonical` set to `true`. +Primary IDs correspond to the UniProt isoform ID. Note that this is *never* the *entry* accession; for that we have the `accession` property. ```java - public final Accession accession = new Accession(); - public final class Accession extends Property implements FromAtMostOne, ToOne { - private Accession() { super(String.class); } + public final ID id = new ID(); + public final class ID extends Property implements FromAtMostOne, ToOne { + private ID() { super(String.class); } public final Index index = new Index(); - public final class Index extends UniqueIndex { - private Index() { super(accession); } + public final class Index extends UniqueIndex { + private Index() { super(ID.this); } } } ``` -#### Is canonical +#### Accession -Whether this protein is the canonical protein of an entry. +Canonical isoforms (proteins) corresponding to an entry have an accession ID, which is the standard protein ID used almost everywhere. The presence of this property is equivalent to this protein having an UniProt entry. See http://www.uniprot.org/help/accession_numbers ```java - public final IsCanonical isCanonical = new IsCanonical(); - public final class IsCanonical extends Property implements FromAtLeastOne, ToOne { - private IsCanonical() { super(Boolean.class); } + public final Accession accession = new Accession(); + public final class Accession extends Property implements FromAtMostOne, ToAtMostOne { + private Accession() { super(String.class); } + public final Index index = new Index(); + public final class Index extends UniqueIndex { + private Index() { super(Accession.this); } + } } ``` @@ -114,6 +118,19 @@ Normalized to all-caps. There are isoforms without sequence. ``` +#### Sequence length + +The length of the sequence stored as a property. + + +```java + public final SequenceLength sequenceLength = new SequenceLength(); + public final class SequenceLength extends Property implements FromAny { + private SequenceLength() { super(Integer.class); } + } +``` + + #### Sequence Mass I honestly don't know what's this. @@ -171,10 +188,41 @@ A name for the (a) gene codifying the protein. Corresponds, as much as possible, See [Uniprot help - gene name](http://www.uniprot.org/help/gene_name). -So, `GeneProducts` will give you all the proteins annotated with that gene name. We consider equivalent all synonyms, and drop ordered locus and ORF names. +We take the *first* primary name, or the the *first* ORF name if there are no primary names. + +The `GeneProducts` edge will give you all the proteins with an entry annotated with that gene name. This edge also contains gene location information, as a property. This is not a property of gene names due to the issues explained above. ```java + public final class GeneName extends Vertex { + + private GeneName(V vertex) { super(vertex, geneName); } + @Override public final GeneName self() { return this; } + } + + public final GeneNameType geneName = new GeneNameType(); + public final class GeneNameType extends VertexType { + + @Override public final GeneName fromRaw(V vertex) { return new GeneName(vertex); } +``` + + +#### Name + +These vertices correspond to the values of their name property. It is indexed. + + +```java + public final Name name = new Name(); + public final class Name extends Property implements FromAtMostOne, ToOne { + private Name() { super(String.class); } + public final Index index = new Index(); + public final class Index extends UniqueIndex { + private Index() { super(Name.this); } + } + } + } + public final class GeneProducts extends Edge { private GeneProducts(E edge) { super(edge, geneProducts); } @@ -186,23 +234,16 @@ So, `GeneProducts` will give you all the proteins annotated with that gene name. private GeneProductsType() { super(geneName, protein); } @Override public final GeneProducts fromRaw(E edge) { return new GeneProducts(edge); } - } - - public final class GeneName extends Vertex { - private GeneName(V vertex) { super(vertex, geneName); } - @Override public final GeneName self() { return this; } - } - - public final GeneNameType geneName = new GeneNameType(); - public final class GeneNameType extends VertexType { - - @Override public final GeneName fromRaw(V vertex) { return new GeneName(vertex); } + public final Location location = new Location(); + public final class Location extends Property implements FromAny, ToOne { + private Location() { super(GeneLocations.class); } + } } ``` -See ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/complete/docs/userman.htm#OC_line +See ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/complete/docs/userman.htm#OG_line ```java @@ -263,6 +304,19 @@ There is a vertex for each annotation, with a property which determines its type public final class FeatureType extends Property implements FromAtLeastOne, ToOne { private FeatureType() { super(FeatureTypes.class); } } +``` + + +#### Description + +Descriptions are not always present, but they do contain key information sometimes: the isoform corresponding to a sequence variant, or the allele which has it, for example. + + +```java + public final Description description = new Description(); + public final class Description extends Property implements FromAny { + private Description() { super(String.class); } + } } public final class Annotations extends Edge { @@ -401,6 +455,24 @@ This property contains the text of this comment. ``` +#### Comments edge + +Connects a protein with its commnents. + + +```java + public final class Comments extends Edge { + private Comments(E edge) { super(edge, comments); } + @Override public final Comments self() { return this; } + } + public final CommentsType comments = new CommentsType(); + public final class CommentsType extends EdgeType implements FromAtLeastOne, ToAny { + private CommentsType() { super(protein, comment); } + @Override public final Comments fromRaw(E edge) { return new Comments(edge); } + } +``` + + This enum only contains those topics which do *not* give rise to specific vertex types. @@ -463,9 +535,13 @@ Note that from http://www.uniprot.org/keywords/ you can download a `tsv` file wi @Override public final Keyword fromRaw(V vertex) { return new Keyword(vertex); } - public final Name name = new Name(); - public final class Name extends Property implements FromAny, ToOne { - private Name() { super(String.class); } + public final ID id = new ID(); + public final class ID extends Property implements FromAtMostOne, ToOne { + private ID() { super(String.class); } + public final Index index = new Index(); + public final class Index extends UniqueIndex { + private Index() { super(ID.this); } + } } public final Definition definition = new Definition(); @@ -528,7 +604,9 @@ An edge etc etc. [main/java/com/bio4j/model/UniProtGraph.java]: UniProtGraph.java.md [main/java/com/bio4j/model/UniProtENZYMEGraph.java]: UniProtENZYMEGraph.java.md [main/java/com/bio4j/model/NCBITaxonomyGraph.java]: NCBITaxonomyGraph.java.md +[main/java/com/bio4j/model/UniRefGraph.java]: UniRefGraph.java.md [main/java/com/bio4j/model/ENZYMEGraph.java]: ENZYMEGraph.java.md [main/java/com/bio4j/model/UniProtNCBITaxonomyGraph.java]: UniProtNCBITaxonomyGraph.java.md [main/java/com/bio4j/model/GOGraph.java]: GOGraph.java.md -[main/java/com/bio4j/model/UniProtGOGraph.java]: UniProtGOGraph.java.md \ No newline at end of file +[main/java/com/bio4j/model/UniProtGOGraph.java]: UniProtGOGraph.java.md +[main/java/com/bio4j/model/LinkGraph.java]: LinkGraph.java.md \ No newline at end of file diff --git a/docs/src/main/java/com/bio4j/model/UniProtNCBITaxonomyGraph.java.md b/docs/src/main/java/com/bio4j/model/UniProtNCBITaxonomyGraph.java.md index 3d525a0d..edea2cdc 100644 --- a/docs/src/main/java/com/bio4j/model/UniProtNCBITaxonomyGraph.java.md +++ b/docs/src/main/java/com/bio4j/model/UniProtNCBITaxonomyGraph.java.md @@ -38,7 +38,9 @@ public final class UniProtNCBITaxonomyGraph extends TypedGraph Using a full update procedure, the clusters are computed ab initio at the end of year and are updated for the remaining year using an incremental procedure that favors clustering of new sequences under existing clusters. The representatives of clusters are selected based on the level of curation (reviewed versus unreviewed), protein name (e.g. names do not contain hypothetical or putative preferred), source organism (e.g. proteins from model organisms preferred) and length of protein. The UniRef identifiers are derived from the cluster ‘representatives’ identifiers and are preserved for approximately 98% of the clusters between releases. + +## UniRef and UniProt + +In Bio4j we only include clusters for which the representative is a UniProt protein. + +## References + +- [UniRef100 FTP Readme](ftp://ftp.uniprot.org/pub/databases/uniprot/uniref/uniref100/README) +- [UniRef90 FTP Readme](ftp://ftp.uniprot.org/pub/databases/uniprot/uniref/uniref90/README) +- [UniRef50 FTP Readme](ftp://ftp.uniprot.org/pub/databases/uniprot/uniref/uniref50/README) +- [UniRef clusters: a comprehensive and scalable alternative for improving sequence similarity searches](https://bioinformatics.oxfordjournals.org/content/31/6/926.full) +- [UniRef help](http://www.uniprot.org/help/uniref) + + +```java +package com.bio4j.model; + +import com.bio4j.angulillos.*; +import com.bio4j.angulillos.Arity.*; + +public final class UniRefGraph extends LinkGraph,V,E> { + + public UniRefGraph(UniProtGraph uniProtGraph) { + + super(uniProtGraph.raw()); + this.uniProtGraph = uniProtGraph; + } + + public final UniProtGraph uniProtGraph; + + @Override public final UniRefGraph self() { return this; } + + public final class UniRef100Cluster extends Vertex { + + private UniRef100Cluster(V vertex) { super(vertex, uniRef100Cluster); } + @Override public final UniRef100Cluster self() { return this; } + } + + public final UniRef100ClusterType uniRef100Cluster = new UniRef100ClusterType(); + public final class UniRef100ClusterType extends VertexType { + + @Override public final UniRef100Cluster fromRaw(V vertex) { return new UniRef100Cluster(vertex); } + + public final ID id = new ID(); + public final class ID extends Property implements FromAtMostOne, ToOne { + private ID() { super(String.class); } + public final Index index = new Index(); + public final class Index extends UniqueIndex { + private Index() { super(ID.this); } + } + } + } + + public final class UniRef90Cluster extends Vertex { + + private UniRef90Cluster(V vertex) { super(vertex, uniRef90Cluster); } + @Override public final UniRef90Cluster self() { return this; } + } + + public final UniRef90ClusterType uniRef90Cluster = new UniRef90ClusterType(); + public final class UniRef90ClusterType extends VertexType { + + @Override public final UniRef90Cluster fromRaw(V vertex) { return new UniRef90Cluster(vertex); } + + public final ID id = new ID(); + public final class ID extends Property implements FromAtMostOne, ToOne { + private ID() { super(String.class); } + public final Index index = new Index(); + public final class Index extends UniqueIndex { + private Index() { super(ID.this); } + } + } + } + + public final class UniRef50Cluster extends Vertex { + + private UniRef50Cluster(V vertex) { super(vertex, uniRef50Cluster); } + @Override public final UniRef50Cluster self() { return this; } + } + + public final UniRef50ClusterType uniRef50Cluster = new UniRef50ClusterType(); + public final class UniRef50ClusterType extends VertexType { + + @Override public final UniRef50Cluster fromRaw(V vertex) { return new UniRef50Cluster(vertex); } + + public final ID id = new ID(); + public final class ID extends Property implements FromAtMostOne, ToOne { + private ID() { super(String.class); } + public final Index index = new Index(); + public final class Index extends UniqueIndex { + private Index() { super(ID.this); } + } + } + } +``` + + +## Cluster members + +These edges connect clusters with their members. A cluster has at at least one member, and every protein is member of exactly one cluster. + + +```java + public final class UniRef100Member extends LinkEdge< + UniRefGraph, UniRef100Cluster, + UniRef100Member, + UniProtGraph, UniProtGraph.Protein + > + { + private UniRef100Member(E edge) { super(edge, uniRef100Member); } + @Override public final UniRef100Member self() { return this; } + } + + public final UniRef100MemberType uniRef100Member = new UniRef100MemberType(); + public final class UniRef100MemberType extends LinkEdgeType< + UniRefGraph, UniRef100Cluster, + UniRef100Member, + UniProtGraph, UniProtGraph.Protein + > + implements FromOne, ToAtLeastOne { + + private UniRef100MemberType() { super(uniRef100Cluster, uniProtGraph.protein); } + @Override public final UniRef100Member fromRaw(E edge) { return new UniRef100Member(edge); } + } + + public final class UniRef90Member extends LinkEdge< + UniRefGraph, UniRef90Cluster, + UniRef90Member, + UniProtGraph, UniProtGraph.Protein + > + { + private UniRef90Member(E edge) { super(edge, uniRef90Member); } + @Override public final UniRef90Member self() { return this; } + } + + public final UniRef90MemberType uniRef90Member = new UniRef90MemberType(); + public final class UniRef90MemberType extends LinkEdgeType< + UniRefGraph, UniRef90Cluster, + UniRef90Member, + UniProtGraph, UniProtGraph.Protein + > + implements FromOne, ToAtLeastOne { + + private UniRef90MemberType() { super(uniRef90Cluster, uniProtGraph.protein); } + @Override public final UniRef90Member fromRaw(E edge) { return new UniRef90Member(edge); } + } + + public final class UniRef50Member extends LinkEdge< + UniRefGraph, UniRef50Cluster, + UniRef50Member, + UniProtGraph, UniProtGraph.Protein + > + { + private UniRef50Member(E edge) { super(edge, uniRef50Member); } + @Override public final UniRef50Member self() { return this; } + } + + public final UniRef50MemberType uniRef50Member = new UniRef50MemberType(); + public final class UniRef50MemberType extends LinkEdgeType< + UniRefGraph, UniRef50Cluster, + UniRef50Member, + UniProtGraph, UniProtGraph.Protein + > + implements FromOne, ToAtLeastOne { + + private UniRef50MemberType() { super(uniRef50Cluster, uniProtGraph.protein); } + @Override public final UniRef50Member fromRaw(E edge) { return new UniRef50Member(edge); } + } +``` + + +## Cluster seeds + +These edges connect clusters with the protein whose sequence served as their seed. Note that this is *not* in general the same as the cluster representative; what is true though is that seeds for UniRef90 and UniRef50 are always representatives of the immediate more specific partition (UniRef100 and UniRef90 respectively). + + +```java + public final class UniRef100Seed extends LinkEdge< + UniRefGraph, UniRef100Cluster, + UniRef100Seed, + UniProtGraph, UniProtGraph.Protein + > + { + private UniRef100Seed(E edge) { super(edge, uniRef100Seed); } + @Override public final UniRef100Seed self() { return this; } + } + + public final UniRef100SeedType uniRef100Seed = new UniRef100SeedType(); + public final class UniRef100SeedType extends LinkEdgeType< + UniRefGraph, UniRef100Cluster, + UniRef100Seed, + UniProtGraph, UniProtGraph.Protein + > + implements FromAny, ToOne { + + private UniRef100SeedType() { super(uniRef100Cluster, uniProtGraph.protein); } + @Override public final UniRef100Seed fromRaw(E edge) { return new UniRef100Seed(edge); } + } + + public final class UniRef90Seed extends LinkEdge< + UniRefGraph, UniRef90Cluster, + UniRef90Seed, + UniProtGraph, UniProtGraph.Protein + > + { + private UniRef90Seed(E edge) { super(edge, uniRef90Seed); } + @Override public final UniRef90Seed self() { return this; } + } + + public final UniRef90SeedType uniRef90Seed = new UniRef90SeedType(); + public final class UniRef90SeedType extends LinkEdgeType< + UniRefGraph, UniRef90Cluster, + UniRef90Seed, + UniProtGraph, UniProtGraph.Protein + > + implements FromAny, ToOne { + + private UniRef90SeedType() { super(uniRef90Cluster, uniProtGraph.protein); } + @Override public final UniRef90Seed fromRaw(E edge) { return new UniRef90Seed(edge); } + } + + public final class UniRef50Seed extends LinkEdge< + UniRefGraph, UniRef50Cluster, + UniRef50Seed, + UniProtGraph, UniProtGraph.Protein + > + { + private UniRef50Seed(E edge) { super(edge, uniRef50Seed); } + @Override public final UniRef50Seed self() { return this; } + } + + public final UniRef50SeedType uniRef50Seed = new UniRef50SeedType(); + public final class UniRef50SeedType extends LinkEdgeType< + UniRefGraph, UniRef50Cluster, + UniRef50Seed, + UniProtGraph, UniProtGraph.Protein + > + implements FromAny, ToOne { + + private UniRef50SeedType() { super(uniRef50Cluster, uniProtGraph.protein); } + @Override public final UniRef50Seed fromRaw(E edge) { return new UniRef50Seed(edge); } + } +``` + + +## Cluster representatives + +These edges connect each cluster with their representative sequence. Again, note that in general this is *not* the same as the seed used to generate that cluster. + + +```java + public final class UniRef100Representative extends LinkEdge< + UniRefGraph, UniRef100Cluster, + UniRef100Representative, + UniProtGraph, UniProtGraph.Protein + > + { + private UniRef100Representative(E edge) { super(edge, uniRef100Representative); } + @Override public final UniRef100Representative self() { return this; } + } + + public final UniRef100RepresentativeType uniRef100Representative = new UniRef100RepresentativeType(); + public final class UniRef100RepresentativeType extends LinkEdgeType< + UniRefGraph, UniRef100Cluster, + UniRef100Representative, + UniProtGraph, UniProtGraph.Protein + > + implements FromAny, ToOne { + + private UniRef100RepresentativeType() { super(uniRef100Cluster, uniProtGraph.protein); } + @Override public final UniRef100Representative fromRaw(E edge) { return new UniRef100Representative(edge); } + } + + public final class UniRef90Representative extends LinkEdge< + UniRefGraph, UniRef90Cluster, + UniRef90Representative, + UniProtGraph, UniProtGraph.Protein + > + { + private UniRef90Representative(E edge) { super(edge, uniRef90Representative); } + @Override public final UniRef90Representative self() { return this; } + } + + public final UniRef90RepresentativeType uniRef90Representative = new UniRef90RepresentativeType(); + public final class UniRef90RepresentativeType extends LinkEdgeType< + UniRefGraph, UniRef90Cluster, + UniRef90Representative, + UniProtGraph, UniProtGraph.Protein + > + implements FromAny, ToOne { + + private UniRef90RepresentativeType() { super(uniRef90Cluster, uniProtGraph.protein); } + @Override public final UniRef90Representative fromRaw(E edge) { return new UniRef90Representative(edge); } + } + + public final class UniRef50Representative extends LinkEdge< + UniRefGraph, UniRef50Cluster, + UniRef50Representative, + UniProtGraph, UniProtGraph.Protein + > + { + private UniRef50Representative(E edge) { super(edge, uniRef50Representative); } + @Override public final UniRef50Representative self() { return this; } + } + + public final UniRef50RepresentativeType uniRef50Representative = new UniRef50RepresentativeType(); + public final class UniRef50RepresentativeType extends LinkEdgeType< + UniRefGraph, UniRef50Cluster, + UniRef50Representative, + UniProtGraph, UniProtGraph.Protein + > + implements FromAny, ToOne { + + private UniRef50RepresentativeType() { super(uniRef50Cluster, uniProtGraph.protein); } + @Override public final UniRef50Representative fromRaw(E edge) { return new UniRef50Representative(edge); } + } +} + +``` + + + + +[main/java/com/bio4j/model/UniProtGraph.java]: UniProtGraph.java.md +[main/java/com/bio4j/model/UniProtENZYMEGraph.java]: UniProtENZYMEGraph.java.md +[main/java/com/bio4j/model/NCBITaxonomyGraph.java]: NCBITaxonomyGraph.java.md +[main/java/com/bio4j/model/UniRefGraph.java]: UniRefGraph.java.md +[main/java/com/bio4j/model/ENZYMEGraph.java]: ENZYMEGraph.java.md +[main/java/com/bio4j/model/UniProtNCBITaxonomyGraph.java]: UniProtNCBITaxonomyGraph.java.md +[main/java/com/bio4j/model/GOGraph.java]: GOGraph.java.md +[main/java/com/bio4j/model/UniProtGOGraph.java]: UniProtGOGraph.java.md +[main/java/com/bio4j/model/LinkGraph.java]: LinkGraph.java.md \ No newline at end of file