[Biojava-l] Editing a RichSequence
holland at ebi.ac.uk
Fri Feb 15 10:16:40 EST 2008
I think it's because sequences are constructed internally in a
ChunkedSymbolListFactory which compresses large sequences whereas small
sequences are stored as normal uncompressed ones. Compressed sequences
extend AbstractSymbolList, which is immutable (and therefore uneditable)
whereas uncompressed ones do not, and hence are editable.
You can disable the use of compressed sequences by using readGenbank()
instead of readGenbankDNA() and passing in the DNA alphabet and the
non-compressed sequence factory (see the static constants in
If this still doesn't work, please could you post the full stacktrace so
that we can see which class is throwing the exception and at what line
On Fri, February 15, 2008 2:44 pm, Jolyon Holdstock wrote:
> I am trying to edit a Genbank sequence.
> The code I'm using is as follows:
> richSeq = RichSequence.IOTools.readGenbankDNA(new BufferedReader(new
> FileReader(new File("U00096.gbk"))), null).nextRichSequence();
> SymbolList sl1 = DNATools.createDNA("AAAGGGTTTCCC");
> Edit editOne = new Edit(47078, 2690, sl1);
> When it runs it gives the following error
> ChangeVetoException: org.biojava.utils.ChangeVetoException:
> AbstractSymbolList is immutable
> I have used the code for a smaller sequence (15kb, compared with 4Mb)
> and it works.
> Does anyone have an idea why this is not working?
> Jolyon Holdstock Ph.D.
> Senior Computational Biologist,
> Oxford Gene Technology,
> Begbroke Science Park,
> Sandy Lane, Yarnton
> Oxford, OX5 1PF
> Tel: +44 (0)1865 856852
> Fax: +44 (0)1865 842116
> Oxford Gene Technology (Operations) Ltd. Registered in England
> No:03845432 Begbroke Science Park, Sandy Lane, Yarnton, Oxford, OX5 1PF.
> Confidentiality Notice: The contents of this email from the Oxford Gene
> Technology Group of Companies are confidential and intended solely for
> the person to whom it is addressed. It may contain privileged and
> confidential information. If you are not the intended recipient you must
> not read, copy, distribute, discuss or take any action in reliance on
> Biojava-l mailing list - Biojava-l at lists.open-bio.org
Hinxton, Cambridgeshire CB10 1SD, UK
More information about the Biojava-l