[Biojava-l] concatenating chromatograms

mark.schreiber at novartis.com mark.schreiber at novartis.com
Thu Feb 2 04:51:02 EST 2006


Hi Heather,

If you look at the API docs under the Chromatogram and trace file support 
http://www.biojava.org/docs/api14/index.html there are the classes that 
biojava has to support traces.

The best package to use is org.biojava.bio.chromatogram.

One possible way would be to do something like this...

Chromatogram c1 = ChromatogramFactory.create(file1);
Chromatogram c2 = ChromatogramFactory.create(file2);
SimpleChromatogram mergeChrom = new SimpleChromatogram();

//repeat all steps below for each DNA base, eg replace DNATools.a() with 
DNATools.g() etc
int[] a1 = c1.getTrace(DNATools.a());
int[] a2 = c2.getTrace(DNATools.a());
int[] merged = new int[a1.length + a2.lenght]

//use a loop here to copy a1 and a2 into merged

//now set the DNATools.a() trace for mergeChrom
mergeChrom.setTraceValues(DNATools.a(), merged, merged.length);

Hope this works!

- Mark





Heather Kent <heatkent at gmail.com>
Sent by: biojava-l-bounces at portal.open-bio.org
02/02/2006 02:41 PM

 
        To:     biojava-l at biojava.org
        cc:     (bcc: Mark Schreiber/GP/Novartis)
        Subject:        [Biojava-l] concatenating chromatograms


I would like to write a small application that would concatenate abi or 
scf
chromatograms and write out a new chromatogram file..
 has anyone done something similar to this or seen any code that would be
helpful for me, i am new at programming
and have been looking through the Biojava API

_______________________________________________
Biojava-l mailing list  -  Biojava-l at biojava.org
http://biojava.org/mailman/listinfo/biojava-l





More information about the Biojava-l mailing list