apollo.config
Class FlyNameAdapter

java.lang.Object
  extended by apollo.config.DefaultNameAdapter
      extended by apollo.config.GmodNameAdapter
          extended by apollo.config.FlyNameAdapter
All Implemented Interfaces:
ApolloNameAdapterI

public class FlyNameAdapter
extends GmodNameAdapter


Field Summary
protected static org.apache.log4j.Logger logger
           
 
Fields inherited from class apollo.config.GmodNameAdapter
annotNumber
 
Constructor Summary
FlyNameAdapter()
           
 
Method Summary
 java.lang.String generateAnnotSplitName(SeqFeatureI annot, StrandedFeatureSetI annotParent, java.lang.String curationName)
          generates both temp names and split names.
 java.lang.String generateId(StrandedFeatureSetI annots, java.lang.String curation_name, SeqFeatureI feature)
          generates a ID for a given feature.
 java.lang.String generateName(StrandedFeatureSetI annots, java.lang.String curation_name, SeqFeatureI feature)
          This is used by ChadoXmlWrite to generate a (new) name for exons in FlyBase Harvard's preferred style.
protected  java.lang.String generateTranscriptSuffix(int t_index, java.util.Vector transcripts, boolean addTemp)
          Construct a new index for transcript #t_index, following the pattern -RA, -RB, ..., -RAA, -RAB, ...
protected  java.lang.String getDefaultIDPrefix()
          The prefix to use if idFormat is not specified in tiers file for a type
protected  java.lang.String getPeptideSuffixRoot()
          returns "-P", The peptide suffix minus the ordinal
protected  java.lang.String getPrefix(java.lang.String idFormat)
          Given a format string (e.g.
protected  java.lang.String getTranscriptSuffixRoot()
          This needs some explaining.
 CompoundTransaction setAnnotId(AnnotatedFeatureI annot, java.lang.String id)
          returns CompoundTransaction of all id changes - this is used by GeneEditPanel for explicit id changes(fly) and UpdateTransaction/TransactionUtil for id changes caused by type changes (fly) which should eventually use compound trans - at the moment this is really just for fly Merge & split dont use this (should they?)
protected  UpdateTransaction setPeptideIdFromTranscript(SeqFeatureI trans)
          Flys peptide ids derive from its transcript id (unlike gmod/rice)
protected  CompoundTransaction setSeqNamesFromTranscript(AnnotatedFeatureI trans)
          Set the cDNA *and* peptide names based on the new transcript name.
protected  int skipUsedTempNum(java.lang.String curation_name, java.lang.String id, int num)
          helper function to create new temp ids - gets the next temp number.
protected  boolean transcriptCanHaveTempSuffix()
          Returns false - fly doesnt temp transcripts
protected  boolean transcriptOrdinalIsNumeric()
          Returns false.
 
Methods inherited from class apollo.config.GmodNameAdapter
generatePeptideIdFromTranscriptId, generatePeptideNameFromTranscriptName, generateTranscriptId, getIDPrefix, getNewChadoDbUniquename, getNewChadoDbUniquename, getNewIdFromTypeChange, getTranscriptNamePattern, getTranscriptOrdinalPattern, getTranscriptSuffix, isAnnotId, match, nameIsId, needsSuffix, setAnnotName, setTranscriptId, setTranscriptName, setTranscriptNameFromAnnot, suffixInUse, typeChangeCausesIdChange
 
Methods inherited from class apollo.config.DefaultNameAdapter
addSynonym, checkFormat, checkName, generateChadoCdsIdFromTranscriptId, generateChadoCdsNameFromTranscriptName, generateExonId, generateName, generateNewExonId, generateNewId, getSuffixDelimiter, getTransactionManager, idAndNameHaveSameFormat, isTemp, isTemp, nextAnnotNumber, setDataAdapter, setId, setName, setTransactionManager, skipUsedTempNum, updateExonId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final org.apache.log4j.Logger logger
Constructor Detail

FlyNameAdapter

public FlyNameAdapter()
Method Detail

generateName

public java.lang.String generateName(StrandedFeatureSetI annots,
                                     java.lang.String curation_name,
                                     SeqFeatureI feature)
This is used by ChadoXmlWrite to generate a (new) name for exons in FlyBase Harvard's preferred style. (Other types of things are passed up to the parent class's generateName method.)

Specified by:
generateName in interface ApolloNameAdapterI
Overrides:
generateName in class GmodNameAdapter

generateId

