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

gff

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@2430 ee4ac58c-ac51-4696-9907-e4b3aa274f04
parent 1b33481d
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* *
* $Header: //tmp/pathsoft/artemis/uk/ac/sanger/artemis/io/GFFDocumentEntry.java,v 1.11 2005-04-27 08:26:58 tjc Exp $ * $Header: //tmp/pathsoft/artemis/uk/ac/sanger/artemis/io/GFFDocumentEntry.java,v 1.12 2005-04-27 10:43:15 tjc Exp $
*/ */
package uk.ac.sanger.artemis.io; package uk.ac.sanger.artemis.io;
...@@ -36,7 +36,7 @@ import java.util.Vector; ...@@ -36,7 +36,7 @@ import java.util.Vector;
* A DocumentEntry that can read an GFF entry from a Document. * A DocumentEntry that can read an GFF entry from a Document.
* *
* @author Kim Rutherford * @author Kim Rutherford
* @version $Id: GFFDocumentEntry.java,v 1.11 2005-04-27 08:26:58 tjc Exp $ * @version $Id: GFFDocumentEntry.java,v 1.12 2005-04-27 10:43:15 tjc Exp $
**/ **/
public class GFFDocumentEntry extends SimpleDocumentEntry public class GFFDocumentEntry extends SimpleDocumentEntry
...@@ -176,18 +176,21 @@ public class GFFDocumentEntry extends SimpleDocumentEntry ...@@ -176,18 +176,21 @@ public class GFFDocumentEntry extends SimpleDocumentEntry
try try
{ {
if(this_feature.getKey().getKeyString().equals("CDS")) String key = this_feature.getKey().getKeyString();
if(key.equals("CDS") || key.equals("polypeptide_domain"))
{ {
if(this_feature.getQualifierByName("ID") != null) if(this_feature.getQualifierByName("Parent") != null)
{ {
final StringVector values = final StringVector values =
this_feature.getQualifierByName("ID").getValues(); this_feature.getQualifierByName("Parent").getValues();
group_name = values.elementAt(0); group_name = values.elementAt(0);
// check the parent is a gene // check the parent is a gene
// if(!genes.contains(group_name)) // if(!genes.contains(group_name))
// continue; // continue;
} }
else
continue;
} }
else else
continue; continue;
...@@ -203,15 +206,24 @@ public class GFFDocumentEntry extends SimpleDocumentEntry ...@@ -203,15 +206,24 @@ public class GFFDocumentEntry extends SimpleDocumentEntry
} }
else else
{ {
StringVector values = String parent1 = null;
this_feature.getQualifierByName("Parent").getValues(); String parent2 = null;
String parent = values.elementAt(0);
try
{
StringVector values =
this_feature.getQualifierByName("ID").getValues();
parent1 = values.elementAt(0);
Feature stored_feature = other_features.featureAt(0); Feature stored_feature = other_features.featureAt(0);
values = stored_feature.getQualifierByName("Parent").getValues(); values = stored_feature.getQualifierByName("ID").getValues();
parent2 = values.elementAt(0);
}
catch(NullPointerException e){}
// same ID with same Parent // same ID with same Parent
if(parent.equals(values.elementAt(0))) if((parent1 == null && parent2 == null) ||
parent1.equals(parent2))
other_features.add(this_feature); other_features.add(this_feature);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment