veg / hyphy

HyPhy: Hypothesis testing using Phylogenies
http://www.hyphy.org
Other
205 stars 69 forks source link

hyphy relax Command line #1546

Closed liangjiameng closed 1 year ago

liangjiameng commented 1 year ago

Dear HyPhy team, I am running some RELAX analyses locally and I am getting confusing results. I installed HYPHY using conda, version 2.5.42.

eval "$(/histor/kang/liangjiameng/02.software/99.other/bioconda/minconda3/bin/conda shell.bash hook)"
conda activate hyphy

for i in $(less /histor/kang/liangjiameng/03.project/02.insect/Lepidoptera/04.orthologer/All/Result/single_copy_OG.txt)
do
   hyphy relax --alignment $dir/work/$i/${i}.phy --tree $dir/work/$i/final.tree.nwk -reference-group --reference HAVEERENCE --test NOON --output $dir/work/$i/${i}.RELAX.json CPU=20
done

But it shows on the screen

........
### Fitting the partitioned descriptive model (completely separate rate distributions for branch sets)
* Log(L) = -27279.84, AIC-c = 54704.21 (72 estimated parameters)
* The following rate distribution was inferred for *test* branches 

|          Selection mode           |     dN/dS     |Proportion, %|               Notes               |
|-----------------------------------|---------------|-------------|-----------------------------------|
|        Negative selection         |     0.000     |   73.115    |                                   |
|        Negative selection         |     0.517     |   26.129    |                                   |
|      Diversifying selection       |    483.297    |    0.756    |                                   |

* The following rate distribution was inferred for *reference* branches 

|          Selection mode           |     dN/dS     |Proportion, %|               Notes               |
|-----------------------------------|---------------|-------------|-----------------------------------|
|        Negative selection         |     0.008     |   73.484    |                                   |
|        Negative selection         |     0.346     |   25.408    |                                   |
|      Diversifying selection       |     2.766     |    1.108    |                                   |

HYPHY is running in calculator mode. Type 'exit' when you are finished.

I have a lot of data and can't type "exit" every time. What should I do?

spond commented 1 year ago

Dear @liangjiameng,

Try

hyphy  CPU=20 relax --alignment $dir/work/$i/${i}.phy --tree $dir/work/$i/final.tree.nwk  --reference HAVEERENCE --test NOON --output $dir/work/$i/${i}.RELAX.json

Best, Sergei

liangjiameng commented 1 year ago

Dear @liangjiameng,

Try

hyphy  CPU=20 relax --alignment $dir/work/$i/${i}.phy --tree $dir/work/$i/final.tree.nwk  --reference HAVEERENCE --test NOON --output $dir/work/$i/${i}.RELAX.json

Best, Sergei

The problem doesn't seem to be solved

Analysis Description
--------------------
RELAX (a random effects test of selection relaxation) uses a random
effects branch-site model framework to test whether a set of 'Test'
branches evolves under relaxed selection relative to a set of
'Reference' branches (R), as measured by the relaxation parameter (K).
Version 2.1 adds a check for stability in K estimates to try to mitigate
convergence problems. Version 3 provides support for >2 branch sets.
Version 3.1 adds LHC + Nedler-Mead initial fit phase and keyword
support. Version 3.1.1 adds some bug fixes for better convergence.
Version 4.0 adds support for synonymous rate variation. Version 4.1 adds
further support for multiple hit models

- __Requirements__: in-frame codon alignment and a phylogenetic tree, with at least two
groups of branches defined using the {} notation (one group can be
defined as all unlabeled branches)

- __Citation__: RELAX: Detecting Relaxed Selection in a Phylogenetic Framework (2015).
Mol Biol Evol 32 (3): 820-832

- __Written by__: Sergei L Kosakovsky Pond, Ben Murrell, Steven Weaver and Temple iGEM /
UCSD viral evolution g

- __Contact Information__: spond@temple.edu

- __Analysis Version__: 3.1.1

>code –> Universal
/histor/kang/liangjiameng/03.project/02.insect/Lepidoptera/06.ntensification_or_relaxation/work/OG10014/final.tree.nwk
/histor/kang/liangjiameng/03.project/02.insect/Lepidoptera/06.ntensification_or_relaxation/work/OG10014/final.tree.nwk

