dlce-eva / python-nexus

python-nexus - Generic nexus (.nex, .trees) reader/writer for python
BSD 2-Clause "Simplified" License
11 stars 3 forks source link

added option preserve_order #34

Closed Bibiko closed 2 years ago

Bibiko commented 2 years ago

added possibility to add self-calculated column labels above and under the matrix; fixed argument naming for write_to_file

codecov-commenter commented 2 years ago

Codecov Report

Merging #34 (92a843e) into master (83cda63) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master       #34   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           59        59           
  Lines         2809      2858   +49     
=========================================
+ Hits          2809      2858   +49     
Impacted Files Coverage Δ
src/nexus/util.py 100.00% <100.00%> (ø)
src/nexus/writer.py 100.00% <100.00%> (ø)
tests/test_writer.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 83cda63...92a843e. Read the comment docs.

Bibiko commented 2 years ago

As far as I can see from the docs, an empty line in a nex file is ignored. In addition, other methods are also conceivable that make it possible to set assumptions (calibrations), sets (of taxa) and location blocks, as is usual with BEAST.

xrotwang commented 2 years ago

The problem with nexus is that in reality it's defined by each single application which claims to support it. That's why I'd be very conservative when it comes to what NexusWriter outputs.

SimonGreenhill commented 2 years ago

Hi both, I'll review when I get a chance. I like the preserve_order idea but don't want to mess too much with the nexus output as @xrotwang suggested.

SimonGreenhill commented 2 years ago

thanks @Bibiko