Monthly Archives: February 2012

Parsing Newick Trees

We often need to parse “newick” format phylogentic trees to figure out some information. Writing a parser is good for the soul, because the best way to do it is through recursion.

After the readmore, I provide some perl code for parsing newick phylogenetic trees into a lightweight data structure. Each node consists of an array of three things [left child, right child, and distance]. If the node is a leaf then the node consists of [“node”, the node name, and the distance]. It allows for very easy analysis of the tree, and simple ways to get data back. I also provide some example code for printing out the root-to-tip distance of every leaf in the tree.

 

Continue reading

Anonymous FTP on Edwards

We have enabled anonymous ftp on the edwards server.
If you want to share files, they should go in /home/ftp
However, that may not be convenient, as you may want to put the files in another directory.
For example, we have the phantome data in /var/www/phantome/Downloads/ but perhaps people would like to view this via ftp. However, because of the nature of proftpd security we can’t just use a symlink to get that directory to show up in /home/ftp
Therefore we need to use a linux trick:
1. make a new directory for the data
sudo mkdir /home/ftp/PhAnToMe
2. mount the existing directory at that location too
sudo mount –bind /var/www/phantome/Downloads/ /home/ftp/PhAnToMe
Now that directory appears in our ftp site and people can download data from it.
Also, note that the .message file is automatically displayed to each user when the chdir into the directory. You should put something in there so that they know what the data is.
Rob
We have enabled anonymous ftp on the edwards.sdsu.edu server, however you need to use Port 7009 to access the server.

If you want to share files, they should go in /home/ftp

However, that may not be convenient, as you may want to put the files in another directory.

For example, we have the phantome data in /var/www/phantome/Downloads/ but perhaps people would like to view this via ftp. However, because of the nature of proftpd security we can’t just use a symlink to get that directory to show up in /home/ftp

Therefore we need to use a linux trick:

1. make a new directory for the data

sudo mkdir /home/ftp/PhAnToMe

2. mount the existing directory at that location too

sudo mount –bind /var/www/phantome/Downloads/ /home/ftp/PhAnToMe

Now that directory appears in our ftp site and people can download data from it.

Also, note that the .message file is automatically displayed to each user when the chdir into the directory. You should put something in there so that they know what the data is.