Commit 35f8c05b authored by Alexis  CRISCUOLO's avatar Alexis CRISCUOLO

little modifications

parent 3fc77ae6
...@@ -50,12 +50,60 @@ Launch _REQ_ without option to read the following documentation: ...@@ -50,12 +50,60 @@ Launch _REQ_ without option to read the following documentation:
The directory _example_ contains two files from the study of [Garcia-Hermoso et al. (2018)](https://doi.org/10.1128/mBio.00573-18): The directory _example_ contains two files from the study of [Garcia-Hermoso et al. (2018)](https://doi.org/10.1128/mBio.00573-18):
* _matrix.d_: a distance matrix in PHYLIP square format estimated from 22 _Mucor circinelloides_ f. _circinelloides_ genomes, * _matrix.d_: a distance matrix in PHYLIP square format estimated from 22 _Mucor circinelloides_ f. _circinelloides_ genomes,
* _tree.t_: the associated Minimum Evolution phylogenetic tree in NEWICK format. * _tree.t_: the associated minimum-evolution phylogenetic tree in NEWICK format.
The following command line writes into the file _tree.req.t_ the phylogenetic tree from _example/tree.t_ with the rate of elementary quartets at each internal branch estimated from the distance matrix _example/matrix.d_: The following command line writes into the file _tree.req.t_ the phylogenetic tree from _example/tree.t_ with the rate of elementary quartets at each internal branch estimated from the distance matrix _example/matrix.d_:
```bash ```bash
REQ example/matrix.d example/tree.t tree.req.t REQ example/matrix.d example/tree.t tree.req.t -v
``` ```
Because the option -v is set, the verbose mode will output the tree topology in NEWICK format, the list of leaf names, and, for each internal branch, the leaf quadripartition together with the rate of elementary quartets _Re_:
```
# (((((((17,18),16),((20,21),19)),(((4,((6,7),5)),(((2,3),1),0)),(8,9))),(10,11)),(12,13)),14,15);
0: P07_621_SLS
1: 1006PHL
2: P08_701_BU2_PER
3: P01_617_BU1_SLS
4: P11_702_BU2_PER
5: E01_615_SLS
6: P04_601_BU1_SLS
7: P04_559_BU1_SLS
8: P05_600_BU1_SLS
9: P05_598_BU1_SLS
10: P04_603_BU1_SLS
11: P04_602_BU1_SLS
12: P06_032_BU1_SLS
13: P06_023_BU1_SLS
14: P02_783_BU1_SLS
15: P12_579_STR
16: P05_622_BU1_SLS
17: P10_703_BU2_PER
18: P09_704_BU2_PER
19: P03_594_BU1_SLS
20: P05_599_BU1_SLS
21: P03_592_BU1_SLS
[17][18][16][21,20,19,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0] Re=1.000 (19/19)
[18,17][16][19,21,20][15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0] Re=0.677 (65/96)
[20][21][19][18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0] Re=0.474 (9/19)
[21,20][19][16,18,17][15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0] Re=1.000 (96/96)
[16,18,17][19,21,20][9,8,0,1,3,2,5,7,6,4][15,14,13,12,11,10] Re=0.856 (462/540)
[6][7][5][21,20,19,18,17,16,15,14,13,12,11,10,9,8,4,3,2,1,0] Re=1.000 (19/19)
[7,6][5][4][21,20,19,18,17,16,15,14,13,12,11,10,9,8,3,2,1,0] Re=0.944 (34/36)
[4][5,7,6][0,1,3,2][21,20,19,18,17,16,15,14,13,12,11,10,9,8] Re=1.000 (168/168)
[2][3][1][21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,0] Re=1.000 (19/19)
[3,2][1][0][21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4] Re=1.000 (36/36)
[1,3,2][0][5,7,6,4][21,20,19,18,17,16,15,14,13,12,11,10,9,8] Re=1.000 (168/168)
[5,7,6,4][0,1,3,2][9,8][21,20,19,18,17,16,15,14,13,12,11,10] Re=1.000 (384/384)
[8][9][0,1,3,2,5,7,6,4][21,20,19,18,17,16,15,14,13,12,11,10] Re=1.000 (96/96)
[0,1,3,2,5,7,6,4][9,8][19,21,20,16,18,17][15,14,13,12,11,10] Re=0.453 (261/576)
[19,21,20,16,18,17][9,8,0,1,3,2,5,7,6,4][11,10][15,14,13,12] Re=0.488 (234/480)ù
[10][11][9,8,0,1,3,2,5,7,6,4,19,21,20,16,18,17][15,14,13,12] Re=1.000 (64/64)
[9,8,0,1,3,2,5,7,6,4,19,21,20,16,18,17][11,10][13,12][15,14] Re=0.594 (76/128)
[12][13][11,10,9,8,0,1,3,2,5,7,6,4,19,21,20,16,18,17][15,14] Re=1.000 (36/36)
[11,10,9,8,0,1,3,2,5,7,6,4,19,21,20,16,18,17][13,12][14][15] Re=0.500 (18/36)
output tree written into tree.req.t
```
Of note, the output file _tree.req.t_ is available inside the directory _example_.
## References ## References
......
(((((((P10_703_BU2_PER:0.000157849066,P09_704_BU2_PER:0.000209200934)1.000:0.000483122851,P05_622_BU1_SLS:0.001116966803)0.677:0.000018368078,((P05_599_BU1_SLS:0.000159586258,P03_592_BU1_SLS:0.000169023742)0.474:0.000015792325,P03_594_BU1_SLS:0.000128336869)1.000:0.000462006451)0.856:0.000081437521,(((P11_702_BU2_PER:0.000615002481,((P04_601_BU1_SLS:0.000117392803,P04_559_BU1_SLS:0.000164857197)1.000:0.000925936953,E01_615_SLS:0.000884566733)0.944:0.000161626490)1.000:0.008730158578,(((P08_701_BU2_PER:0.001390856250,P01_617_BU1_SLS:0.001385183750)1.000:0.001280565582,1006PHL:0.002499367591)1.000:0.011475862713,P07_621_SLS:0.014634622105)1.000:0.015451073655)1.000:0.008164485602,(P05_600_BU1_SLS:0.000172301484,P05_598_BU1_SLS:0.000210108516)1.000:0.000603348539)0.453:0.000010417106)0.488:0.000045431349,(P04_603_BU1_SLS:0.000255598014,P04_602_BU1_SLS:0.000179821986)1.000:0.000552675249)0.594:0.000029208891,(P06_032_BU1_SLS:0.000173131711,P06_023_BU1_SLS:0.000108148289)1.000:0.000554756800)0.500:0.000022656931,P02_783_BU1_SLS:0.000592772460,P12_579_STR:0.000673747540);
\ No newline at end of file
...@@ -119,7 +119,7 @@ public class REQ { ...@@ -119,7 +119,7 @@ public class REQ {
//# sup last //# sup last
tr = tr.insert(0, '('); sup = apc(tr, tr.lastIndexOf(")")); tr = tr.insert(sup, ')'); //# NOTE: closing parenthesis at index 'sup' should not be considered for REQ calculations tr = tr.insert(0, '('); sup = apc(tr, tr.lastIndexOf(")")); tr = tr.insert(sup, ')'); //# NOTE: closing parenthesis at index 'sup' should not be considered for REQ calculations
last = tr.lastIndexOf(")"); last = tr.lastIndexOf(")");
if ( verbose ) { i = -1; while ( ++i < n ) System.out.println(i + ": " + lbl.get(i)); System.out.println("# " + tr.toString()); } if ( verbose ) { i = -1; while ( ++i < n ) System.out.println(i + ": " + lbl.get(i)); /*System.out.println("# " + tr.toString());*/ }
ts = new TreeSet<Short>(); si = 0; --si; while ( ++si < n ) ts.add(new Short(si)); are = new ArrayList<Double>(); u = -1; ts = new TreeSet<Short>(); si = 0; --si; while ( ++si < n ) ts.add(new Short(si)); are = new ArrayList<Double>(); u = -1;
while ( (u=tr.indexOf(")", ++u)) != last ) { while ( (u=tr.indexOf(")", ++u)) != last ) {
...@@ -129,7 +129,7 @@ public class REQ { ...@@ -129,7 +129,7 @@ public class REQ {
if ( u == sup ) { if ( u == sup ) {
last = tro.lastIndexOf(")"); tr = tro.insert(last, ')'); v = apc(tr, apc(tr, last)); tr = tr.insert(++v, '('); last = tro.lastIndexOf(")"); tr = tro.insert(last, ')'); v = apc(tr, apc(tr, last)); tr = tr.insert(++v, '(');
++last; //# NOTE: closing parenthesis at index 'last' should not be considered for REQ calculations ++last; //# NOTE: closing parenthesis at index 'last' should not be considered for REQ calculations
if ( verbose ) System.out.println("# " + tr.toString()); //if ( verbose ) System.out.println("# " + tr.toString());
sup = 0; --u; continue; sup = 0; --u; continue;
} }
//# parsing every internal branch e at index u in order to obtain lbl(STa) lbl(STb) | lbl(STc) lbl(T)-lbl(STa U STb U STc) ######## //# parsing every internal branch e at index u in order to obtain lbl(STa) lbl(STb) | lbl(STc) lbl(T)-lbl(STa U STb U STc) ########
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment