[Biojava-l] Editing a RichSequence
Richard Holland
holland at ebi.ac.uk
Fri Feb 15 15:16:40 UTC 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
RichSequenceBuilderFactory).
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
etc.
cheers,
Richard
On Fri, February 15, 2008 2:44 pm, Jolyon Holdstock wrote:
> Hi
>
>
> Hi,
>
> I am trying to edit a Genbank sequence.
> The code I'm using is as follows:
>
> [code]
> 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);
> richSeq.edit(editOne);
>
> [/code]
>
> 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?
>
> Thanks,
>
> Jolyon
>
>
>
>
>
> 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
> it.
>
>
> _______________________________________________
> Biojava-l mailing list - Biojava-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biojava-l
>
--
Richard Holland
BioMart (http://www.biomart.org/)
EMBL-EBI
Hinxton, Cambridgeshire CB10 1SD, UK
More information about the Biojava-l
mailing list