This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Graphically visualize results from DNACLUST?

Anyone know how to graphically visualize information from DNACLUST? It outputs a file of clustered sequences. Each cluster is on its own line. Each sequence in the cluster is separated by a tab. A plot is preferable to a tree. Thanks

dnaclust cluster-analysis

2 answers

You could use various d3 utils if you could convert the output to json or xml. Example 1 and Example 2

cat input.txt
seq1    seq2    seq3
seq4    seq5    seq6    seq7    seq8
seq9    seq10
seq11

awk 'BEGIN{OFS=FS="\t"}{printf "%s\t",$1}{for(i=1;i<NF;i++)printf "%s","*"}{printf "%s\n","*"}' input.txt 
seq1    ***
seq4    *****
seq9    **
seq11   *

Or if you want to plot it somewhere else:

awk 'BEGIN{OFS=FS="\t"}{print $1,NF}' input.txt 
seq1    3
seq4    5
seq9    2
seq11   1

I don't think you can do anything fancier with the data format you described. Only first (or some other seq from the cluster and cluster size).

Log in to answer this question.