kfuku52 / csubst

Molecular convergence detection
BSD 3-Clause "New" or "Revised" License
25 stars 1 forks source link

AttributeError: 'NoneType' object has no attribute 'is_lineage_foreground' #39

Closed kfuku52 closed 1 year ago

kfuku52 commented 1 year ago

stdout

CSUBST start: 2023-05-10 18:06:17.523507+00:00
csubst analyze start: 2023-05-10 18:06:17.527421+00:00
OS: Linux-3.10.0-1160.el7.x86_64-x86_64-with-glibc2.24
Python version: 3.9.15 | packaged by conda-forge | (main, Nov 22 2022, 08:45:29)  [GCC 10.4.0]
CSUBST version: 1.3.9
CSUBST command: /opt/conda/envs/biotools/bin/csubst analyze --genetic_code 1 --infile_type iqtree --alignment_file ./HOG0002966.iqtree.anc/csubst.fasta --rooted_tree_file ./HOG0002966.iqtree.anc/csubst.nwk --iqtree_treefile ./HOG0002966.iqtree.anc/csubst.treefile --iqtree_state ./HOG0002966.iqtree.anc/csubst.state --iqtree_rate ./HOG0002966.iqtree.anc/csubst.rate --iqtree_iqtree ./HOG0002966.iqtree.anc/csubst.iqtree --iqtree_log ./HOG0002966.iqtree.anc/csubst.log --iqtree_model ECMK07+F+R4 --iqtree_redo no --max_arity 10 --exhaustive_until 1 --cutoff_stat OCNany2spe,1.5|omegaCany2spe,3.0 --max_combination 10000 --fg_exclude_wg yes --fg_stem_only yes --mg_sister no --exclude_sister_pair yes --ml_anc no --b yes --s no --cs no --cb yes --bs no --cbs no --calc_quantile no --omegaC_method submodel --asrv each --threads 2 --calibrate_longtail yes --float_type 32 --foreground foreground.txt
CSUBST working directory: /gfe_data/orthogroup/tmp/1010_HOG0002966
CSUBST bug report: https://github.com/kfuku52/csubst/issues
Reading and parsing input files.
Using internal node names and branch lengths in --iqtree_treefile and the root position in --rooted_tree_file.
IQ-TREE's intermediate files exist.
The model in the IQ-TREE's output (ECMK07+F+R4) matched --iqtree_model (ECMK07+F+R4). Skipping IQ-TREE.
Total branch length of --rooted_tree_file: 0.0000
Total branch length of --iqtree_treefile: 0.0000

Reading the state file: ./HOG0002966.iqtree.anc/csubst.state

Instantaneous substitution rate matrix will be generated using the base model: ECMK07+F
Transition matrix will be generated using the model in the ancestral state reconstruction: ECMK07+F+R4
Applying estimated codon frequencies to obtain the instantaneous rate matrix.
Writing sequence alignment: csubst_alignment_codon.fa
Writing sequence alignment: csubst_alignment_aa.fa

stderr

Traceback (most recent call last):
  File "/opt/conda/envs/biotools/bin/csubst", line 324, in <module>
    args.handler(args)
  File "/opt/conda/envs/biotools/bin/csubst", line 43, in command_analyze
    main_analyze(g)
  File "/opt/conda/envs/biotools/lib/python3.9/site-packages/csubst/main_analyze.py", line 132, in main_analyze
    g = foreground.get_foreground_branch(g)
  File "/opt/conda/envs/biotools/lib/python3.9/site-packages/csubst/foreground.py", line 220, in get_foreground_branch
    g['tree'],g['fg_leaf_name'],g['target_id'] = annotate_foreground_branch(g['tree'], g['fg_df'], g['fg_stem_only'])
  File "/opt/conda/envs/biotools/lib/python3.9/site-packages/csubst/foreground.py", line 168, in annotate_foreground_branch
    if (node.is_lineage_foreground==True)&(node.up.is_lineage_foreground==False):
AttributeError: 'NoneType' object has no attribute 'is_lineage_foreground'
kfuku52 commented 1 year ago

The tree only contains 3 tips.

image