textbender.d.transfer
Class Transfer

java.lang.Object
  extended by Transfer

@ThreadSafe
public class Transfer
extends Object

Utilities for conducting recombinant transfers.


Method Summary
static boolean isTransferMutant(Element gene, Element g, List<Element> gList, MutantAbstractor mutantAbstractor, DOMImplementationLS domLS, LSParser parser, StringBuilder b)
          Returns true if the gene's sequence has changed enough that the mutation should be recorded in transfer ancestry.
static void recordAsTransferSource(Element sourceGene, Element sourceGG, List<Element> sourceGList, Element targetG, DOMSource nodeTransformSource, Transformer eSS, StringWriter eSSWriter, StreamResult eSSResult, StringBuilder b)
          Records a gene as a transfer source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isTransferMutant

public static boolean isTransferMutant(Element gene,
                                       Element g,
                                       List<Element> gList,
                                       MutantAbstractor mutantAbstractor,
                                       DOMImplementationLS domLS,
                                       LSParser parser,
                                       StringBuilder b)
Returns true if the gene's sequence has changed enough that the mutation should be recorded in transfer ancestry.

Errors/doubts will fall on the side of mutation. Worst outcome is, caller will add redundant info to ancestry, which later tracers can prune away.

Parameters:
gene - whose sequence to inspect for mutation
g - gene meta-data ('g') element, of gene
gList - list of all gene meta-data ('g') elements in the document
mutantAbstractor - to use
domLS - DOM implementation to use
parser - parser to use
b - string builder to use, overwriting its existing content
Returns:
true if abstract form of sequence differs from that of all immediate transfer ancestors, or if there are no such ancestors
See Also:
d/transfer/note.xht#Maintenance-of-Ancestry-Records

recordAsTransferSource

public static void recordAsTransferSource(Element sourceGene,
                                          Element sourceGG,
                                          List<Element> sourceGList,
                                          Element targetG,
                                          DOMSource nodeTransformSource,
                                          Transformer eSS,
                                          StringWriter eSSWriter,
                                          StreamResult eSSResult,
                                          StringBuilder b)
                                   throws TransformerException
Records a gene as a transfer source. This entails 1) overwriting the target gene's transfer source sequence 'tSS' attribute; and 2) recording the source sequence as the immediate ancestor of the target, with all prior ancestry contained within it.

Parameters:
sourceGene - to record as the transfer source sequence
sourceGG - the 'g' list ('gg') element of the source document
sourceGList - list of all gene meta-data ('g') elements in source document
targetG - gene meta-data ('g') element, of targt gene
nodeTransformSource - to use, via its setNode()
eSS - identity transformer to use, as a string serializer for creating embedded sequence copy
eSSWriter - eSS string writer
eSSResult - result, pre-set to eSSWriter
b - string builder to use, overwriting its existing content
Throws:
TransformerException