【问题标题】:biojava Exception in thread "main" java.lang.NoSuchMethodError:线程“主”java.lang.NoSuchMethodError 中的 biojava 异常:
【发布时间】:2014-06-26 13:56:05
【问题描述】:

代码有什么问题?

  public static void main(String[] args) throws Exception{


    ArrayList<String> fileName = new ArrayList<String> ();
    fileName.add("2M3T.fasta.txt");
    fileName.add("3LWK.fasta.txt");
    ArrayList<ProteinSequence> al = new ArrayList<ProteinSequence>();
    ArrayList<ProteinSequence> all =  new ArrayList<ProteinSequence>();
    for (String fn : fileName)
    {
    al = getProteinSequenceFromFasta(fn);
    all.add(al.get(0));
    for  (ProteinSequence s : al)
    {
        System.out.println(s);
    }
    }
    Profile<ProteinSequence, AminoAcidCompound> profile = Alignments.getMultipleSequenceAlignment(all);
    System.out.printf("Clustalw:%n%s%n", profile);
    ConcurrencyTools.shutdown();
    }
    //for (int i=0;i<sequence.size();i++)
    //  System.out.println(sequence);


public static ArrayList<ProteinSequence> getProteinSequenceFromFasta(String file) throws Exception{

    LinkedHashMap<String, ProteinSequence> a = FastaReaderHelper.readFastaProteinSequence(new File(file));
    //sztuczne
    ArrayList<ProteinSequence> sequence =  new ArrayList<ProteinSequence>(a.values());


    return sequence;
}

}

GSKTGTKITFYEDKNFQGRRYDCDCDCADFHTYLSRCNSIKVEGGTWAVYERPNFAGYMYILPQGEYPEYQRWMGLNDRLSSCRAVHLPSGGQYKIQIFEKGDFSGQMYETTEDCPSIMEQFHMREIHSCKVLEGVWIFYELPNYRGRQYLLDKKEYRKPIDWGAASPAVQSFRRIVE SMSAGPWKMVVWDEDGFQGRRHEFTAECPSVLELGFETVRSLKVLSGAWVGFEHAGFQGQQYILERGEYPSWDAWGGNTAYPAERLTSFRPAACANHRDSRLTIFEQENFLGKKGELSDDYPSLQAMGWEGNEVGSFHVHSGAWVCSQFPGYRGFQYVLECDHHSGDYKHFREWGSHAPTFQVQSIRRIQQ 线程“主”java.lang.NoSuchMethodError 中的异常:org.forester.phylogeny.PhylogenyNode.addAsChild(Lorg/forester/phylogeny/PhylogenyNode;)V 在 org.forester.evoinference.distance.NeighborJoining.execute(NeighborJoining.java:127) 在 org.biojava3.alignment.GuideTree.(GuideTree.java:88) 在 org.biojava3.alignment.Alignments.getMultipleSequenceAlignment(Alignments.java:183) 在 Fasta.main(Fasta.java:42)

【问题讨论】:

标签: bioinformatics biojava


【解决方案1】:

问题是你使用了错误的 Forester 版本。

根据 Maven pom 文件,Biojava 3.08 依赖于 Forester 1.005,而其谷歌代码页上的 Forester 最新版本是 1.028。

最好从 Biojava maven 存储库获取 jar 以确保使用正确的版本。

从此 URL 下载 jar:

http://biojava.org/download/maven/org/forester/1.005/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-06-18
    • 2018-08-02
    • 1970-01-01
    • 1970-01-01
    • 2011-06-17
    • 2017-01-31
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多