AssertionError in run_favites.py manually
Closed this issue · 2 comments
cannot run_favites.py manually
FAVITES Version
1.1.3
Environment
ubuntu
Configuration File
{
"ContactNetwork": "NetworkX",
"ContactNetworkGenerator": "RandomPartitionGraph",
"d_or_u": "u",
"rpg_p_in": 0.004,
"rpg_p_out": 0.0002,
"rpg_sizes": [1000,1000,1000,1000,1000],
"end_time": 10,
"num_seeds": 50,
"out_dir": "output_1_1",
"vts_max_attempts": 100,
"Driver": "Default",
"EndCriteria": "GEMF",
"Logging": "File",
"NodeAvailability": "Bernoulli",
"node_sample_prob": 0.1,
"NumBranchSample": "Single",
"NumTimeSample": "Once",
"SourceSample": "Random",
"TimeSample": "GranichFirstART",
"NodeEvolution": "VirusTreeSimulator",
"vts_growthRate": 2.851904,
"vts_model": "logistic",
"vts_n0": 1,
"vts_t50": -2,
"PostValidation": "Dummy",
"SeedSelection": "Random",
"SeedSequence": "VirusPureCoalescentGTRGamma",
"viral_sequence_type": "HIV1-B-DNA-POL-LITTLE",
"SequenceEvolution": "GTRGammaSeqGen",
"Sequencing": "Perfect",
"TransmissionNodeSample": "GEMF",
"hiv_a1_to_d": 0,
"hiv_a2_to_a3": 0,
"hiv_a2_to_d": 0,
"hiv_a1_to_i1": 0.48,
"hiv_a2_to_i2": 0.48,
"hiv_i2_to_a2": 0.5,
"hiv_i1_to_a1": 0.5,
"hiv_a3_to_a4": 0,
"hiv_a3_to_d": 0,
"hiv_a3_to_i3": 0,
"hiv_a4_to_d": 0,
"hiv_a4_to_i4": 0,
"hiv_i1_to_d": 0,
"hiv_i1_to_i2": 8.666666666666666,
"hiv_a1_to_a2": 4.33333,
"hiv_i2_to_d": 0,
"hiv_i2_to_i3": 0,
"hiv_i3_to_a3": 0,
"hiv_i3_to_d": 0,
"hiv_i3_to_i4": 0,
"hiv_i4_to_a4": 0,
"hiv_i4_to_d": 0,
"hiv_ns_to_d": 0,
"hiv_ns_to_s": 999999,
"hiv_s_to_d": 0,
"hiv_s_to_i1_by_a1": 0.005625,
"hiv_s_to_i1_by_a2": 0,
"hiv_s_to_i1_by_a3": 0,
"hiv_s_to_i1_by_a4": 0,
"hiv_s_to_i1_by_i1": 0.1125,
"hiv_s_to_i1_by_i2": 0.1,
"hiv_s_to_i1_by_i3": 0,
"hiv_s_to_i1_by_i4": 0,
"hiv_s_to_i1_seed": 0,
"TransmissionTimeSample": "HIVARTGranichGEMF",
"TreeNode": "Simple",
"TreeUnit": "LogNormal",
"tree_rate_mean": -6.164,
"tree_rate_stdev": 0.3,
"grinder_path": "grinder",
"gemf_path": "GEMF",
"hmmemit_path": "hmmemit",
"java_path": "java",
"nw_rename_path": "nw_rename",
"seqgen_path": "seq-gen",
"seed_population": 20,
"seqgen_a_to_c": 1.765707,
"seqgen_a_to_g": 9.587649,
"seqgen_a_to_t": 0.691915,
"seqgen_c_to_g": 0.863348,
"seqgen_c_to_t": 10.282617,
"seqgen_freq_a": 0.392,
"seqgen_freq_c": 0.165,
"seqgen_freq_g": 0.212,
"seqgen_freq_t": 0.232,
"seqgen_g_to_t": 1.0,
"seqgen_gamma_shape": 0.405129,
"seqgen_num_gamma_rate_categories": ""
}
Unexpected Behavior
Exception in thread "main" java.lang.UnsupportedClassVersionError: TransmissionTreeToVirusTree3 : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:442)
at java.net.URLClassLoader.access$100(URLClassLoader.java:64)
at java.net.URLClassLoader$1.run(URLClassLoader.java:354)
at java.net.URLClassLoader$1.run(URLClassLoader.java:348)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:347)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:312)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
Traceback (most recent call last):
File "./run_favites.py", line 75, in
MF.modules['Driver'].run('/'.join(expanduser(abspath(argv[0])).split('/')[:-1]), ORIG_CONFIG)
File "./modules/Driver_Default.py", line 297, in run
File "./modules/SequenceEvolution_GTRGammaSeqGen.py", line 39, in finalize
File "./modules/SequenceEvolution_SeqGen.py", line 52, in finalize
AssertionError: No trees were generated
This error is caused when running the non-Docker version of FAVITES (via run_favites.py
instead of run_favites_docker.py
), which depends on the local machine's environment for all dependencies. Specifically, this issue is caused when the local machine's version of Java is too out-of-date
Solutions are the following:
- Use the Docker image if you can run Docker on your system (preferred, as all dependencies are included for you)
- If you can't use the Docker image, you need a more up-to-date version of Java on your system. If you have root access, you can update your system's Java version, and if not, you will need to compile a local version of Java, and you can pass the path of the
java
executable to FAVITES via thejava_path
argument