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

changes to ChadoCanonicalGene

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@4513 ee4ac58c-ac51-4696-9907-e4b3aa274f04
parent a7ea1702
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.26 2006-07-04 11:05:49 tjc Exp $ * $Header: //tmp/pathsoft/artemis/uk/ac/sanger/artemis/io/GFFDocumentEntry.java,v 1.27 2006-07-04 15:59:38 tjc Exp $
*/ */
package uk.ac.sanger.artemis.io; package uk.ac.sanger.artemis.io;
...@@ -37,7 +37,7 @@ import java.sql.Timestamp; ...@@ -37,7 +37,7 @@ import java.sql.Timestamp;
* 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.26 2006-07-04 11:05:49 tjc Exp $ * @version $Id: GFFDocumentEntry.java,v 1.27 2006-07-04 15:59:38 tjc Exp $
**/ **/
public class GFFDocumentEntry extends SimpleDocumentEntry public class GFFDocumentEntry extends SimpleDocumentEntry
...@@ -343,22 +343,35 @@ public class GFFDocumentEntry extends SimpleDocumentEntry ...@@ -343,22 +343,35 @@ public class GFFDocumentEntry extends SimpleDocumentEntry
**/ **/
public void combineChadoExons(ChadoCanonicalGene gene) public void combineChadoExons(ChadoCanonicalGene gene)
{ {
Hashtable exons = gene.getExons(); Vector transcripts = (Vector)gene.getTranscripts();
final Enumeration enum_exons = exons.keys();
final RangeVector new_range_vector = new RangeVector(); final RangeVector new_range_vector = new RangeVector();
QualifierVector qualifier_vector = new QualifierVector(); QualifierVector qualifier_vector = new QualifierVector();
Hashtable id_range_store = new Hashtable(); Hashtable id_range_store = new Hashtable();
Timestamp lasttimemodified = null; Timestamp lasttimemodified = null;
while(enum_exons.hasMoreElements())
for(int i=0; i<transcripts.size(); i++)
{ {
String transcript_id = (String)enum_exons.nextElement(); Feature transcript = (Feature)transcripts.get(i);
Vector v_exons = (Vector)exons.get(transcript_id); String transcript_id = null;
try
{
transcript_id = (String)(transcript.getQualifierByName("ID").getValues().get(0));
}
catch(InvalidRelationException e1)
{
e1.printStackTrace();
}
Vector v_exons = (Vector)gene.getExonsOfTranscript(transcript_id);
if(v_exons == null)
continue;
for(int i=0; i<v_exons.size(); i++) for(int j=0; j<v_exons.size(); j++)
{ {
final GFFStreamFeature this_feature = final GFFStreamFeature this_feature =
(GFFStreamFeature)v_exons.get(i); (GFFStreamFeature)v_exons.get(j);
// use the most current lastmodified datestamp // use the most current lastmodified datestamp
if(this_feature.getLastModified() != null && if(this_feature.getLastModified() != null &&
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment