OPAL icon indicating copy to clipboard operation
OPAL copied to clipboard

Recover ability to set all internal branch lengths equal to 1, accounting for missing internal nodes

Open dkoslicki opened this issue 5 years ago • 0 comments

Due to changes in 428cd05, the old default of setting all branch lengths to 1 resulted in things like the following. For this profile:

# Taxonomic Profiling Output
@SampleID:CAMI_LOW_S001
@Version:0.9.1
@Ranks:superkingdom|phylum|class|order|family|genus|species|strain
@@TAXID	RANK	TAXPATH	TAXPATHSN	PERCENTAGE
<snip>
0	strain	5||||0	Viruses||||Viruses strain	10

if all internal branch lengths are 1, we should get a distance of 4 between nodes 5 and 0 (due to the missing internal ranks), but now after 428cd05, this will be set to:

  • 1 if branch_length_fun=lambda x: 1
  • 5 if branch_length_fun=lambda x: x

and so a new option will need to be provided to recover the old behavior of setting all internal branch lengths to 1.

dkoslicki avatar Jun 24 '20 21:06 dkoslicki