public java.lang.String generateId(StrandedFeatureSetI annots,
                                   java.lang.String curation_name,
                                   SeqFeatureI feature)
generates a ID for a given feature. for annots calls generateAnnotTempId which produces a temp id

Specified by:
generateId in interface ApolloNameAdapterI
Overrides:
generateId in class GmodNameAdapter

generateAnnotSplitName

public java.lang.String generateAnnotSplitName(SeqFeatureI annot,
                                               StrandedFeatureSetI annotParent,
                                               java.lang.String curationName)
Description copied from class: GmodNameAdapter
generates both temp names and split names. a split annot can have 3 kinds of names: temp, id, & real-user-added name. temps, and ids just get temp ids. if its a real-user-added name that means its being split and it needs split numbers. old split numbers are looked for and added to if there. a split number is a :# at the end of a real user name. looks at other annots with same name(prefix) and if they have split numbers uses next highest. curationName not used here (for fly subclass)

Specified by:
generateAnnotSplitName in interface ApolloNameAdapterI
Overrides:
generateAnnotSplitName in class GmodNameAdapter

skipUsedTempNum

protected int skipUsedTempNum(java.lang.String curation_name,
                              java.lang.String id,
                              int num)
helper function to create new temp ids - gets the next temp number. if id is a temp id, parses out number used in temp id and return that number plus one if greater then num. This assumes temping is done with ":temp#". If curation_name is non null it uses it to strip it off the end (fly temp names have :curation_name at the end - this should probably just go in the fly adapter)


generateTranscriptSuffix

protected java.lang.String generateTranscriptSuffix(int t_index,
                                                    java.util.Vector transcripts,
                                                    boolean addTemp)
Construct a new index for transcript #t_index, following the pattern -RA, -RB, ..., -RAA, -RAB, ... -RZZ I'm assuming there will not be more than 26*26 transcripts. addTemp is ignored. fly never adds temp to its transcript suffixes.

Overrides:
generateTranscriptSuffix in class GmodNameAdapter

setSeqNamesFromTranscript

protected CompoundTransaction setSeqNamesFromTranscript(AnnotatedFeatureI trans)
Set the cDNA *and* peptide names based on the new transcript name.

Overrides:
setSeqNamesFromTranscript in class GmodNameAdapter

getDefaultIDPrefix

protected java.lang.String getDefaultIDPrefix()
The prefix to use if idFormat is not specified in tiers file for a type

Overrides:
getDefaultIDPrefix in class GmodNameAdapter

getPrefix

protected java.lang.String getPrefix(java.lang.String idFormat)
Given a format string (e.g. CG\d) returns the prefix (e.g. CG)

Overrides:
getPrefix in class GmodNameAdapter

getTranscriptSuffixRoot

protected java.lang.String getTranscriptSuffixRoot()
Description copied from class: GmodNameAdapter
This needs some explaining. This is the root of the suffix. Its the part of the transcript suffix that doesnt change. so for rice/gmod its "-transcript", for fly its "-R"

Overrides:
getTranscriptSuffixRoot in class GmodNameAdapter

getPeptideSuffixRoot

protected java.lang.String getPeptideSuffixRoot()
returns "-P", The peptide suffix minus the ordinal

Overrides:
getPeptideSuffixRoot in class GmodNameAdapter

transcriptOrdinalIsNumeric

protected boolean transcriptOrdinalIsNumeric()
Returns false. Fly transcript ordinal is alphabetic, not numeric.

Overrides:
transcriptOrdinalIsNumeric in class GmodNameAdapter

transcriptCanHaveTempSuffix

protected boolean transcriptCanHaveTempSuffix()
Returns false - fly doesnt temp transcripts

Overrides:
transcriptCanHaveTempSuffix in class GmodNameAdapter

setAnnotId

public CompoundTransaction setAnnotId(AnnotatedFeatureI annot,
                                      java.lang.String id)
returns CompoundTransaction of all id changes - this is used by GeneEditPanel for explicit id changes(fly) and UpdateTransaction/TransactionUtil for id changes caused by type changes (fly) which should eventually use compound trans - at the moment this is really just for fly Merge & split dont use this (should they?)

Specified by:
setAnnotId in interface ApolloNameAdapterI
Overrides:
setAnnotId in class DefaultNameAdapter

setPeptideIdFromTranscript

protected UpdateTransaction setPeptideIdFromTranscript(SeqFeatureI trans)
Flys peptide ids derive from its transcript id (unlike gmod/rice)

Overrides:
setPeptideIdFromTranscript in class GmodNameAdapter