NullPointerException when using Alignments.getMultipleSequenceAlignment

Hannes Brandstätter-Müller <[email protected]>
Newsgroups gmane.comp.java.bio.general
Message-ID <CAPXi2mnpLujT=dvEQkLxFpih1sv6pe_-vob2vJJd-axOu4jr_w@mail.gmail.com>
Hello!

I tried to follow http://biojava.org/wiki/BioJava:CookBook3:MSA, but
when I run it, I get:

java.util.concurrent.ExecutionException: java.lang.NullPointerException
	at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
	at java.util.concurrent.FutureTask.get(FutureTask.java:83)
	at org.biojava3.alignment.Alignments.getListFromFutures(Alignments.java:282)
	at org.biojava3.alignment.Alignments.runPairwiseScorers(Alignments.java:602)
	at org.biojava3.alignment.Alignments.getMultipleSequenceAlignment(Alignments.java:173)

 What could I be doing wrong?

(
on the cookbook page, there is also an import missing:
import org.biojava3.alignment.Alignments;
)
-> then the cookbook runs, but my code does not

private static void processFile(String filename) {
        try {
            FileInputStream inStream = new FileInputStream(filename);
            FastaReader<DNASequence, NucleotideCompound> fastaReader =
                    new FastaReader<DNASequence, NucleotideCompound>(
                    inStream,
                    new GenericFastaHeaderParser<DNASequence,
NucleotideCompound>(),
                    new DNASequenceCreator(DNACompoundSet.getDNACompoundSet()));
            LinkedHashMap<String, DNASequence> b = fastaReader.process();

            List<DNASequence> sequences = new ArrayList<DNASequence>();
            for (Entry<String, DNASequence> entry : b.entrySet()) {
                if (sequences.size() < 5) {
                    sequences.add(entry.getValue());
                }
                System.out.println(entry.getValue());
            }

            Profile<DNASequence, NucleotideCompound> profile =
Alignments.getMultipleSequenceAlignment(sequences);
            System.out.printf("Clustalw:%n%s%n", profile);

            ConcurrencyTools.shutdown();
        } catch (Exception ex) {
            Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
_______________________________________________
Biojava-l mailing list  -  [email protected]
http://lists.open-bio.org/mailman/listinfo/biojava-l
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.