Skip to content
Snippets Groups Projects
Commit 115be8f3 authored by tjc's avatar tjc
Browse files

add getPartOfFeatures()

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@13166 ee4ac58c-ac51-4696-9907-e4b3aa274f04
parent e02c55a3
No related branches found
No related tags found
No related merge requests found
......@@ -2278,6 +2278,31 @@ public class DatabaseDocument extends Document
return (Feature) dao.getFeatureByUniqueName(uniqueName, null);
}
/**
* Given a feature uniqueName return the features that are part_of
* that gene
* @param geneName
* @return
*/
public Vector getPartOfFeatures(final String uniqueName)
{
Feature feature = getFeatureByUniquename(uniqueName);
if(feature == null)
return null;
Collection frs = feature.getFeatureRelationshipsForObjectId();
Iterator it = frs.iterator();
Vector partOfFeatures = new Vector(frs.size());
while(it.hasNext())
{
FeatureRelationship fr = (FeatureRelationship)it.next();
if(fr.getCvTerm().getName().equalsIgnoreCase("part_of"))
partOfFeatures.add(fr.getFeatureBySubjectId());
}
return partOfFeatures;
}
/**
* Given a gene unique name return the poplypeptide chado features that belong
* to that gene
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment