lmcai / Coalescent_simulation_and_gene_flow_detection

R and Python scripts used to simulate gene trees under coalescent model and detect gene flow using triple frequency
GNU General Public License v3.0
10 stars 3 forks source link

KeyError: 'Cdub|Cgui|Sbay' When run the example data #5

Open lychen83 opened 8 months ago

lychen83 commented 8 months ago

Dear Cai,

I want to use your scripts to test my data. I used python 3 and R v. 4. I have installed all the packages your scripts suggested. However, when I use the following command to run the example data: sh simulator_tripletCounter_tripletMapper.sh example/yeastML.sp.rooted.tree example/yeastBP.sp.rooted.trees example/yeastML.rooted.gene.trees I met an error:

.....
Processing tree 1068
bad rooting
Processing tree 1069
bad rooting
Now you decide how to count triplet frequency for the simulated bootstrap replicates. !!This script will skip this step!! You can distribute them into separate jobs on cluster...
example:
python triple_frequency_counter.py geneTr_sim/BP1.sim.genetrees example/yeastML.sp.rooted.tree
python triple_frequency_counter.py geneTr_sim/BP2.sim.genetrees example/yeastML.sp.rooted.tree
python triple_frequency_counter.py geneTr_sim/BP3.sim.genetrees example/yeastML.sp.rooted.tree
......
Comparing triplet frequency in the empirical gene trees and simulated gene trees

Writing unbalanced triplets to unbalanced.trp.tsv

Traceback (most recent call last):
  File "/home/lyc/software/Coalescent_simulation_and_gene_flow_detection-master/find_unbalanced_triplets.py", line 30, in <module>
    if a[-2]-a[-1]>max(BPtrp_dict[l.split()[0]]):
KeyError: 'Cdub|Cgui|Sbay'

The screen log was attached. Could you kindly figure out the reason for the problem?

Thanks a lot.

Best,

Lingyun

screen.log

Yolanda1201 commented 7 months ago

Hello! Have you solved the problem yet? I met the same error.

haoxianger commented 3 months ago

Dear Cai,

I want to use your scripts to test my data. I used python 3 and R v. 4. I have installed all the packages your scripts suggested. However, when I use the following command to run the example data: sh simulator_tripletCounter_tripletMapper.sh example/yeastML.sp.rooted.tree example/yeastBP.sp.rooted.trees example/yeastML.rooted.gene.trees I met an error:

.....
Processing tree 1068
bad rooting
Processing tree 1069
bad rooting
Now you decide how to count triplet frequency for the simulated bootstrap replicates. !!This script will skip this step!! You can distribute them into separate jobs on cluster...
example:
python triple_frequency_counter.py geneTr_sim/BP1.sim.genetrees example/yeastML.sp.rooted.tree
python triple_frequency_counter.py geneTr_sim/BP2.sim.genetrees example/yeastML.sp.rooted.tree
python triple_frequency_counter.py geneTr_sim/BP3.sim.genetrees example/yeastML.sp.rooted.tree
......
Comparing triplet frequency in the empirical gene trees and simulated gene trees

Writing unbalanced triplets to unbalanced.trp.tsv

Traceback (most recent call last):
  File "/home/lyc/software/Coalescent_simulation_and_gene_flow_detection-master/find_unbalanced_triplets.py", line 30, in <module>
    if a[-2]-a[-1]>max(BPtrp_dict[l.split()[0]]):
KeyError: 'Cdub|Cgui|Sbay'

The screen log was attached. Could you kindly figure out the reason for the problem?

Thanks a lot.

Best,

Lingyun

screen.log

Hello!I met the same err. Have you solved the problem? If you have solved it ,could you tell me the step to solve it?