hybridLambda / hybrid-Lambda

Hybrid-Lambda is a software package that can simulate gene trees within a rooted species network or a rooted species tree under the Kingman's coalescent or Lambda coalescent process.
http://hybridlambda.github.io/
GNU General Public License v3.0
6 stars 4 forks source link

Problems with networks with no single hybridization #46

Open acosta187 opened 2 years ago

acosta187 commented 2 years ago

Hello Joe,

I am working with networks simulated in R with "SiPhyNetwork" and then converted in hybrid lambda format with julia, but when I use hybrid lambda it can not produce gene tree in some "networks with no single hybridization", and give me that mesage: "Segmentation fault (core dumped)", and "Error: basic_string::substr: __pos (which is 926) > this->size() (which is 925)" in other verssion. This is one network that give in trouble.

((t7:1.824787754,(t5:0.2492040851,(t4:0.2492040851)#H40:0::0.5816295845):1.575583669):1.078315079,((((t2:0.2492040851,#H40:0::0.4183704155):0.06211284012,((t14:0.2158261544)#H27:1.059040005::0.8200520216)#H37:0::0.57750146):0.5830225755,#H28:0::0.2386303903):0.5672588079,(((((t10:0.1232252345,t1:0.1232252345):0.2897578393,#H32:0::0.1421666984):0.4381590085,((((t12:0.03763745742,t9:0.03763745742):0.2237957877,t11:0.2614332451):0.1515498287)#H32:0.1323027591::0.8578333016,(t8:0.4706204227,(t6:0.3113169253,#H37:0::0.42249854):0.1593034974):0.0746654102):0.3058562494):0.4948735151,((t17:0.6072760223,t16:0.6072760223):0.667590137,#H27:2.022589239::0.1799479784):0.07114943811):0.01714427292,(t3:0.8795085707)#H28:0.01483093012::0.7613696097):0.09843843841):1.441504524):1.695735038);

Becheler commented 2 years ago

Hi @acosta187 . I will try to have a look on that. Would you mind sharing the exact command that led to the error? :)

acosta187 commented 2 years ago

Hi @Becheler this is my procedure to run hybrid lambda with simulated networs by "SiPhyNetwork". I notice that the problem happen in some network that have "no single hybridization" (like the network that I put in the example) or in cyclic reticulation (when hybridization occurs when two parts of the same branch join, Sorry but I don't remember the exact term).

Network generated with "SiPhyNetwork":

(((((t13:0.1074074245,t16:0.1074074245):1.118068408,t1:1.225475832):0.8643459005,#H26:1.455801779::0.1653593469):0.05799997902,((t10:0.8663279768,((t15:0.3768871335)#H29:0.25713282::0.9524025219)#H26:0.2323080233::0.8346406531):1.165560728,(((((t7:0.2259815159,t11:0.2259815159):0.06516197373,t9:0.2911434897):0.08574364385,#H29:0::0.04759747814):0.3388649192,(t2:0.3776026943,t4:0.3776026943):0.3381493583):0.6381163571,((t14:0.04168772354,t6:0.04168772354):0.0561034575,((t12:0.0202606947,t5:0.0202606947):0.0200718446,t3:0.0403325393):0.05745864174):1.256077229):0.6780202951):0.1159330068):0.6431125456);

Ploting the network

image

network in hybrid lambda format using "PhyloNetworks" with Julia:

((((t13:0.1074074245,t16:0.1074074245)I1:1.118068408,t1:1.225475832)I2:0.8643459005,H26#0.1653593469:1.455801779)I3:0.05799997902,((t10:0.8663279768,((t15:0.3768871335)H29#0.9524025219:0.25713282)H26#0.1653593469:0.2323080233)I4:1.165560728,(((((t7:0.2259815159,t11:0.2259815159)I5:0.06516197373,t9:0.2911434897)I6:0.08574364385,H29#0.9524025219:0.0)I7:0.3388649192,(t2:0.3776026943,t4:0.3776026943)I8:0.3381493583)I9:0.6381163571,((t14:0.04168772354,t6:0.04168772354)I10:0.0561034575,((t12:0.0202606947,t5:0.0202606947)I11:0.0200718446,t3:0.0403325393)I12:0.05745864174)I13:1.256077229)I14:0.6780202951)I15:0.1159330068)I16;

Hybrid lambda code:

hybrid-Lambda -spcu 'hybridlambda_filename' -num 100 -seed 865014 -o name_file_save_gt > saving_hybridlambda_message 2>&1

can also be run by placing the net directly:

hybrid-Lambda -spcu '((((t13:0.1074074245,t16:0.1074074245)I1:1.118068408,t1:1.225475832)I2:0.8643459005,H26#0.1653593469:1.455801779)I3:0.05799997902,((t10:0.8663279768,((t15:0.3768871335)H29#0.9524025219:0.25713282)H26#0.1653593469:0.2323080233)I4:1.165560728,(((((t7:0.2259815159,t11:0.2259815159)I5:0.06516197373,t9:0.2911434897)I6:0.08574364385,H29#0.9524025219:0.0)I7:0.3388649192,(t2:0.3776026943,t4:0.3776026943)I8:0.3381493583)I9:0.6381163571,((t14:0.04168772354,t6:0.04168772354)I10:0.0561034575,((t12:0.0202606947,t5:0.0202606947)I11:0.0200718446,t3:0.0403325393)I12:0.05745864174)I13:1.256077229)I14:0.6780202951)I15:0.1159330068)I16;' -num 100 -seed 865014 -o name_file_save_gt > saving_hybridlambda_message 2>&1

and the result is: Segmentation fault (core dumped)

Becheler commented 2 years ago

Wonderful, thanks it's very helpful!