[Bioc-devel] Python Z trees to hclust

Peter Langfelder peter@|@ng|e|der @end|ng |rom gm@||@com
Sat Aug 3 20:41:56 CEST 2019


Hi Bernat,

my advice may not be that useful, but it may be better than the
silence so far...

Regarding the ordering of objects in hclust, if you're willing to do a
bit of hacking, have a look at the stats::hclust function; you will
see that the ordering is computed by a call to Fortran function
hcass2. That function could be used or perhaps adapted (it uses an
additional step that you will probably need to skip) to give you the
ordering. If you're good at understanding Fortran code, you may even
be able to re-write it directly in R.

Peter

On Tue, Jul 30, 2019 at 12:39 AM Bernat Gel Moreno <bgel using igtp.cat> wrote:
>
> Hi,
>
> For one of our packages (CopyNumberPlots) we'll need to read 10X CNV
> data in H5 format. I've read in everything I need except for the cell
> clustering tree. It's in a format called Z format produced by SciPy
> hierarchical clustering. The format itself is relatively easy to parse
> and not so different from hclust return objects so it would be possible
> to create a small function to translate the Z notation into an hclust
> object, if needed, but I'll need to figure out the "order" vector, since
> it's not present in Z.
>
>    - Is the Z to hclust function available in any other package? Or
> something equivalent to that?
>    - If I end up transforming it by hand in a custom function, Is there
> a function somewhere to compute the order vector in an hclust object?
>
> Thanks
>
> Bernat
>
>
> _______________________________________________
> Bioc-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel



More information about the Bioc-devel mailing list