lliu1871 / phybase

Phybase provides functions to read, write, manipulate, simulate, estimate, and summarize phylogenetic trees
GNU General Public License v3.0
4 stars 1 forks source link

Gene tree simulation error #4

Open hyyuu opened 1 year ago

hyyuu commented 1 year ago

Hi Sir,

Thank you very much for this package! I recently bumped into a difficulty in gene tree simulation using Phybase. It failed to simulate gene trees for the third tree in the file but it works well for the first two trees. However, I cannot spot any difference between 1st/2nd and 3rd trees. Do you have any suggestions about this error?

Please find the attached gene tree file.

Thank you very much for your help and time. 100bpgeneastral.addBrLen.txt

Best wishes, Alex

lliu1871 commented 1 year ago

could you share your R code (and the error message you received) for simulating gene trees?

Liang


Professor and Graduate coordinator Department of Statistics Institute of Bioinformatics University of Georgia Phylogenetics Lab | Phylogenetics Lab (uga.edu)http://faculty.franklin.uga.edu/lliu

On Jun 28, 2023, at 12:42 PM, hyyuu @.**@.>> wrote:

[EXTERNAL SENDER - PROCEED CAUTIOUSLY]

Hi Sir,

Thank you very much for this package! I recently bumped into a difficulty in gene tree simulation using Phybase. It failed to simulate gene trees for the third tree in the file but it works well for the first two trees. However, I cannot spot any difference between 1st/2nd and 3rd trees. Do you have any suggestions about this error?

Please find the attached gene tree file.

Thank you very much for your help and time. 100bpgeneastral.addBrLen.txthttps://github.com/lliu1871/phybase/files/11889806/100bpgeneastral.addBrLen.txt

Best wishes, Alex

— Reply to this email directly, view it on GitHubhttps://github.com/lliu1871/phybase/issues/4, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACZITQXFSDI6ALKQVQ2SESDXNOY5FANCNFSM6AAAAAAZWPHEWQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>

hyyuu commented 1 year ago

Dear Liang,

Thank you for your prompt reply! I am actually following the script provided in "Coalescent_simulation_and_gene_flow_detection". When I re-tried the gene tree simulation step, it failed to simulate any gene trees. I ran the script in RStudio locally. Error code:

Error in read.tree.nodes(mpest_tree) : object 'node3' not found
3.read.tree.nodes(mpest_tree)
2.sim.coal.mpest(SpTr_text, number_geneTr)
1.geneTr_sim(speciesTr_BP_text[i], geneTr_num)

I have attached the scripts that I ran. sim_r.txt

Thank you again!

Best, Alex

lliu1871 commented 1 year ago

Thanks. It looks like there is an error in reading the mp-est tree. Could you send the mp-est tree that triggered this error message?

Liang


Professor and Graduate coordinator Department of Statistics Institute of Bioinformatics University of Georgia Phylogenetics Lab | Phylogenetics Lab (uga.edu)http://faculty.franklin.uga.edu/lliu

On Jun 29, 2023, at 2:22 AM, hyyuu @.**@.>> wrote:

[EXTERNAL SENDER - PROCEED CAUTIOUSLY]

Dear Liang,

Thank you for your prompt reply! I am actually following the script provided in "Coalescent_simulation_and_gene_flow_detectionhttps://github.com/lmcai/Coalescent_simulation_and_gene_flow_detection/tree/master". When I re-tried the gene tree simulation step, it failed to simulate any gene trees. I ran the script in RStudio locally. Error code:

Error in read.tree.nodes(mpest_tree) : object 'node3' not found 3.read.tree.nodes(mpest_tree) 2.sim.coal.mpest(SpTr_text, number_geneTr) 1.geneTr_sim(speciesTr_BP_text[i], geneTr_num)

I have attached the scripts that I ran. sim_r.txthttps://github.com/lliu1871/phybase/files/11898903/sim_r.txt

Thank you again!

Best, Alex

— Reply to this email directly, view it on GitHubhttps://github.com/lliu1871/phybase/issues/4#issuecomment-1611882373, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACZITQRZJXXOAU7AJHRQ5TDXNRY7LANCNFSM6AAAAAAZWPHEWQ. You are receiving this because you commented.Message ID: @.***>

hyyuu commented 1 year ago

Dear Liang,

Thank you for your reply. Please find the attached ASTRAL species trees in the script. speciestree.txt

Thank you for your help again.

Best, Alex

lliu1871 commented 1 year ago

The R function “sim.coal.mpest” can ONLY take MP-EST trees to simulate gene trees. ASTRAL trees have different units on their branch length and they won’t work.

Liang


Professor and Graduate coordinator Department of Statistics Institute of Bioinformatics University of Georgia Phylogenetics Lab | Phylogenetics Lab (uga.edu)http://faculty.franklin.uga.edu/lliu

On Jun 29, 2023, at 2:22 AM, hyyuu @.**@.>> wrote:

sim.coal.mpest