>Loaded a multiple sequence alignment with **23** sequences, **850** codons, and **1** partitions from `/histor/kang/liangjiameng/03.project/02.insect/Lepidoptera/06.ntensification_or_relaxation/work/OG10014/OG10014.phy`

>mode –> Classic mode

>test –> NOON

>reference –> HAVEERENCE
The number of points in the initial distributional guess for likelihood fitting (permissible range = [1,10000], default value = 250, integer): 
>grid-size –> 250
The number of initial random guesses to 'seed' rate values optimization (permissible range = [1,25], default value = 1, integer): 
>starting-points –> 1

### Branch sets for RELAX analysis

>multiple-hits –> None

* Selected 26 branches as the _Reference_ set: `Have_AGRAXR, Have_APAMON, Have_EILDEP, Have_EILSOR, Node12, Have_SPILXB, Have_SPILXT, Node15, Node11, Have_SCHCOS, Node10, Node8, Have_FXRFXR, Have_PTICAP, Node19, Node7, Have_CHRCXL, Have_ENDFLA, Node29, Have_HABPYR, Have_EXLPRX, Have_HYDFXR, Node38, Have_CAMMAR, Have_PERRHO, Have_ERADEF`

* Selected 10 branches as the _Test_ set: `NO_BLAADX, NO_BLALAC, Node25, NO_CARQXE, Node24, NO_DEIPOR, NO_LAOPOP, NO_MIMTIL, Node35, Node33`
* 7 branches are in the unclassified (nuisance) set: `Node23, Node22, Node6, Node5, Node4, Node3, Node2`
The number omega rate classes to include in the model (permissible range = [2,10], default value = 3, integer): 
>rates –> 3

>models –> All

>srv –> No

### Obtaining branch lengths and nucleotide substitution biases under the nucleotide GTR model

>kill-zero-lengths –> Yes
* Log(L) = -30612.05, AIC-c = 61326.19 (51 estimated parameters)
* 1 partition. Total tree length by partition (subs/site)  3.726

### Obtaining the global omega estimate based on relative GTR branch lengths and nucleotide substitution biases
* Log(L) = -27734.14, AIC-c = 55588.66 (60 estimated parameters)
* 1 partition. Total tree length by partition (subs/site)  5.004
* non-synonymous/synonymous rate ratio for *Reference* =   0.1214
* non-synonymous/synonymous rate ratio for *Test* =   0.1429
* non-synonymous/synonymous rate ratio for *Unclassified* =   0.1614

### Improving branch lengths, nucleotide substitution biases, and global dN/dS ratios under a full codon model
* Log(L) = -27555.95, AIC-c = 55232.27 (60 estimated parameters)
* non-synonymous/synonymous rate ratio for *Reference* =   0.0964
* non-synonymous/synonymous rate ratio for *Test* =   0.1228
* non-synonymous/synonymous rate ratio for *Unclassified* =   0.2109

### Fitting the general descriptive (separate k per branch) model

### * Log(L) = -27285.18, AIC-c = 54781.50 (105 estimated parameters)
* The following baseline rate distribution for branch-site combinations was inferred

|          Selection mode           |     dN/dS     |Proportion, %|               Notes               |
|-----------------------------------|---------------|-------------|-----------------------------------|
|        Negative selection         |     0.000     |   77.785    |                                   |
|        Negative selection         |     0.000     |   14.409    |                                   |
|      Diversifying selection       |    12.811     |    7.806    |                                   |

* Branch-level relaxation or intensification parameter distribution has mean  0.29, median  0.13, and 95% of the weight in  0.07 -  1.74

### Fitting the alternative model to test K != 1
* Log(L) = -27287.39, AIC-c = 54711.27 (68 estimated parameters)
* Relaxation/intensification parameter (K) =     0.69
* The following rate distribution was inferred for **test** branches

