Uses of Interface
org.biojavax.bio.seq.RichSequence

Packages that use RichSequence
org.biojavax.bio.db Interactions between biojavax objects and a DB. 
org.biojavax.bio.db.biosql Interface between biojava and biosql databases 
org.biojavax.bio.db.ncbi Interfaces to NCBI data. 
org.biojavax.bio.seq Rich implementations of Sequences, Locations and Features. 
org.biojavax.bio.seq.io Classes to support the I/O of RichSequence and Bioentry objects. 
 

Uses of RichSequence in org.biojavax.bio.db
 

Methods in org.biojavax.bio.db that return RichSequence
 RichSequence RichSequenceDBLite.getRichSequence(String id)
          Retrieve a single RichSequence by its id.
 RichSequence HashRichSequenceDB.getRichSequence(String id)
           
 

Methods in org.biojavax.bio.db with parameters of type RichSequence
 void RichSequenceDBLite.addRichSequence(RichSequence seq)
          Adds a sequence to the database.
 void HashRichSequenceDB.addRichSequence(RichSequence seq)
          Add a sequence.
 void AbstractRichSequenceDB.addRichSequence(RichSequence seq)
           
protected  void HashRichSequenceDB.addRichSequence(String id, RichSequence seq)
           
 

Uses of RichSequence in org.biojavax.bio.db.biosql
 

Methods in org.biojavax.bio.db.biosql that return RichSequence
 RichSequence BioSQLRichSequenceDB.fullyLoadRichSequence(RichSequence id)
           
 RichSequence BioSQLRichSequenceDB.getRichSequence(String id)
           
 

Methods in org.biojavax.bio.db.biosql with parameters of type RichSequence
 void BioSQLRichSequenceDB.addRichSequence(RichSequence seq)
           
 void BioSQLRichSequenceHandler.edit(RichSequence seq, Edit edit)
          Apply an edit to the Sequence as specified by the edit object.

Description

All edits can be broken down into a series of operations that change contiguous blocks of the sequence. This represent a one of those operations.

When applied, this Edit will replace 'length' number of symbols starting a position 'pos' by the SymbolList 'replacement'. This allow to do insertions (length=0), deletions (replacement=SymbolList.EMPTY_LIST) and replacements (length>=1 and replacement.length()>=1).

The pos and pos+length should always be valid positions on the SymbolList to:

  • be edited (between 0 and symL.length()+1).
  • To append to a sequence, pos=symL.length()+1, pos=0.
  • To insert something at the beginning of the sequence, set pos=1 and length=0.

