[Biojava-dev] Creating an MSA from a file

Scooter Willis HWillis at scripps.edu
Thu Dec 30 13:10:51 UTC 2010


Mark

You can load the Fasta file with FastaReaderHelper and then add the returned collection to the MultipleSequenceAlignment. Probably should add a helper method for this. Currently, the MultipleSequenceAlignment class is fairly basic with the ability to output the sequences in different formats. 

LinkedHashMap<String,ProteinSequence> sequencesHashMap = FastaReaderHelper.readerFastaProteinSequence("fastafile.fa");
MultipleSequenceAlignment<ProteinSequence, AminoAcidCompound> msaProteins = new MultipleSequenceAlignment<ProteinSequence, AminoAcidCompound>();
Collection<ProteinSequence> sequences = sequencesHashMap.values();
for(ProteinSequence sequence : sequences){
	msaProteins.addAlignedSequence(sequence);
}
   
Thanks

Scooter


On Dec 30, 2010, at 12:19 AM, Mark Schreiber wrote:

> The new Alignment modules of BioJava3 look great.  If one has a pre-computed
> alignment (in FASTA format), what would be the recommended procedure for
> representing this as a Profile (or some other object). Eg, how would you
> build the object from a collection of parsed sequences from the FASTA file?
> _______________________________________________
> biojava-dev mailing list
> biojava-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biojava-dev





More information about the biojava-dev mailing list