Running Hyphy Batch File
0
0
Entering edit mode
3.2 years ago
sadstudent • 0

Hello there,

Im trying to run multiple files in hyphy (LEISR). However, the script is only for single execution as shown below : runLEISR.bf

LoadFunctionLibrary("LEISR.bf", { "0": "<full_path>/ file1.fasta", # alignment file "1": "<full_path>/tree.nhx", # tree file "2": "Protein", # analysis type "3": "JTT", # model type "4": "No"}); # use a model of rate heterogeneity when optimizing branch lengths

How can i alter this script to allow looping for over multiple input files ?

Hyphy Leisr Batch File linux • 1.1k views
ADD COMMENT
0
Entering edit mode

I haven't used LEISR in hyphy suite, but I have used RELAX in hyphy suite as below for many files in a for loop. you can do some modifications. for each fasta and its corresponding tree file, you should arrange names. For example;

file1.fasta and file1.tree

to arrange names you can do; lets say your files start with OG

for i in OG* ; do mv -- "$i" "${i/%.fa/.fasta}" ; done

this command will change .fa to .fasta

then you can run hyphy LEISR as below with some modifications based on its usage

#!/usr/bin/bash
for f in *fasta; do hyphy RELAX --alignment "$f" --tree "${f%.fasta}.tree" --test Foreground ; done
ADD REPLY
0
Entering edit mode

Thank you for your suggestion, however this solution does not work with LEISR as it will prompt the interactive form. In addition, there are no help option under this approach for me to use as a guide.

ADD REPLY

Login before adding your answer.

Traffic: 2436 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6