Walkthrough for installation and trial use of Fasta2Structure in your browser in temporary remote sessions served via MyBinder
Benefits:
- Runs remotely so nothing modified on your machine yet you can test Fasta2Structure use hands-on.
- Almost everything is already prepared, only need to install one package (Biopython) and get the Fasta2Structure material to be demonstrated.
- No login required.
Specifically, this will use a Linux-based desktop in your browser as a place to try Fasta2Structure.
Fasta2Structure prepares data in the specific format required by the population gentics software research program STRUCTURE that was developed by Pritchard et al. 2000. See more about that software here with the current version of the STRUCTURE software (v. 2.3.4) and documentation available here.
Fasta2Structure is described in Bessa-Silva 2024 'Fasta2Structure: a user-friendly tool for converting multiple aligned FASTA files to STRUCTURE format'.
Step-by-step demonstration:
-
Go to the Spyder GitHub repository site and under 'Try Spyder online', click on the
launch binderbadge on top, or click here, to initiate launching a session. -
After the session spins up and shows a Linux desktop in your browser window, click on the '
Applications' tab in the upper left of the session desktop. The second entry should be 'Terminal Emulator'. You want to click on 'Terminal Emulator' to start a terminal on the desktop. -
To install the dependency of biopython, enter the text
pip install biopythonin the terminal and hit enter to run it. -
To get the Fasta2Structure materials, enter into the terminal
git clone https://github.com/AdamBessa/Fasta2Structure.git. (Because you are workin a virtual computer behind your browser screen, you cannot copy and paste from your local machine to the virtual computer and so you gave to type.) -
Once the materials are cloned, you need to navigate to the location of the script in the retrieved materials. Enter in the terminal
cd Fasta2Structure/and hit enter. -
Now you are ready to run Fasta2Structure. Enter in the terminal
python Fasta2Structure.pyand hit enter. -
Next a window will pop up with 'Fasta to Structure' along the top.
-
Try to follow the demo outlined after 'Usage' in the README for Fasta2Structure. Click on 'Select FASTA files' and then holding down shift, Use the file selector to select all three,
ITS.fas,trnD-trnT.fas, andtrnH-trnK.fas, at the same time, similar to illustrated below in this image found in the README here.
-
Then with the three files chose, click on the '
Open' button to trigger the conversions to start. -
Open a new terminal and cd into
Fasta2Structureagain and typecat Structure.strto see the output. That's it! Feel free to add your own data and try it now. (To make it easy to upload copy the URL of the window that you are working in. It will be something likehttps://hub.ovh2.mybinder.org/user/spyder-ide-binder-environments-hlrcuvf7/desktop/. Paste that into another browser window, and change the/desktop/at the end of the URL to/lab/and hit enter to go to that page. You can drag-and-drop files from your local system into the file navigation pane on the left side to upload them to the remote session.) You'll want to first renameStructure.strto match the input before trying another example. -
Optional additional demonstrating use: next try to follow the simpler demo outlined at README for Fasta2Structure. Make a text file with the following content, using Spyder as your text editor (launchable from the virtual computer's desktop) and save it as
test.fasin theFasta2Structredirectory (see more about that below):
>seq1
ATGCCGA
>seq2
AT-CCA
Originally, that was made short to make it easy to type because pasting into the session had to be done in the session. Now you can actually use the Clipboard Tool in the upper right to pass text into the running virutal machine. (Alternatively, you can get the text from this source in a browser window in the virtual computer. Getting a browser can be found on the desktop. Then go to google.com and search for gist and come here. Then right-click to copy and then righ-click to paste.)
Save test.fas in home/jovyan/Fasta2Structure. You can get to jovyan in Spyder's Save As window by clicking on the 'Computer' icon and drilling down.
-
Back in the window with the 'Fasta to Structure' application running, click on the
test.fasyou just saved. -
Open a new terminal and cd into
Fasta2Structureagain and typecat Structure.strto see the output.
