diff --git a/README.md b/README.md index f68c1f43279c5ce55082ae5d97d39208fb57ec07..501693089e99b4a0e74a80e8ac5d48b252196a05 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,9 @@ OPTIONS: ## Notes -* First, _RepeatPlot_ determines the _x_ canonical _k_-mers that occur at least twice in the input sequence (_k_ = 15). Second, _RepeatPlot_ selects the _r_ sequence regions _R<sub>i</sub>_ composed by a set _K<sub>i</sub>_ of successive non-unique canonical _k_-mers such that | _K<sub>i</sub>_ | ≥ _l_ − _k_ + 1 (_l_ = 50 by default; option `-l`). Finally, _RepeatPlot_ compares the _k_-mer contents of each pair _R<sub>i</sub>_, _R<sub>j</sub>_ of selected regions. Two regions _R<sub>i</sub>_ and _R<sub>j</sub>_ are assessed as similar when | _K<sub>i</sub>_ ∩ _K<sub>j</sub>_ | ≥ _l_ − _k_ + 1 . Every pair of similar regions is plotted as a circle of radius proportional to | _K<sub>i</sub>_ ∩ _K<sub>j</sub>_ |. Given an input sequence of length _n_ nucleotide residues, the overall time complexity required by _RepeatPlot_ is _O_ ( _n_ + _x_ _r_<sup>2</sup> ), therefore enabling fast running times in many cases. +* First, _RepeatPlot_ determines the _x_ canonical _k_-mers (_k_ = 15) that occur at least twice in the input sequence. Second, _RepeatPlot_ selects the _r_ sequence regions _R<sub>i</sub>_ composed by a set _K<sub>i</sub>_ of successive non-unique canonical _k_-mers such that | _K<sub>i</sub>_ | ≥ _l_ − _k_ + 1 (_l_ = 50 by default; option `-l`). Finally, _RepeatPlot_ compares the _k_-mer contents of each pair _R<sub>i</sub>_, _R<sub>j</sub>_ of selected regions. Two regions _R<sub>i</sub>_ and _R<sub>j</sub>_ are assessed as similar when | _K<sub>i</sub>_ ∩ _K<sub>j</sub>_ | ≥ _l_ − _k_ + 1 . Every pair of similar regions is plotted as a circle of radius proportional to | _K<sub>i</sub>_ ∩ _K<sub>j</sub>_ |. Given an input sequence of length _n_ nucleotide residues, the overall time complexity required by _RepeatPlot_ is _O_ ( _n_ + _x_ _r_<sup>2</sup> ), therefore enabling fast running times in many cases. + +* Denoting _F_<sub>1</sub>, _F_<sub>0</sub> and _f_<sub>1</sub>, the total number of _k_-mers, distinct _k_-mers, and unique (singleton) _k_-mers, respectively (e.g. Melsted and Halldórsson 2014), it is worth noting that _x_ = _F_<sub>0</sub> − _f_<sub>1</sub>. _RepeatPlot_ computes and displays the four values _F_<sub>1</sub>, _F_<sub>0</sub>, _f_<sub>1</sub> and _x_ (_k_ = 15), as well as the _k_-mer repeat index ( _F_<sub>1</sub> − _f_<sub>1</sub> ) / _F_<sub>0</sub>. The _k_-mer repeat index is as close to 0 (e.g. ≤ 0.05) as the specified chromosome sequence is mainly made up by unique _k_-mers; reciprocally, quite large _k_-mer repeat index values (e.g. ≥ 0.15) are indicative of the presence of highly-occurring repeated _k_-mers. * The input file should be in FASTA format (UTF-8 character encoding) and may contain at least one nucleotide sequence. If the input file contains more than one sequence, they are concatenated to obtain a unique one. When compressed using _gzip_, the input file name should end with `.gz`. @@ -135,5 +137,9 @@ This leads to the below figures: ## References + +Melsted P, Halldórsson PV (2014) _KmerStream: streaming algorithms for k-mer abundance estimation_. **Bioinformatics**, 30(24):3541-3547. [doi:10.1093/bioinformatics/btu71](https://doi.org/10.1093/bioinformatics/btu713). + + Rocha EPC, Danchin A, Viari A (1999) _Analysis of Long Repeats in Bacterial Genomes Reveals Alternative Evolutionary Mechanisms in Bacillus subtilis and Other Competent Prokaryotes_. **Molecular Biology and Evolution**, 16(9):1219-1230. [doi:10.1093/oxfordjournals.molbev.a026212](https://doi.org/10.1093/oxfordjournals.molbev.a026212). diff --git a/examples/Escherichia.coli.K-12.MG1655.svg b/examples/Escherichia.coli.K-12.MG1655.svg index 07db2fbe7a6dfd046bc2f19e93fe138b8c00911f..3ee7dc7410ace76fe41e612f462b1caacf87feec 100644 --- a/examples/Escherichia.coli.K-12.MG1655.svg +++ b/examples/Escherichia.coli.K-12.MG1655.svg @@ -23,6 +23,8 @@ <line x1="198928" y1="4873734" x2="232082" y2="4873734" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> + <text x="132619" y="4873734" transform="rotate(-90,132619,4873734)" font-size="66309" text-anchor="middle">0</text> + <line x1="232082" y1="232082" x2="232082" y2="198928" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> <line x1="4873734" y1="4873734" x2="4906888" y2="4873734" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> @@ -33,6 +35,8 @@ <line x1="198928" y1="4409634" x2="232082" y2="4409634" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> + <text x="132619" y="4409634" transform="rotate(-90,132619,4409634)" font-size="66309" text-anchor="middle">464100</text> + <line x1="696182" y1="232082" x2="696182" y2="198928" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> <line x1="4873734" y1="4409634" x2="4906888" y2="4409634" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> @@ -43,6 +47,8 @@ <line x1="198928" y1="3945534" x2="232082" y2="3945534" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> + <text x="132619" y="3945534" transform="rotate(-90,132619,3945534)" font-size="66309" text-anchor="middle">928200</text> + <line x1="1160282" y1="232082" x2="1160282" y2="198928" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> <line x1="4873734" y1="3945534" x2="4906888" y2="3945534" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> @@ -53,6 +59,8 @@ <line x1="198928" y1="3481434" x2="232082" y2="3481434" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> + <text x="132619" y="3481434" transform="rotate(-90,132619,3481434)" font-size="66309" text-anchor="middle">1392300</text> + <line x1="1624382" y1="232082" x2="1624382" y2="198928" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> <line x1="4873734" y1="3481434" x2="4906888" y2="3481434" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> @@ -63,6 +71,8 @@ <line x1="198928" y1="3017334" x2="232082" y2="3017334" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> + <text x="132619" y="3017334" transform="rotate(-90,132619,3017334)" font-size="66309" text-anchor="middle">1856400</text> + <line x1="2088482" y1="232082" x2="2088482" y2="198928" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> <line x1="4873734" y1="3017334" x2="4906888" y2="3017334" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> @@ -73,6 +83,8 @@ <line x1="198928" y1="2553234" x2="232082" y2="2553234" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> + <text x="132619" y="2553234" transform="rotate(-90,132619,2553234)" font-size="66309" text-anchor="middle">2320500</text> + <line x1="2552582" y1="232082" x2="2552582" y2="198928" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> <line x1="4873734" y1="2553234" x2="4906888" y2="2553234" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> @@ -83,6 +95,8 @@ <line x1="198928" y1="2089134" x2="232082" y2="2089134" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> + <text x="132619" y="2089134" transform="rotate(-90,132619,2089134)" font-size="66309" text-anchor="middle">2784600</text> + <line x1="3016682" y1="232082" x2="3016682" y2="198928" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> <line x1="4873734" y1="2089134" x2="4906888" y2="2089134" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> @@ -93,6 +107,8 @@ <line x1="198928" y1="1625034" x2="232082" y2="1625034" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> + <text x="132619" y="1625034" transform="rotate(-90,132619,1625034)" font-size="66309" text-anchor="middle">3248700</text> + <line x1="3480782" y1="232082" x2="3480782" y2="198928" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> <line x1="4873734" y1="1625034" x2="4906888" y2="1625034" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> @@ -103,6 +119,8 @@ <line x1="198928" y1="1160934" x2="232082" y2="1160934" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> + <text x="132619" y="1160934" transform="rotate(-90,132619,1160934)" font-size="66309" text-anchor="middle">3712800</text> + <line x1="3944882" y1="232082" x2="3944882" y2="198928" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> <line x1="4873734" y1="1160934" x2="4906888" y2="1160934" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> @@ -113,6 +131,8 @@ <line x1="198928" y1="696834" x2="232082" y2="696834" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> + <text x="132619" y="696834" transform="rotate(-90,132619,696834)" font-size="66309" text-anchor="middle">4176900</text> + <line x1="4408982" y1="232082" x2="4408982" y2="198928" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> <line x1="4873734" y1="696834" x2="4906888" y2="696834" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> @@ -123,6 +143,8 @@ <line x1="198928" y1="232734" x2="232082" y2="232734" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> + <text x="132619" y="232734" transform="rotate(-90,132619,232734)" font-size="66309" text-anchor="middle">4641000</text> + <line x1="4873082" y1="232082" x2="4873082" y2="198928" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> <line x1="4873734" y1="232734" x2="4906888" y2="232734" stroke="#848482" stroke-linecap="round" stroke-width="10212"/> diff --git a/examples/Klebsiella.pneumoniae.NTUH-K2044.svg b/examples/Klebsiella.pneumoniae.NTUH-K2044.svg index 2fbe25f7c2d9f36c31f0197cd2042747869d8bd0..df49434685518986f20e22d599ee095e51f2f96f 100644 --- a/examples/Klebsiella.pneumoniae.NTUH-K2044.svg +++ b/examples/Klebsiella.pneumoniae.NTUH-K2044.svg @@ -23,6 +23,8 @@ <line x1="224937" y1="5510946" x2="262426" y2="5510946" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> + <text x="149959" y="5510946" transform="rotate(-90,149959,5510946)" font-size="74978" text-anchor="middle">0</text> + <line x1="262426" y1="262426" x2="262426" y2="224937" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> <line x1="5510946" y1="5510946" x2="5548435" y2="5510946" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> @@ -33,6 +35,8 @@ <line x1="224937" y1="4986146" x2="262426" y2="4986146" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> + <text x="149959" y="4986146" transform="rotate(-90,149959,4986146)" font-size="74978" text-anchor="middle">524800</text> + <line x1="787226" y1="262426" x2="787226" y2="224937" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> <line x1="5510946" y1="4986146" x2="5548435" y2="4986146" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> @@ -43,6 +47,8 @@ <line x1="224937" y1="4461346" x2="262426" y2="4461346" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> + <text x="149959" y="4461346" transform="rotate(-90,149959,4461346)" font-size="74978" text-anchor="middle">1049600</text> + <line x1="1312026" y1="262426" x2="1312026" y2="224937" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> <line x1="5510946" y1="4461346" x2="5548435" y2="4461346" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> @@ -53,6 +59,8 @@ <line x1="224937" y1="3936546" x2="262426" y2="3936546" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> + <text x="149959" y="3936546" transform="rotate(-90,149959,3936546)" font-size="74978" text-anchor="middle">1574400</text> + <line x1="1836826" y1="262426" x2="1836826" y2="224937" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> <line x1="5510946" y1="3936546" x2="5548435" y2="3936546" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> @@ -63,6 +71,8 @@ <line x1="224937" y1="3411746" x2="262426" y2="3411746" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> + <text x="149959" y="3411746" transform="rotate(-90,149959,3411746)" font-size="74978" text-anchor="middle">2099200</text> + <line x1="2361626" y1="262426" x2="2361626" y2="224937" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> <line x1="5510946" y1="3411746" x2="5548435" y2="3411746" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> @@ -73,6 +83,8 @@ <line x1="224937" y1="2886946" x2="262426" y2="2886946" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> + <text x="149959" y="2886946" transform="rotate(-90,149959,2886946)" font-size="74978" text-anchor="middle">2624000</text> + <line x1="2886426" y1="262426" x2="2886426" y2="224937" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> <line x1="5510946" y1="2886946" x2="5548435" y2="2886946" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> @@ -83,6 +95,8 @@ <line x1="224937" y1="2362146" x2="262426" y2="2362146" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> + <text x="149959" y="2362146" transform="rotate(-90,149959,2362146)" font-size="74978" text-anchor="middle">3148800</text> + <line x1="3411226" y1="262426" x2="3411226" y2="224937" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> <line x1="5510946" y1="2362146" x2="5548435" y2="2362146" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> @@ -93,6 +107,8 @@ <line x1="224937" y1="1837346" x2="262426" y2="1837346" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> + <text x="149959" y="1837346" transform="rotate(-90,149959,1837346)" font-size="74978" text-anchor="middle">3673600</text> + <line x1="3936026" y1="262426" x2="3936026" y2="224937" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> <line x1="5510946" y1="1837346" x2="5548435" y2="1837346" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> @@ -103,6 +119,8 @@ <line x1="224937" y1="1312546" x2="262426" y2="1312546" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> + <text x="149959" y="1312546" transform="rotate(-90,149959,1312546)" font-size="74978" text-anchor="middle">4198400</text> + <line x1="4460826" y1="262426" x2="4460826" y2="224937" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> <line x1="5510946" y1="1312546" x2="5548435" y2="1312546" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> @@ -113,6 +131,8 @@ <line x1="224937" y1="787746" x2="262426" y2="787746" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> + <text x="149959" y="787746" transform="rotate(-90,149959,787746)" font-size="74978" text-anchor="middle">4723200</text> + <line x1="4985626" y1="262426" x2="4985626" y2="224937" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> <line x1="5510946" y1="787746" x2="5548435" y2="787746" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> @@ -123,6 +143,8 @@ <line x1="224937" y1="262946" x2="262426" y2="262946" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> + <text x="149959" y="262946" transform="rotate(-90,149959,262946)" font-size="74978" text-anchor="middle">5248000</text> + <line x1="5510426" y1="262426" x2="5510426" y2="224937" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> <line x1="5510946" y1="262946" x2="5548435" y2="262946" stroke="#848482" stroke-linecap="round" stroke-width="11547"/> diff --git a/examples/Leptospira.interrogans.FDAARGOS_203.svg b/examples/Leptospira.interrogans.FDAARGOS_203.svg index d696faaa3d2991f7784955c632d4211984d0eea6..4441e9afe90318455099188917bf888149c2fb76 100644 --- a/examples/Leptospira.interrogans.FDAARGOS_203.svg +++ b/examples/Leptospira.interrogans.FDAARGOS_203.svg @@ -23,6 +23,8 @@ <line x1="183454" y1="4494611" x2="214029" y2="4494611" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> + <text x="122303" y="4494611" transform="rotate(-90,122303,4494611)" font-size="61151" text-anchor="middle">0</text> + <line x1="214029" y1="214029" x2="214029" y2="183454" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> <line x1="4494611" y1="4494611" x2="4525186" y2="4494611" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> @@ -33,6 +35,8 @@ <line x1="183454" y1="4066611" x2="214029" y2="4066611" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> + <text x="122303" y="4066611" transform="rotate(-90,122303,4066611)" font-size="61151" text-anchor="middle">428000</text> + <line x1="642029" y1="214029" x2="642029" y2="183454" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> <line x1="4494611" y1="4066611" x2="4525186" y2="4066611" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> @@ -43,6 +47,8 @@ <line x1="183454" y1="3638611" x2="214029" y2="3638611" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> + <text x="122303" y="3638611" transform="rotate(-90,122303,3638611)" font-size="61151" text-anchor="middle">856000</text> + <line x1="1070029" y1="214029" x2="1070029" y2="183454" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> <line x1="4494611" y1="3638611" x2="4525186" y2="3638611" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> @@ -53,6 +59,8 @@ <line x1="183454" y1="3210611" x2="214029" y2="3210611" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> + <text x="122303" y="3210611" transform="rotate(-90,122303,3210611)" font-size="61151" text-anchor="middle">1284000</text> + <line x1="1498029" y1="214029" x2="1498029" y2="183454" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> <line x1="4494611" y1="3210611" x2="4525186" y2="3210611" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> @@ -63,6 +71,8 @@ <line x1="183454" y1="2782611" x2="214029" y2="2782611" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> + <text x="122303" y="2782611" transform="rotate(-90,122303,2782611)" font-size="61151" text-anchor="middle">1712000</text> + <line x1="1926029" y1="214029" x2="1926029" y2="183454" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> <line x1="4494611" y1="2782611" x2="4525186" y2="2782611" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> @@ -73,6 +83,8 @@ <line x1="183454" y1="2354611" x2="214029" y2="2354611" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> + <text x="122303" y="2354611" transform="rotate(-90,122303,2354611)" font-size="61151" text-anchor="middle">2140000</text> + <line x1="2354029" y1="214029" x2="2354029" y2="183454" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> <line x1="4494611" y1="2354611" x2="4525186" y2="2354611" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> @@ -83,6 +95,8 @@ <line x1="183454" y1="1926611" x2="214029" y2="1926611" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> + <text x="122303" y="1926611" transform="rotate(-90,122303,1926611)" font-size="61151" text-anchor="middle">2568000</text> + <line x1="2782029" y1="214029" x2="2782029" y2="183454" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> <line x1="4494611" y1="1926611" x2="4525186" y2="1926611" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> @@ -93,6 +107,8 @@ <line x1="183454" y1="1498611" x2="214029" y2="1498611" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> + <text x="122303" y="1498611" transform="rotate(-90,122303,1498611)" font-size="61151" text-anchor="middle">2996000</text> + <line x1="3210029" y1="214029" x2="3210029" y2="183454" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> <line x1="4494611" y1="1498611" x2="4525186" y2="1498611" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> @@ -103,6 +119,8 @@ <line x1="183454" y1="1070611" x2="214029" y2="1070611" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> + <text x="122303" y="1070611" transform="rotate(-90,122303,1070611)" font-size="61151" text-anchor="middle">3424000</text> + <line x1="3638029" y1="214029" x2="3638029" y2="183454" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> <line x1="4494611" y1="1070611" x2="4525186" y2="1070611" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> @@ -113,6 +131,8 @@ <line x1="183454" y1="642611" x2="214029" y2="642611" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> + <text x="122303" y="642611" transform="rotate(-90,122303,642611)" font-size="61151" text-anchor="middle">3852000</text> + <line x1="4066029" y1="214029" x2="4066029" y2="183454" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> <line x1="4494611" y1="642611" x2="4525186" y2="642611" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> @@ -123,6 +143,8 @@ <line x1="183454" y1="214611" x2="214029" y2="214611" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> + <text x="122303" y="214611" transform="rotate(-90,122303,214611)" font-size="61151" text-anchor="middle">4280000</text> + <line x1="4494029" y1="214029" x2="4494029" y2="183454" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> <line x1="4494611" y1="214611" x2="4525186" y2="214611" stroke="#848482" stroke-linecap="round" stroke-width="9418"/> diff --git a/examples/Listeria.monocytogenes.EGD-e.svg b/examples/Listeria.monocytogenes.EGD-e.svg index 3e97f91dcdf10c7936937aed351a6f6e98a0f8ec..f0e026d016bf7ad7a02f1eb157b743e78ad03969 100644 --- a/examples/Listeria.monocytogenes.EGD-e.svg +++ b/examples/Listeria.monocytogenes.EGD-e.svg @@ -23,6 +23,8 @@ <line x1="126194" y1="3091754" x2="147226" y2="3091754" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> + <text x="84130" y="3091754" transform="rotate(-90,84130,3091754)" font-size="42064" text-anchor="middle">0</text> + <line x1="147226" y1="147226" x2="147226" y2="126194" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> <line x1="3091754" y1="3091754" x2="3112786" y2="3091754" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> @@ -33,6 +35,8 @@ <line x1="126194" y1="2797354" x2="147226" y2="2797354" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> + <text x="84130" y="2797354" transform="rotate(-90,84130,2797354)" font-size="42064" text-anchor="middle">294400</text> + <line x1="441626" y1="147226" x2="441626" y2="126194" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> <line x1="3091754" y1="2797354" x2="3112786" y2="2797354" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> @@ -43,6 +47,8 @@ <line x1="126194" y1="2502954" x2="147226" y2="2502954" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> + <text x="84130" y="2502954" transform="rotate(-90,84130,2502954)" font-size="42064" text-anchor="middle">588800</text> + <line x1="736026" y1="147226" x2="736026" y2="126194" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> <line x1="3091754" y1="2502954" x2="3112786" y2="2502954" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> @@ -53,6 +59,8 @@ <line x1="126194" y1="2208554" x2="147226" y2="2208554" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> + <text x="84130" y="2208554" transform="rotate(-90,84130,2208554)" font-size="42064" text-anchor="middle">883200</text> + <line x1="1030426" y1="147226" x2="1030426" y2="126194" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> <line x1="3091754" y1="2208554" x2="3112786" y2="2208554" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> @@ -63,6 +71,8 @@ <line x1="126194" y1="1914154" x2="147226" y2="1914154" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> + <text x="84130" y="1914154" transform="rotate(-90,84130,1914154)" font-size="42064" text-anchor="middle">1177600</text> + <line x1="1324826" y1="147226" x2="1324826" y2="126194" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> <line x1="3091754" y1="1914154" x2="3112786" y2="1914154" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> @@ -73,6 +83,8 @@ <line x1="126194" y1="1619754" x2="147226" y2="1619754" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> + <text x="84130" y="1619754" transform="rotate(-90,84130,1619754)" font-size="42064" text-anchor="middle">1472000</text> + <line x1="1619226" y1="147226" x2="1619226" y2="126194" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> <line x1="3091754" y1="1619754" x2="3112786" y2="1619754" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> @@ -83,6 +95,8 @@ <line x1="126194" y1="1325354" x2="147226" y2="1325354" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> + <text x="84130" y="1325354" transform="rotate(-90,84130,1325354)" font-size="42064" text-anchor="middle">1766400</text> + <line x1="1913626" y1="147226" x2="1913626" y2="126194" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> <line x1="3091754" y1="1325354" x2="3112786" y2="1325354" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> @@ -93,6 +107,8 @@ <line x1="126194" y1="1030954" x2="147226" y2="1030954" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> + <text x="84130" y="1030954" transform="rotate(-90,84130,1030954)" font-size="42064" text-anchor="middle">2060800</text> + <line x1="2208026" y1="147226" x2="2208026" y2="126194" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> <line x1="3091754" y1="1030954" x2="3112786" y2="1030954" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> @@ -103,6 +119,8 @@ <line x1="126194" y1="736554" x2="147226" y2="736554" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> + <text x="84130" y="736554" transform="rotate(-90,84130,736554)" font-size="42064" text-anchor="middle">2355200</text> + <line x1="2502426" y1="147226" x2="2502426" y2="126194" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> <line x1="3091754" y1="736554" x2="3112786" y2="736554" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> @@ -113,6 +131,8 @@ <line x1="126194" y1="442154" x2="147226" y2="442154" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> + <text x="84130" y="442154" transform="rotate(-90,84130,442154)" font-size="42064" text-anchor="middle">2649600</text> + <line x1="2796826" y1="147226" x2="2796826" y2="126194" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> <line x1="3091754" y1="442154" x2="3112786" y2="442154" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> @@ -123,6 +143,8 @@ <line x1="126194" y1="147754" x2="147226" y2="147754" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> + <text x="84130" y="147754" transform="rotate(-90,84130,147754)" font-size="42064" text-anchor="middle">2944000</text> + <line x1="3091226" y1="147226" x2="3091226" y2="126194" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> <line x1="3091754" y1="147754" x2="3112786" y2="147754" stroke="#848482" stroke-linecap="round" stroke-width="6478"/> diff --git a/examples/Mycoplasma.pneumoniae.NCTC10119.svg b/examples/Mycoplasma.pneumoniae.NCTC10119.svg index ebacf39a0a4e45ddd366131901734fbc6f3b4186..84ee30ab0cd67169851467d92d51cae9debe991f 100644 --- a/examples/Mycoplasma.pneumoniae.NCTC10119.svg +++ b/examples/Mycoplasma.pneumoniae.NCTC10119.svg @@ -23,6 +23,8 @@ <line x1="35020" y1="857981" x2="40856" y2="857981" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> + <text x="23347" y="857981" transform="rotate(-90,23347,857981)" font-size="11673" text-anchor="middle">0</text> + <line x1="40856" y1="40856" x2="40856" y2="35020" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> <line x1="857981" y1="857981" x2="863817" y2="857981" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> @@ -33,6 +35,8 @@ <line x1="35020" y1="776281" x2="40856" y2="776281" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> + <text x="23347" y="776281" transform="rotate(-90,23347,776281)" font-size="11673" text-anchor="middle">81700</text> + <line x1="122556" y1="40856" x2="122556" y2="35020" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> <line x1="857981" y1="776281" x2="863817" y2="776281" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> @@ -43,6 +47,8 @@ <line x1="35020" y1="694581" x2="40856" y2="694581" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> + <text x="23347" y="694581" transform="rotate(-90,23347,694581)" font-size="11673" text-anchor="middle">163400</text> + <line x1="204256" y1="40856" x2="204256" y2="35020" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> <line x1="857981" y1="694581" x2="863817" y2="694581" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> @@ -53,6 +59,8 @@ <line x1="35020" y1="612881" x2="40856" y2="612881" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> + <text x="23347" y="612881" transform="rotate(-90,23347,612881)" font-size="11673" text-anchor="middle">245100</text> + <line x1="285956" y1="40856" x2="285956" y2="35020" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> <line x1="857981" y1="612881" x2="863817" y2="612881" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> @@ -63,6 +71,8 @@ <line x1="35020" y1="531181" x2="40856" y2="531181" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> + <text x="23347" y="531181" transform="rotate(-90,23347,531181)" font-size="11673" text-anchor="middle">326800</text> + <line x1="367656" y1="40856" x2="367656" y2="35020" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> <line x1="857981" y1="531181" x2="863817" y2="531181" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> @@ -73,6 +83,8 @@ <line x1="35020" y1="449481" x2="40856" y2="449481" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> + <text x="23347" y="449481" transform="rotate(-90,23347,449481)" font-size="11673" text-anchor="middle">408500</text> + <line x1="449356" y1="40856" x2="449356" y2="35020" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> <line x1="857981" y1="449481" x2="863817" y2="449481" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> @@ -83,6 +95,8 @@ <line x1="35020" y1="367781" x2="40856" y2="367781" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> + <text x="23347" y="367781" transform="rotate(-90,23347,367781)" font-size="11673" text-anchor="middle">490200</text> + <line x1="531056" y1="40856" x2="531056" y2="35020" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> <line x1="857981" y1="367781" x2="863817" y2="367781" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> @@ -93,6 +107,8 @@ <line x1="35020" y1="286081" x2="40856" y2="286081" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> + <text x="23347" y="286081" transform="rotate(-90,23347,286081)" font-size="11673" text-anchor="middle">571900</text> + <line x1="612756" y1="40856" x2="612756" y2="35020" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> <line x1="857981" y1="286081" x2="863817" y2="286081" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> @@ -103,6 +119,8 @@ <line x1="35020" y1="204381" x2="40856" y2="204381" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> + <text x="23347" y="204381" transform="rotate(-90,23347,204381)" font-size="11673" text-anchor="middle">653600</text> + <line x1="694456" y1="40856" x2="694456" y2="35020" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> <line x1="857981" y1="204381" x2="863817" y2="204381" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> @@ -113,6 +131,8 @@ <line x1="35020" y1="122681" x2="40856" y2="122681" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> + <text x="23347" y="122681" transform="rotate(-90,23347,122681)" font-size="11673" text-anchor="middle">735300</text> + <line x1="776156" y1="40856" x2="776156" y2="35020" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> <line x1="857981" y1="122681" x2="863817" y2="122681" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> @@ -123,6 +143,8 @@ <line x1="35020" y1="40981" x2="40856" y2="40981" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> + <text x="23347" y="40981" transform="rotate(-90,23347,40981)" font-size="11673" text-anchor="middle">817000</text> + <line x1="857856" y1="40856" x2="857856" y2="35020" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> <line x1="857981" y1="40981" x2="863817" y2="40981" stroke="#848482" stroke-linecap="round" stroke-width="1798"/> diff --git a/examples/Neisseria.meningitidis.11-7.svg b/examples/Neisseria.meningitidis.11-7.svg index 4e73e03b0912a671c92108edbdb01153939a9e67..a52ffb21a0cc29c742fb63491669f4abb27439f2 100644 --- a/examples/Neisseria.meningitidis.11-7.svg +++ b/examples/Neisseria.meningitidis.11-7.svg @@ -23,6 +23,8 @@ <line x1="92462" y1="2265316" x2="107872" y2="2265316" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> + <text x="61642" y="2265316" transform="rotate(-90,61642,2265316)" font-size="30820" text-anchor="middle">0</text> + <line x1="107872" y1="107872" x2="107872" y2="92462" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> <line x1="2265316" y1="2265316" x2="2280726" y2="2265316" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> @@ -33,6 +35,8 @@ <line x1="92462" y1="2049616" x2="107872" y2="2049616" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> + <text x="61642" y="2049616" transform="rotate(-90,61642,2049616)" font-size="30820" text-anchor="middle">215700</text> + <line x1="323572" y1="107872" x2="323572" y2="92462" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> <line x1="2265316" y1="2049616" x2="2280726" y2="2049616" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> @@ -43,6 +47,8 @@ <line x1="92462" y1="1833916" x2="107872" y2="1833916" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> + <text x="61642" y="1833916" transform="rotate(-90,61642,1833916)" font-size="30820" text-anchor="middle">431400</text> + <line x1="539272" y1="107872" x2="539272" y2="92462" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> <line x1="2265316" y1="1833916" x2="2280726" y2="1833916" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> @@ -53,6 +59,8 @@ <line x1="92462" y1="1618216" x2="107872" y2="1618216" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> + <text x="61642" y="1618216" transform="rotate(-90,61642,1618216)" font-size="30820" text-anchor="middle">647100</text> + <line x1="754972" y1="107872" x2="754972" y2="92462" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> <line x1="2265316" y1="1618216" x2="2280726" y2="1618216" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> @@ -63,6 +71,8 @@ <line x1="92462" y1="1402516" x2="107872" y2="1402516" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> + <text x="61642" y="1402516" transform="rotate(-90,61642,1402516)" font-size="30820" text-anchor="middle">862800</text> + <line x1="970672" y1="107872" x2="970672" y2="92462" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> <line x1="2265316" y1="1402516" x2="2280726" y2="1402516" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> @@ -73,6 +83,8 @@ <line x1="92462" y1="1186816" x2="107872" y2="1186816" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> + <text x="61642" y="1186816" transform="rotate(-90,61642,1186816)" font-size="30820" text-anchor="middle">1078500</text> + <line x1="1186372" y1="107872" x2="1186372" y2="92462" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> <line x1="2265316" y1="1186816" x2="2280726" y2="1186816" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> @@ -83,6 +95,8 @@ <line x1="92462" y1="971116" x2="107872" y2="971116" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> + <text x="61642" y="971116" transform="rotate(-90,61642,971116)" font-size="30820" text-anchor="middle">1294200</text> + <line x1="1402072" y1="107872" x2="1402072" y2="92462" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> <line x1="2265316" y1="971116" x2="2280726" y2="971116" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> @@ -93,6 +107,8 @@ <line x1="92462" y1="755416" x2="107872" y2="755416" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> + <text x="61642" y="755416" transform="rotate(-90,61642,755416)" font-size="30820" text-anchor="middle">1509900</text> + <line x1="1617772" y1="107872" x2="1617772" y2="92462" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> <line x1="2265316" y1="755416" x2="2280726" y2="755416" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> @@ -103,6 +119,8 @@ <line x1="92462" y1="539716" x2="107872" y2="539716" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> + <text x="61642" y="539716" transform="rotate(-90,61642,539716)" font-size="30820" text-anchor="middle">1725600</text> + <line x1="1833472" y1="107872" x2="1833472" y2="92462" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> <line x1="2265316" y1="539716" x2="2280726" y2="539716" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> @@ -113,6 +131,8 @@ <line x1="92462" y1="324016" x2="107872" y2="324016" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> + <text x="61642" y="324016" transform="rotate(-90,61642,324016)" font-size="30820" text-anchor="middle">1941300</text> + <line x1="2049172" y1="107872" x2="2049172" y2="92462" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> <line x1="2265316" y1="324016" x2="2280726" y2="324016" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> @@ -123,6 +143,8 @@ <line x1="92462" y1="108316" x2="107872" y2="108316" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> + <text x="61642" y="108316" transform="rotate(-90,61642,108316)" font-size="30820" text-anchor="middle">2157000</text> + <line x1="2264872" y1="107872" x2="2264872" y2="92462" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> <line x1="2265316" y1="108316" x2="2280726" y2="108316" stroke="#848482" stroke-linecap="round" stroke-width="4747"/> diff --git a/examples/Salmonella.enterica.LT2.svg b/examples/Salmonella.enterica.LT2.svg index 1b1b3c92c94a5852abe9215a1a2049b5379a28a6..1650b5163cb974a4a0002fdfa88b0f22be8254b5 100644 --- a/examples/Salmonella.enterica.LT2.svg +++ b/examples/Salmonella.enterica.LT2.svg @@ -23,6 +23,8 @@ <line x1="208176" y1="5100322" x2="242872" y2="5100322" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> + <text x="138784" y="5100322" transform="rotate(-90,138784,5100322)" font-size="69392" text-anchor="middle">0</text> + <line x1="242872" y1="242872" x2="242872" y2="208176" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> <line x1="5100322" y1="5100322" x2="5135018" y2="5100322" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> @@ -33,6 +35,8 @@ <line x1="208176" y1="4614622" x2="242872" y2="4614622" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> + <text x="138784" y="4614622" transform="rotate(-90,138784,4614622)" font-size="69392" text-anchor="middle">485700</text> + <line x1="728572" y1="242872" x2="728572" y2="208176" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> <line x1="5100322" y1="4614622" x2="5135018" y2="4614622" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> @@ -43,6 +47,8 @@ <line x1="208176" y1="4128922" x2="242872" y2="4128922" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> + <text x="138784" y="4128922" transform="rotate(-90,138784,4128922)" font-size="69392" text-anchor="middle">971400</text> + <line x1="1214272" y1="242872" x2="1214272" y2="208176" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> <line x1="5100322" y1="4128922" x2="5135018" y2="4128922" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> @@ -53,6 +59,8 @@ <line x1="208176" y1="3643222" x2="242872" y2="3643222" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> + <text x="138784" y="3643222" transform="rotate(-90,138784,3643222)" font-size="69392" text-anchor="middle">1457100</text> + <line x1="1699972" y1="242872" x2="1699972" y2="208176" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> <line x1="5100322" y1="3643222" x2="5135018" y2="3643222" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> @@ -63,6 +71,8 @@ <line x1="208176" y1="3157522" x2="242872" y2="3157522" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> + <text x="138784" y="3157522" transform="rotate(-90,138784,3157522)" font-size="69392" text-anchor="middle">1942800</text> + <line x1="2185672" y1="242872" x2="2185672" y2="208176" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> <line x1="5100322" y1="3157522" x2="5135018" y2="3157522" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> @@ -73,6 +83,8 @@ <line x1="208176" y1="2671822" x2="242872" y2="2671822" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> + <text x="138784" y="2671822" transform="rotate(-90,138784,2671822)" font-size="69392" text-anchor="middle">2428500</text> + <line x1="2671372" y1="242872" x2="2671372" y2="208176" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> <line x1="5100322" y1="2671822" x2="5135018" y2="2671822" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> @@ -83,6 +95,8 @@ <line x1="208176" y1="2186122" x2="242872" y2="2186122" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> + <text x="138784" y="2186122" transform="rotate(-90,138784,2186122)" font-size="69392" text-anchor="middle">2914200</text> + <line x1="3157072" y1="242872" x2="3157072" y2="208176" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> <line x1="5100322" y1="2186122" x2="5135018" y2="2186122" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> @@ -93,6 +107,8 @@ <line x1="208176" y1="1700422" x2="242872" y2="1700422" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> + <text x="138784" y="1700422" transform="rotate(-90,138784,1700422)" font-size="69392" text-anchor="middle">3399900</text> + <line x1="3642772" y1="242872" x2="3642772" y2="208176" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> <line x1="5100322" y1="1700422" x2="5135018" y2="1700422" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> @@ -103,6 +119,8 @@ <line x1="208176" y1="1214722" x2="242872" y2="1214722" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> + <text x="138784" y="1214722" transform="rotate(-90,138784,1214722)" font-size="69392" text-anchor="middle">3885600</text> + <line x1="4128472" y1="242872" x2="4128472" y2="208176" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> <line x1="5100322" y1="1214722" x2="5135018" y2="1214722" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> @@ -113,6 +131,8 @@ <line x1="208176" y1="729022" x2="242872" y2="729022" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> + <text x="138784" y="729022" transform="rotate(-90,138784,729022)" font-size="69392" text-anchor="middle">4371300</text> + <line x1="4614172" y1="242872" x2="4614172" y2="208176" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> <line x1="5100322" y1="729022" x2="5135018" y2="729022" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> @@ -123,6 +143,8 @@ <line x1="208176" y1="243322" x2="242872" y2="243322" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> + <text x="138784" y="243322" transform="rotate(-90,138784,243322)" font-size="69392" text-anchor="middle">4857000</text> + <line x1="5099872" y1="242872" x2="5099872" y2="208176" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> <line x1="5100322" y1="243322" x2="5135018" y2="243322" stroke="#848482" stroke-linecap="round" stroke-width="10687"/> diff --git a/examples/Shigella.flexneri.2a.301.svg b/examples/Shigella.flexneri.2a.301.svg index 20f1bf6db5c945b1667ce8e0eb6fa696caacbaef..1199f31efb30c409226427c86b643eb85d293965 100644 --- a/examples/Shigella.flexneri.2a.301.svg +++ b/examples/Shigella.flexneri.2a.301.svg @@ -23,6 +23,8 @@ <line x1="197452" y1="4837562" x2="230360" y2="4837562" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> + <text x="131635" y="4837562" transform="rotate(-90,131635,4837562)" font-size="65817" text-anchor="middle">0</text> + <line x1="230360" y1="230360" x2="230360" y2="197452" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> <line x1="4837562" y1="4837562" x2="4870470" y2="4837562" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> @@ -33,6 +35,8 @@ <line x1="197452" y1="4376862" x2="230360" y2="4376862" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> + <text x="131635" y="4376862" transform="rotate(-90,131635,4376862)" font-size="65817" text-anchor="middle">460700</text> + <line x1="691060" y1="230360" x2="691060" y2="197452" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> <line x1="4837562" y1="4376862" x2="4870470" y2="4376862" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> @@ -43,6 +47,8 @@ <line x1="197452" y1="3916162" x2="230360" y2="3916162" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> + <text x="131635" y="3916162" transform="rotate(-90,131635,3916162)" font-size="65817" text-anchor="middle">921400</text> + <line x1="1151760" y1="230360" x2="1151760" y2="197452" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> <line x1="4837562" y1="3916162" x2="4870470" y2="3916162" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> @@ -53,6 +59,8 @@ <line x1="197452" y1="3455462" x2="230360" y2="3455462" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> + <text x="131635" y="3455462" transform="rotate(-90,131635,3455462)" font-size="65817" text-anchor="middle">1382100</text> + <line x1="1612460" y1="230360" x2="1612460" y2="197452" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> <line x1="4837562" y1="3455462" x2="4870470" y2="3455462" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> @@ -63,6 +71,8 @@ <line x1="197452" y1="2994762" x2="230360" y2="2994762" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> + <text x="131635" y="2994762" transform="rotate(-90,131635,2994762)" font-size="65817" text-anchor="middle">1842800</text> + <line x1="2073160" y1="230360" x2="2073160" y2="197452" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> <line x1="4837562" y1="2994762" x2="4870470" y2="2994762" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> @@ -73,6 +83,8 @@ <line x1="197452" y1="2534062" x2="230360" y2="2534062" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> + <text x="131635" y="2534062" transform="rotate(-90,131635,2534062)" font-size="65817" text-anchor="middle">2303500</text> + <line x1="2533860" y1="230360" x2="2533860" y2="197452" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> <line x1="4837562" y1="2534062" x2="4870470" y2="2534062" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> @@ -83,6 +95,8 @@ <line x1="197452" y1="2073362" x2="230360" y2="2073362" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> + <text x="131635" y="2073362" transform="rotate(-90,131635,2073362)" font-size="65817" text-anchor="middle">2764200</text> + <line x1="2994560" y1="230360" x2="2994560" y2="197452" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> <line x1="4837562" y1="2073362" x2="4870470" y2="2073362" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> @@ -93,6 +107,8 @@ <line x1="197452" y1="1612662" x2="230360" y2="1612662" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> + <text x="131635" y="1612662" transform="rotate(-90,131635,1612662)" font-size="65817" text-anchor="middle">3224900</text> + <line x1="3455260" y1="230360" x2="3455260" y2="197452" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> <line x1="4837562" y1="1612662" x2="4870470" y2="1612662" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> @@ -103,6 +119,8 @@ <line x1="197452" y1="1151962" x2="230360" y2="1151962" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> + <text x="131635" y="1151962" transform="rotate(-90,131635,1151962)" font-size="65817" text-anchor="middle">3685600</text> + <line x1="3915960" y1="230360" x2="3915960" y2="197452" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> <line x1="4837562" y1="1151962" x2="4870470" y2="1151962" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> @@ -113,6 +131,8 @@ <line x1="197452" y1="691262" x2="230360" y2="691262" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> + <text x="131635" y="691262" transform="rotate(-90,131635,691262)" font-size="65817" text-anchor="middle">4146300</text> + <line x1="4376660" y1="230360" x2="4376660" y2="197452" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> <line x1="4837562" y1="691262" x2="4870470" y2="691262" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> @@ -123,6 +143,8 @@ <line x1="197452" y1="230562" x2="230360" y2="230562" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> + <text x="131635" y="230562" transform="rotate(-90,131635,230562)" font-size="65817" text-anchor="middle">4607000</text> + <line x1="4837360" y1="230360" x2="4837360" y2="197452" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> <line x1="4837562" y1="230562" x2="4870470" y2="230562" stroke="#848482" stroke-linecap="round" stroke-width="10136"/> diff --git a/examples/Yersinia.pestis.CO92.svg b/examples/Yersinia.pestis.CO92.svg index b92f323c49a79b8888497dbfd8b25d7c5c93b78c..1b6fc94b7461b233948816941b8ae34b5e7952bb 100644 --- a/examples/Yersinia.pestis.CO92.svg +++ b/examples/Yersinia.pestis.CO92.svg @@ -23,6 +23,8 @@ <line x1="199446" y1="4886414" x2="232686" y2="4886414" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> + <text x="132965" y="4886414" transform="rotate(-90,132965,4886414)" font-size="66481" text-anchor="middle">0</text> + <line x1="232686" y1="232686" x2="232686" y2="199446" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> <line x1="4886414" y1="4886414" x2="4919654" y2="4886414" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> @@ -33,6 +35,8 @@ <line x1="199446" y1="4421114" x2="232686" y2="4421114" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> + <text x="132965" y="4421114" transform="rotate(-90,132965,4421114)" font-size="66481" text-anchor="middle">465300</text> + <line x1="697986" y1="232686" x2="697986" y2="199446" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> <line x1="4886414" y1="4421114" x2="4919654" y2="4421114" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> @@ -43,6 +47,8 @@ <line x1="199446" y1="3955814" x2="232686" y2="3955814" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> + <text x="132965" y="3955814" transform="rotate(-90,132965,3955814)" font-size="66481" text-anchor="middle">930600</text> + <line x1="1163286" y1="232686" x2="1163286" y2="199446" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> <line x1="4886414" y1="3955814" x2="4919654" y2="3955814" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> @@ -53,6 +59,8 @@ <line x1="199446" y1="3490514" x2="232686" y2="3490514" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> + <text x="132965" y="3490514" transform="rotate(-90,132965,3490514)" font-size="66481" text-anchor="middle">1395900</text> + <line x1="1628586" y1="232686" x2="1628586" y2="199446" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> <line x1="4886414" y1="3490514" x2="4919654" y2="3490514" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> @@ -63,6 +71,8 @@ <line x1="199446" y1="3025214" x2="232686" y2="3025214" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> + <text x="132965" y="3025214" transform="rotate(-90,132965,3025214)" font-size="66481" text-anchor="middle">1861200</text> + <line x1="2093886" y1="232686" x2="2093886" y2="199446" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> <line x1="4886414" y1="3025214" x2="4919654" y2="3025214" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> @@ -73,6 +83,8 @@ <line x1="199446" y1="2559914" x2="232686" y2="2559914" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> + <text x="132965" y="2559914" transform="rotate(-90,132965,2559914)" font-size="66481" text-anchor="middle">2326500</text> + <line x1="2559186" y1="232686" x2="2559186" y2="199446" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> <line x1="4886414" y1="2559914" x2="4919654" y2="2559914" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> @@ -83,6 +95,8 @@ <line x1="199446" y1="2094614" x2="232686" y2="2094614" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> + <text x="132965" y="2094614" transform="rotate(-90,132965,2094614)" font-size="66481" text-anchor="middle">2791800</text> + <line x1="3024486" y1="232686" x2="3024486" y2="199446" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> <line x1="4886414" y1="2094614" x2="4919654" y2="2094614" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> @@ -93,6 +107,8 @@ <line x1="199446" y1="1629314" x2="232686" y2="1629314" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> + <text x="132965" y="1629314" transform="rotate(-90,132965,1629314)" font-size="66481" text-anchor="middle">3257100</text> + <line x1="3489786" y1="232686" x2="3489786" y2="199446" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> <line x1="4886414" y1="1629314" x2="4919654" y2="1629314" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> @@ -103,6 +119,8 @@ <line x1="199446" y1="1164014" x2="232686" y2="1164014" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> + <text x="132965" y="1164014" transform="rotate(-90,132965,1164014)" font-size="66481" text-anchor="middle">3722400</text> + <line x1="3955086" y1="232686" x2="3955086" y2="199446" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> <line x1="4886414" y1="1164014" x2="4919654" y2="1164014" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> @@ -113,6 +131,8 @@ <line x1="199446" y1="698714" x2="232686" y2="698714" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> + <text x="132965" y="698714" transform="rotate(-90,132965,698714)" font-size="66481" text-anchor="middle">4187700</text> + <line x1="4420386" y1="232686" x2="4420386" y2="199446" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> <line x1="4886414" y1="698714" x2="4919654" y2="698714" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> @@ -123,6 +143,8 @@ <line x1="199446" y1="233414" x2="232686" y2="233414" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> + <text x="132965" y="233414" transform="rotate(-90,132965,233414)" font-size="66481" text-anchor="middle">4653000</text> + <line x1="4885686" y1="232686" x2="4885686" y2="199446" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> <line x1="4886414" y1="233414" x2="4919654" y2="233414" stroke="#848482" stroke-linecap="round" stroke-width="10239"/> diff --git a/src/RepeatPlot.java b/src/RepeatPlot.java index 3be05a8d87d1fece078b68f1029aeb3d346f65bb..dcd9c25bb02ac51dab8a9172df65547bf42dfe4e 100644 --- a/src/RepeatPlot.java +++ b/src/RepeatPlot.java @@ -34,7 +34,7 @@ import java.util.zip.*; public class RepeatPlot { //### constants ################################################################ - final static String VERSION = "1.1.220405ac Copyright (C) 2022 Institut Pasteur"; + final static String VERSION = "1.2.220405ac Copyright (C) 2022 Institut Pasteur"; static final String NOTHING = "N.o./.T.h.I.n.G"; static final int BUFFER = 1<<16; static final byte B0 = (byte) 0; @@ -91,6 +91,9 @@ public class RepeatPlot { static int nr; //## NOTE: no. regions composed by successive non-unique canonical k-mers static ArrayList<Integer> pos; //## NOTE: starting position of each of the nr selected regions static ArrayList<BitSet> albs; //## NOTE: hash values of the non-unique canonical k-mers constituting each of the nr selected regions + static int np; //## NOTE: no. pairs of similar regions + static int uf0, lf1; //## NOTE: F0, f1 + static long uf1; //## NOTE: F1 //### drawing parameters ###################################################### static double gratio; @@ -181,8 +184,8 @@ public class RepeatPlot { if ( minlgt < 25 ) { System.err.println("should be at least 25 (option -l): " + minlgt); System.exit(1); } minsucc = minlgt - K; - System.out.println("k-mer length " + K); - System.out.println("min. repeat region length " + minlgt); + System.out.println("k-mer length " + K); + System.out.println("min. repeat region length " + minlgt); //############################################################################################################# @@ -192,7 +195,7 @@ public class RepeatPlot { //############################################################################################################# filename = infile.toString(); - System.out.println("input file " + filename); + System.out.println("input file " + filename); in = ( filename.endsWith(".gz") ) ? new BufferedReader(new InputStreamReader(new GZIPInputStream(Files.newInputStream(Path.of(filename)), BUFFER))) : Files.newBufferedReader(Path.of(filename)); sb = new StringBuilder(""); @@ -207,9 +210,10 @@ public class RepeatPlot { sb = sb.append(line.toUpperCase()); } seb = sb.substring(1).replaceAll(" ", "").getBytes(StandardCharsets.UTF_8); + --c; lgt = seb.length; - System.out.println("total sequence length " + (lgt-c-1)); + System.out.println("total sequence length " + (lgt-c)); //############################################################################################################# @@ -231,6 +235,7 @@ public class RepeatPlot { default: skip = K; continue; } } + uf1 = 0; --i; while ( ++i < lgt ) { kmr <<= BSIZE; krc >>>= BSIZE; skip = ( skip > 0 ) ? --skip : skip; @@ -245,11 +250,17 @@ public class RepeatPlot { hsh = ( (kmr&=MSK) < krc ) ? kmr : krc; if ( bs.get(hsh) ) bs2.set(hsh); else bs.set(hsh); + ++uf1; } - System.out.println("no. canonical k-mers " + bs.cardinality()); + uf0 = bs.cardinality(); + lf1 = uf0 - bs2.cardinality(); - + System.out.println("total no. k-mers (F1) " + uf1); + System.out.println("no. distinct k-mers (F0) " + uf0); + System.out.println("no. unique k-mers (f1) " + lf1); + + //############################################################################################################# //############################################################################################################# //### storing the hash of each non-unique k-mer ### @@ -260,7 +271,8 @@ public class RepeatPlot { i = hsh = -1; while ( (hsh=bs2.nextSetBit(++hsh)) >= 0 ) ahsh[++i] = hsh; - System.out.println("no. non-unique k-mers " + nk); + System.out.println("no. non-unique k-mers (F0-f1) " + nk); + System.out.println("k-mer repeat index (F1-f1)/F0 " + String.format(Locale.US, "%.5f", ((uf1-lf1)/((double)uf0))));; if ( log ) oul = new BufferedWriter(new FileWriter(new File(outfile.toString() + ".log"))); @@ -316,7 +328,7 @@ public class RepeatPlot { } nr = pos.size(); - System.out.println("no. repeat regions " + nr); + System.out.println("no. repeat regions " + nr); //############################################################################################################# @@ -383,6 +395,8 @@ public class RepeatPlot { out.write(String.format(Locale.US, " <line x1=\"%d\" y1=\"%d\" x2=\"%d\" y2=\"%d\"", x0-l, y0-i, x0, y0-i)); out.write(" stroke=\"#848482\" stroke-linecap=\"round\" stroke-width=\"" + lstroke + "\"/>"); out.newLine(); out.newLine(); + out.write(String.format(Locale.US, " <text x=\"%d\" y=\"%d\" transform=\"rotate(-90,%d,%d)\" font-size=\"%d\" text-anchor=\"middle\">%d</text>", x0-l-fontsize, y0-i, x0-l-fontsize, y0-i, fontsize, i)); + out.newLine(); out.newLine(); out.write(String.format(Locale.US, " <line x1=\"%d\" y1=\"%d\" x2=\"%d\" y2=\"%d\"", x0+i, ymax, x0+i, ymax-l)); out.write(" stroke=\"#848482\" stroke-linecap=\"round\" stroke-width=\"" + lstroke + "\"/>"); out.newLine(); out.newLine(); @@ -407,6 +421,7 @@ public class RepeatPlot { out.write(" <!-- circles -->"); out.newLine(); out.newLine(); + np = 0; i = -1; while ( ++i < nr ) { bs = albs.get(i).get(0, nk); @@ -416,6 +431,7 @@ public class RepeatPlot { if ( (s=cardint(bs, albs.get(j))) > minsucc ) { out.write(String.format(Locale.US, " <circle cx=\"%d\" cy=\"%d\" r=\"%d\" fill=\"%s\" fill-opacity=\"0.6\"/>", border+pos.get(j)+albs.get(j).cardinality()/2, ci, radius(s+K_1, mradius), color)); out.newLine(); out.newLine(); + ++np; if ( log ) { oul.write("R" + (i+1) + "\tR" + (j+1) + "\t" + s); oul.newLine(); @@ -429,13 +445,17 @@ public class RepeatPlot { out.write("</svg>"); out.newLine(); out.newLine(); + System.out.println("no. pairs of similar regions " + np); + + //System.out.println("repeat index " + String.format(Locale.US, "%.9f", (index_up/(index_dn*index_dn)))); + filename = outfile.toString(); if ( log ) { - System.out.println("log file " + filename + ".log"); + System.out.println("log file " + filename + ".log"); oul.close(); } out.close(); - System.out.println("output file " + filename); + System.out.println("output file " + filename); System.out.println(""); }