Skip to content

abrozzi/SplitstRee

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SplitstRee

SplitsTree, an open-source project developed by the University of Tuebingen, is a versatile application offering a plethora of algorithms and tools for processing both unrooted and rooted phylogenetic trees and networks. Accessible through the following link: SplitsTree, it empowers users with a comprehensive suite of functionalities.

For local installation, users can download SplitsTree from: Download SplitsTree. Once installed, SplitsTree enables users to upload alignments or trees, providing a dendrogram-like visualization. Each input sequence is represented as a tip with a corresponding label, while inner nodes and edges connect these tips or nodes, forming the network.

In downstream analyses, users often require tasks such as coloring tips based on attributes, highlighting specific network components, or modifying label text. SplitsTree facilitates these operations through its View tab, offering options to format nodes and edges. However, manual navigation and clicking are necessary for selections.

To streamline network formatting tasks and leverage the robust capabilities of R, users can utilize the present SplitstRee R package.

This integration enhances the rendering of networks generated by SplitsTree, harnessing the full potential of the R environment.

Installation

install.library("devtools")
install_git(https://github.com/abrozzi/SplitstRee.git)

How to export network from SplitsTree

Use the tab File -> Export to export the network including mandatory fields Taxa and Network. You can select also other fields. The file format is a text file. The exported network should look like the following:

#nexus

BEGIN Taxa;
DIMENSIONS ntax=140;
TAXLABELS
[1] '88'
[2] '89'
[3] '110'
[4] '111'
[5] '112'
;
END; [Taxa]

BEGIN Trees;
PROPERTIES rooted=yes;
[TREES]
[1] tree 't1'=[&R] (121:0.1484583917587429,(47:0.10443825927426448,105:0.10832991141364293):0.007390799743357943):0.004345286343588104,((((97:0.1123931641820975,(8:0.09844731583656807,28:0.0973001623178561):0.00916006309308222):0.005493354891964678)
END; [Trees]


BEGIN Network;
DIMENSIONS ntax=140 nvertices=278 nedges=277;
DRAW to_scale;
TRANSLATE
2 '88',
3 '86',
4 '95',
;
VERTICES
1 -0.100395784 0.0 s=n,
2 0.0 0.0 s=n,
3 0.0039716596 0.012728599 s=n,
4 0.0079152705 0.015233612 s=n,
5 0.039169874 0.021456474 s=n
;
VLABELS
2 '88' x=12 y=-74 f='Dialog-PLAIN-10',
3 '86' x=12 y=156,
4 '95' x=12 y=122,
5 '10' x=12 y=22,
;
EDGES
1 1 2 s=163 w=0.100395784,
2 142 1 s=187 w=0.0109897,
;
END; [Network]

The package provides a real example of an export file from SplitsTree:

myfile <- system.file("input.nexus", package = "SplitstRee")

To read the network inside R use:

net <- import.nexus(myfile)

Troubleshooting

SSH key for Mac and github

I had some troubles with git push. Basically everytime I was doing a push a pop-up window saied "Username for https://github.com". Next message was to insert password, but nothing worked. Surfing a bit the web,I found the solution which worked for me.

  1. Open terminal and type:

ssh-keygen -t ed25519 -C "myemail@something.com"

ed25519 is an algorithm.

  1. Create a file:

nano ~/.ssh/config

  1. Insert in the file
Host github.com
 AddKeysToAgent yes
 UseKeychain yes
 IdentityFile ~/.ssh/id_ed25519
  1. In the terminal

ssh-add --apple-use-keychain ~/.ssh/id_ed25519

  1. Finally in the project Settings tab of github.com add a Deploy Key:

cat /Users/abrozzi/.ssh/id_ed25519.pub

which is something like:

ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILFBLSrDAAI2U21mDcSddnQjgouGfGXfr8AfQ8SQNzJb alessandro.brozzi@gmail.com

copy paste and add a title in github.com.

Git and RStudio

1 - Create by RStudio a project to build a package:

~/ab/mypack

2 - Create a repository on GitHub

3 - Move to the local package directory and:

cd ~/ab/mypack

git init

git add .

git commit -m "first commit"

git remote add origin https://github.com/ab/mypack.git

git push -u origin master

4 - In Rstudio you can do the same by Git menu: commit -> push-

5 - If you need proxy add in your home a file .Renviron with the following lines:

http_proxy="http://myproxy.net:port{.uri}"

https_proxy="https://myproxy.net:2011"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published