org.intermine.bio.dataconversion
Class BioJavaFlatFileConverter

java.lang.Object
  extended by org.intermine.dataconversion.DataConverter
      extended by org.intermine.dataconversion.FileConverter
          extended by org.intermine.bio.dataconversion.BioJavaFlatFileConverter

public class BioJavaFlatFileConverter
extends FileConverter

DataConverter to parse an EMBL/Genbank/other file using BioJava and generate genomic model items.


Field Summary
protected  java.util.LinkedHashMap bioEntities
           
protected  Item db
           
protected  java.util.LinkedHashMap ids
           
protected  ItemFactory itemFactory
           
protected  java.util.LinkedHashMap taxonIds
           
 
Constructor Summary
BioJavaFlatFileConverter(ItemWriter writer)
          Constructor
 
Method Summary
 void close()
          Perform any necessary clean-up after post-conversion
protected  java.lang.String getGeneIdentifierFromCDS(Feature feature)
          Return a gene name for the given feature.
 void process(java.io.Reader reader)
          Perform the currentFile conversion
 
Methods inherited from class org.intermine.dataconversion.FileConverter
getCurrentFile, setCurrentFile
 
Methods inherited from class org.intermine.dataconversion.DataConverter
alias, createItem, getItemWriter, getModel, newId, setStoreHook, store, store, store, store, store
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bioEntities

protected java.util.LinkedHashMap bioEntities

db

protected Item db

ids

protected java.util.LinkedHashMap ids

itemFactory

protected ItemFactory itemFactory

taxonIds

protected java.util.LinkedHashMap taxonIds
Constructor Detail

BioJavaFlatFileConverter

public BioJavaFlatFileConverter(ItemWriter writer)
                         throws ObjectStoreException
Constructor

Parameters:
writer - the ItemWriter used to handle the resultant items
Throws:
ObjectStoreException - if there is an ObjectStore problem
Method Detail

process

public void process(java.io.Reader reader)
             throws java.lang.Exception
Description copied from class: FileConverter
Perform the currentFile conversion

Specified by:
process in class FileConverter
Parameters:
reader - BufferedReader used as input
Throws:
java.lang.Exception - if an error occurs during processing
See Also:
FileConverter.process(Reader)

getGeneIdentifierFromCDS

protected java.lang.String getGeneIdentifierFromCDS(Feature feature)
Return a gene name for the given feature. Normally /gene is returned, but some less-than-good sequencing projects don't include /gene. In those cases this method can be overridden to do something clever to find out the gene name such as reading the /product line.

Parameters:
feature - the Feature
Returns:
the name or null if the name cannot be determined

close

public void close()
           throws ObjectStoreException
Description copied from class: FileConverter
Perform any necessary clean-up after post-conversion

Overrides:
close in class FileConverter
Throws:
ObjectStoreException
See Also:
FileConverter.close()