|          Selection mode           |     dN/dS     |Proportion, %|               Notes               |
|-----------------------------------|---------------|-------------|-----------------------------------|
|        Negative selection         |     0.000     |   72.176    |                                   |
|        Negative selection         |     0.516     |   27.468    |                                   |
|      Diversifying selection       |    549.666    |    0.356    |                                   |

* The following rate distribution was inferred for **reference** branches

|          Selection mode           |     dN/dS     |Proportion, %|               Notes               |
|-----------------------------------|---------------|-------------|-----------------------------------|
|        Negative selection         |     0.000     |   72.176    |                                   |
|        Negative selection         |     0.381     |   27.468    |                                   |
|      Diversifying selection       |   9998.990    |    0.356    |                                   |

### Fitting the null (K := 1) model
* Log(L) = -27292.47, AIC-c = 54719.40 (67 estimated parameters)
* The following rate distribution for test/reference branches was inferred

|          Selection mode           |     dN/dS     |Proportion, %|               Notes               |
|-----------------------------------|---------------|-------------|-----------------------------------|
|        Negative selection         |     0.000     |   71.941    |                                   |
|        Negative selection         |     0.405     |   27.669    |                                   |
|      Diversifying selection       |    405.119    |    0.390    |                                   |

----
## Test for relaxation (or intensification) of selection [RELAX]
Likelihood ratio test **p =   0.0014**.
>Evidence for *relaxation of selection* among **test** branches _relative_ to the **reference** branches at P<=0.05
----

### Fitting the partitioned descriptive model (completely separate rate distributions for branch sets)
* Log(L) = -27279.68, AIC-c = 54703.89 (72 estimated parameters)
* The following rate distribution was inferred for *test* branches 

|          Selection mode           |     dN/dS     |Proportion, %|               Notes               |
|-----------------------------------|---------------|-------------|-----------------------------------|
|        Negative selection         |     0.000     |   73.167    |                                   |
|        Negative selection         |     0.516     |   26.063    |                                   |
|      Diversifying selection       |    457.390    |    0.770    |                                   |

* The following rate distribution was inferred for *reference* branches 

|          Selection mode           |     dN/dS     |Proportion, %|               Notes               |
|-----------------------------------|---------------|-------------|-----------------------------------|
|        Negative selection         |     0.003     |   70.876    |                                   |
|        Negative selection         |     0.328     |   28.255    |                                   |
|      Diversifying selection       |     3.546     |    0.868    |                                   |

HYPHY is running in calculator mode. Type 'exit' when you are finished.
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
.......

This is the LOG file of the output

spond commented 1 year ago

Dear @liangjiameng,

This is weird. Could you do me a favor and echo the entire HyPhy command?

echo "hyphy  CPU=20 relax --alignment $dir/work/$i/${i}.phy --tree $dir/work/$i/final.tree.nwk  --reference HAVEERENCE --test NOON --output $dir/work/$i/${i}.RELAX.json"

There's something on the command line that HyPhy is interpreting as -c (calculator) mode, but I don't see what it can be!

Best, Sergei

liangjiameng commented 1 year ago

Run the normal output again

Dear @liangjiameng,

This is weird. Could you do me a favor and echo the entire HyPhy command?

echo "hyphy  CPU=20 relax --alignment $dir/work/$i/${i}.phy --tree $dir/work/$i/final.tree.nwk  --reference HAVEERENCE --test NOON --output $dir/work/$i/${i}.RELAX.json"

There's something on the command line that HyPhy is interpreting as -c (calculator) mode, but I don't see what it can be!

Best, Sergei

Run the normal output again

spond commented 1 year ago

Dear @liangjiameng,

Can you remove CPU=20 and see if the issue persists?

Best, Sergei

liangjiameng commented 1 year ago

l just ran the front desk again CPU reservation 发自我的小米在 Sergei Pond @.***>,2022年11月30日 下午10:08写道: Dear @liangjiameng, Can you remove CPU=20 and see if the issue persists? Best, Sergei

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.> [ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/veg/hyphy/issues/1546#issuecomment-1332204132", "url": "https://github.com/veg/hyphy/issues/1546#issuecomment-1332204132", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

github-actions[bot] commented 1 year ago

Stale issue message