Examples

 RichSequence seq = //code to initialize RichSequence
 System.out.println(seq.seqString());

 // delete 5 bases from position 4
 Edit ed = new Edit(4, 5, SymbolList.EMPTY_LIST);
 seq.edit(ed);
 System.out.println(seq.seqString());

 // delete one base from the start
 ed = new Edit(1, 1, SymbolList.EMPTY_LIST);
 seq.edit(ed);

 // delete one base from the end
 ed = new Edit(seq.length(), 1, SymbolList.EMPTY_LIST);
 seq.edit(ed);
 System.out.println(seq.seqString());

 // overwrite 2 bases from position 3 with "tt"
 ed = new Edit(3, 2, DNATools.createDNA("tt"));
 seq.edit(ed);
 System.out.println(seq.seqString());

 // add 6 bases to the start
 ed = new Edit(1, 0, DNATools.createDNA("aattgg");
 seq.edit(ed);
 System.out.println(seq.seqString());

 // add 4 bases to the end
 ed = new Edit(seq.length() + 1, 0, DNATools.createDNA("tttt"));
 seq.edit(ed);
 System.out.println(seq.seqString());

 // full edit
 ed = new Edit(3, 2, DNATools.createDNA("aatagaa");
 seq.edit(ed);
 System.out.println(seq.seqString());
 
 RichSequence BioSQLRichSequenceDB.fullyLoadRichSequence(RichSequence id)
           
 Iterator BioSQLRichSequenceHandler.iterator(RichSequence seq)
          An Iterator over all Symbols in this SymbolList.

This is an ordered iterator over the Symbols. It cannot be used to edit the underlying symbols.

 String BioSQLRichSequenceHandler.seqString(RichSequence seq)
          Stringify this Sequences.

It is expected that this will use the symbol's token to render each symbol. It should be parsable back into a SymbolList using the default token parser for this alphabet.

 SymbolList BioSQLRichSequenceHandler.subList(RichSequence seq, int start, int end)
          Return a new SymbolList for the symbols start to end inclusive.

The resulting SymbolList will count from 1 to (end-start + 1) inclusive, and refer to the symbols start to end of the original sequence.

 String BioSQLRichSequenceHandler.subStr(RichSequence seq, int start, int end)
          Return a region of this sequence as a String.

This should use the same rules as seqString.

 Symbol BioSQLRichSequenceHandler.symbolAt(RichSequence seq, int index)
          Return the symbol at index, counting from 1.
 List BioSQLRichSequenceHandler.toList(RichSequence seq)
          Returns a List of symbols.

This should be an immutable list of symbols or a copy.

 

Uses of RichSequence in org.biojavax.bio.db.ncbi
 

Methods in org.biojavax.bio.db.ncbi that return RichSequence
 RichSequence GenpeptRichSequenceDB.getRichSequence(String id)
          Given the appropriate Genbank ID, return the matching RichSequence object.
 RichSequence GenbankRichSequenceDB.getRichSequence(String id)
          Given the appropriate Genbank ID, return the matching RichSequence object.
 RichSequence GenpeptRichSequenceDB.getRichSequence(String id, Namespace nsp)
          Given the appropriate Genbank ID, return the matching RichSequence object.
 RichSequence GenbankRichSequenceDB.getRichSequence(String id, Namespace nsp)
          Given the appropriate Genbank ID, return the matching RichSequence object.
 

Uses of RichSequence in org.biojavax.bio.seq
 

Classes in org.biojavax.bio.seq that implement RichSequence
 class SimpleRichSequence
          A simple implementation of RichSequence.
 class ThinRichSequence
          A simple implementation of RichSequence.
 

Methods in org.biojavax.bio.seq that return RichSequence
static RichSequence RichSequence.Tools.createRichSequence(Namespace ns, String name, String seqString, Alphabet alpha)
          Create a new RichSequence in the specified namespace.
static RichSequence RichSequence.Tools.createRichSequence(Namespace ns, String name, SymbolList syms)
          Create a new RichSequence in the specified namespace.
static RichSequence RichSequence.Tools.createRichSequence(String name, String seqString, Alphabet alpha)
          Create a new RichSequence in the default namespace.
static RichSequence RichSequence.Tools.createRichSequence(String namespace, String name, String seqString, Alphabet alpha)
          Create a new RichSequence in the specified namespace.
static RichSequence RichSequence.Tools.createRichSequence(String name, SymbolList syms)
          Create a new RichSequence in the default namespace.
static RichSequence RichSequence.Tools.enrich(Sequence s)
          Boldly attempts to convert a Sequence into a RichSequence.
 RichSequence RichSequenceIterator.nextRichSequence()
           
 RichSequence RichSequence.IOTools.SingleRichSeqIterator.nextRichSequence()
          
static RichSequence RichSequence.Tools.subSequence(RichSequence s, int from, int to, Namespace newNamespace, String newName, String newAccession, String newIdentifier, int newVersion, Double seqVersion)
           Creates a new sequence from a subregion of another sequence.
 

Methods in org.biojavax.bio.seq with parameters of type RichSequence
 void RichSequenceHandler.edit(RichSequence seq, Edit edit)
          Apply an edit to the Sequence as specified by the edit object.
 void DummyRichSequenceHandler.edit(RichSequence seq, Edit edit)
          Apply an edit to the Sequence as specified by the edit object.
 Iterator RichSequenceHandler.iterator(RichSequence seq)
          An Iterator over all Symbols in this SymbolList.
 Iterator DummyRichSequenceHandler.iterator(RichSequence seq)
          An Iterator over all Symbols in this SymbolList.
 String RichSequenceHandler.seqString(RichSequence seq)
          Stringify this Sequences.
 String DummyRichSequenceHandler.seqString(RichSequence seq)
          Stringify this Sequences.
 SymbolList RichSequenceHandler.subList(RichSequence seq, int start, int end)
          Return a new SymbolList for the symbols start to end inclusive.
 SymbolList DummyRichSequenceHandler.subList(RichSequence seq, int start, int end)
          Return a new SymbolList for the symbols start to end inclusive.
static RichSequence RichSequence.Tools.subSequence(RichSequence s, int from, int to, Namespace newNamespace, String newName, String newAccession, String newIdentifier, int newVersion, Double seqVersion)
           Creates a new sequence from a subregion of another sequence.
 String RichSequenceHandler.subStr(RichSequence seq, int start, int end)
          Return a region of this sequence as a String.
 String DummyRichSequenceHandler.subStr(RichSequence seq, int start, int end)
          Return a region of this sequence as a String.
 Symbol RichSequenceHandler.symbolAt(RichSequence seq, int index)
          Return the symbol at index, counting from 1.
 Symbol DummyRichSequenceHandler.symbolAt(RichSequence seq, int index)
          Return the symbol at index, counting from 1.
 List RichSequenceHandler.toList(RichSequence seq)
          Returns a List of symbols.
 List DummyRichSequenceHandler.toList(RichSequence seq)
          Returns a List of symbols.
 

Uses of RichSequence in org.biojavax.bio.seq.io
 

Methods in org.biojavax.bio.seq.io that return RichSequence
 RichSequence SimpleRichSequenceBuilder.makeRichSequence()
          Build a RichSequence.
 RichSequence RichSequenceBuilder.makeRichSequence()
          Build a RichSequence.
 RichSequence RichStreamReader.nextRichSequence()
          
 RichSequence HashedFastaIterator.nextRichSequence()