hclust2.py --fname_row --sname_row --metadata_rows

381 views
Skip to first unread message

Jamie Kwok

unread,
Apr 10, 2017, 12:45:22 AM4/10/17
to MetaPhlAn-users
Hello,

The example heatmap on your website with the metadata (body site, etc.) at https://bitbucket.org/nsegata/hclust2/overview is beautiful, but I cannot get hclust2.py to run when I have metadata row. My data's first three lines:
group case case case case case case control control case control control control case case case control case case case control case control case control control case
ID NM104 NM105 NM106 NM120 NM127 NM12 NM135 NM136 NM139 NM142 NM144 NM14 NM152 NM17 NM20 NM22 NM25 NM33 NM35 NM41 NM52 NM5 NM66 NM67 NM69 NM74
s__Crenarchaeota_archaeon_SCGC_AAA471_B05 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03586 0 0.06

My command:
/home/jamie/metaphlan2/utils/hclust2/hclust2.py -i eczema_iontorrent_merged_abundance_table.s_or_kpcofg_unclassified.with_group.tsv -o abundance_heatmap.s_or_kpcofg_unclassified.with_group.png --fname_row 0 --metadata_row 0 --sname_row 1 --ftop 25 --f_dist_f braycurtis --s_dist_f braycurtis --cell_aspect_ratio 0.5 -l --flabel_size 6 --slabel_size 6 --max_flabel_len 100 --max_slabel_len 100 --minv 0.1 --dpi 300

The error:
...
File "/home/jamie/.local/lib/python2.7/site-packages/scipy/stats/stats.py", line 1625, in _compute_qth_percentile
return np.add.reduce(sorted[indexer] * weights, axis=axis) / sumval
TypeError: ("can't multiply sequence by non-int of type 'float'", u'occurred at index NM104')

I'm guessing that --fname_row mean the species *column*, am I correct?
Please kindly help. Thank you very much.

Best regards,
Jamie

Nicola Segata

unread,
Apr 10, 2017, 8:44:17 AM4/10/17
to Jamie Kwok, MetaPhlAn-users
Hi Jamie,
 can you send your input file (or a fraction of it that is still giving the error) so we can better understand the problem?
thanks
Nicola

--
You received this message because you are subscribed to the Google Groups "MetaPhlAn-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to metaphlan-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nicola Segata

unread,
Apr 12, 2017, 9:33:48 AM4/12/17
to Jamie Kwok, MetaPhlAn-users
Hi Jamie,
 based on your file, you would need the set "--fname_row 0 --metadata_row 1 --sname_row 0". But also you need to swap the first two lines in your input file because it seems there is a small bug I'll need to fix.
thanks
Nicola 

Jamie Kwok

unread,
Apr 13, 2017, 5:33:07 AM4/13/17
to MetaPhlAn-users
Hi Nicola,

Thank you very much! It works well.

Best regards,
Jamie

To unsubscribe from this group and stop receiving emails from it, send an email to metaphlan-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages