checkpoint - sungsik-kong/PhyNEST.jl GitHub Wiki
Parsing the input alignment using readPhylip(args)
is typically efficient, however, it can take some time particularly when the input alignment size is large. Sometimes a user may would like to conduct multiple analysis using the same data; for example, when running the network analyses in different settings. In such scenarios, checkpointing can be useful.
The checkpoint .ckp
file is optionally created when parsing the input sequence alignment using readPhylip(args)
. Using the function readCheckpoint(arg)
, we can back-transform the .ckp
file to the data object. The one and only mandatory argument is the .ckp
file.
Using the sample_n5h1.phy.ckp
file created in the previous task, it only took 0.001698 seconds to back-transform the sample_n5h1.phy.ckp
into the data object on my machine, which originally took 26.123 seconds using readPhylip(args)
.
julia> @time phylip_data=readCheckPoint("sample_n5h1.phy.ckp")
Click here to see the output
julia> @time phylip_data=readCheckPoint("sample_n5h1.phy.ckp")
0.001698 seconds (5.84 k allocations: 490.103 KiB)
Summary of Phylip File
Parsing the file [sample_n5h1.phy] took 26.123 seconds.
Number of taxa: 5
Species names: ["outgroup", "species_4", "species_3", "species_1", "species_2"]
Alignment length (b.p): 1000000
Site patterns frequencies for 120 quartets computed and stored.
Try `show_sp()` function to see all quartet site patterns.
Next: Inference