Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only output log file but can not genenrate the json file #1757

Open
aaannaw opened this issue Nov 10, 2024 · 6 comments
Open

Only output log file but can not genenrate the json file #1757

aaannaw opened this issue Nov 10, 2024 · 6 comments

Comments

@aaannaw
Copy link

aaannaw commented Nov 10, 2024

Dear author,
I am running the command: hyphy relax --alignment /data/01/p1/user157/Bathyergidae-sociaty/2024812.newcactus/03.proteincoding-selected-analysis/01.getgene/07.deletestopcodon/evm.model.ptg000001l.100.fa --tree /data/01/p1/user157/Bathyergidae-sociaty/2024812.newcactus/03.proteincoding-selected-analysis/01.getgene/13.hyphy/02.relax/00.tree/evm.model.ptg000001l.100.phy.treefile.mark --test FG2 --reference FG1 --output /data/01/p1/user157/Bathyergidae-sociaty/2024812.newcactus/03.proteincoding-selected-analysis/01.getgene/13.hyphy/02.relax/01.relax.out/evm.model.ptg000001l.100.json > /data/01/p1/user157/Bathyergidae-sociaty/2024812.newcactus/03.proteincoding-selected-analysis/01.getgene/13.hyphy/02.relax/01.relax.out/evm.model.ptg000001l.100.relax.log 2>&1;
My tree : (Fan{FG1},((((((((Hcr,Cgu),(Tsw,Pty)),Hgl{FG1}),(Gca{FG2},Bsu{FG2})),Cho{FG1}),Fme{FG1}),Fda{FG1}),Fdm{FG1}),Fmi{FG1});
My alignment file:
image
However, I only got the log file but can not generate the json file. The log file looks like normal and is attached.
evm.model.ptg000001l.100.relax.log

Could you give me any suggestions?
Looking forward with your reply.
Best wishes,
Na Wan

@aaannaw
Copy link
Author

aaannaw commented Nov 11, 2024

Dear author,
I find the json file is generated in the directory containing input fasta file. It seems that the --output parameter does not work.
Could you give me any suggestions?
Best wishes,
Na Wan

@spond
Copy link
Member

spond commented Nov 11, 2024

Dear @aaannaw,

Based on the version of RELAX (3.1) it looks like you are running an older version of hyphy and RELAX. The current RELAX version is 4.5. Could you check what hyphy --version outputs?

If you upgrade to the most recent version of hyphy, the --output flag should work as expected.

Best,
Sergei

@aaannaw
Copy link
Author

aaannaw commented Nov 11, 2024

Dear author,
Thanks for your response.
I execute the hyphy --version and the screen displsys:
HYPHY 2.5.2(MP) for Linux on x86_64
Then I try to install the latest version of Hyphy by building from the source and the "/data/01/p1/user157/software/hyphy/bin/hyphy --version" command displays:
HYPHY 2.5.63(MP) for Linux on x86_64 x86 SSE4 SIMD zlib (v1.2.11)
I try to run the command /data/01/p1/user157/software/hyphy/bin/hyphy relax --alignment /data/01/p1/user157/Bathyergidae-sociaty/2024812.newcactus/03.proteincoding-selected-analysis/01.getgene/07.deletestopcodon/evm.model.ptg000001l.100.fa --tree /data/01/p1/user157/Bathyergidae-sociaty/2024812.newcactus/03.proteincoding-selected-analysis/01.getgene/13.hyphy/02.relax/00.tree/evm.model.ptg000001l.100.phy.treefile.mark --test FG2 --reference FG1 --output /data/01/p1/user157/Bathyergidae-sociaty/2024812.newcactus/03.proteincoding-selected-analysis/01.getgene/13.hyphy/02.relax/01.relax.out/evm.model.ptg000001l.100.json > /data/01/p1/user157/Bathyergidae-sociaty/2024812.newcactus/03.proteincoding-selected-analysis/01.getgene/13.hyphy/02.relax/01.relax.out/evm.model.ptg000001l.100.relax.log 2>&1; and the json file was generated in the output directory.
Thanks very much!
Best wishes,
Na Wan

@spond
Copy link
Member

spond commented Nov 11, 2024

Dear @aaannaw,

HyPhy will read its library files from the current working directory or from the systemwide library directory /usr/local/share/hyphy. This means that most likely the command you executed used the latest binary, but an older version of relax. You can check this by seeing which version of relaxwas reported to the log file.

You can provide LIBPATH=/path/to/library on the command line to tell hyphy where to find its library files. It's probably in /data/01/p1/user157/software/hyphy/res. The directory structure for the library should look like this

tree -L 1 /usr/local/share/hyphy
/usr/local/share/hyphy
├── GeneticCodes
├── SubstitutionClasses
├── SubstitutionModels
├── TemplateBatchFiles
├── data
├── references
└── scoring

Make sure relax displays this on stdout when you run it


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. Version 4.1.1 adds reporting
for convergence diagnostics. Version 4.5 adds support for multiple
datasets for joint testing.

- __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__: [email protected]

- __Analysis Version__: 4.5

Best,
Sergei

@aaannaw
Copy link
Author

aaannaw commented Nov 12, 2024

Dear author,
Thanks for your response.
(1) When I execute the /data/01/p1/user157/software/hyphy/bin/hyphy relax --version, the stdout displays HYPHY 2.5.63(MP) for Linux on x86_64 x86 SSE4 SIMD zlib (v1.2.11) but not RELAX (3.1).
(2) My directory structure for the library only include five sub directories not seven:

tree -L 1 /data/01/p1/user157/software/hyphy/res
/data/01/p1/user157/software/hyphy/res
├── data
├── GeneticCodes
├── SubstitutionClasses
├── SubstitutionModels
└── TemplateBatchFiles

5 directories, 0 files

(3) When I run the command:

/data/01/p1/user157/software/hyphy/bin/hyphy relax --alignment /data/01/p1/user157/Bathyergidae-sociaty/2024812.newcactus/03.proteincoding-selected-analysis/01.getgene/07
.deletestopcodon/evm.model.ptg000813l.8.fa --tree /data/01/p1/user157/Bathyergidae-sociaty/2024812.newcactus/03.proteincoding-selected-analysis/01.getgene/13.hyphy/02.relax
/00.tree/evm.model.ptg000813l.8.phy.treefile.mark --test FG2 --reference FG1 --output  test.json

The similar information was generated on the stdout:

multiple-files: No

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. Version 4.1.1 adds reporting
for convergence diagnostics. Version 4.5 adds support for multiple
datasets for joint testing.                                         
                 
- __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__: [email protected]                                                                                                                                                                                                                        
- __Analysis Version__: 4.5
->code => Universal
-------
>[WARNING]
'/data/01/p1/user157/Bathyergidae-sociaty/2024812.newcactus/03.proteincoding-selected-analysis/01.getgene/07.deletestopcodon/evm.model.ptg000813l.8.fa'
contains 3 duplicate sequences. Identical sequences do not contribute
any information to the analysis and only slow down computation. Please
consider removing duplicate or 'nearly' duplicate sequences, e.g. using
https://github.com/veg/hyphy-analyses/tree/master/remove-duplicates
prior to running selection analyses

I am not sure whether the command can run normally despite these warning messages for multiple-files: No and /data/01/p1/user157/Bathyergidae-sociaty/2024812.newcactus/03.proteincoding-selected-analysis/01.getgene/07.deletestopcodon/evm.model.ptg000813l.8.fa contains 3 duplicate sequences

Could you give me any suggestions?
Best wishes,
Na Wan

@spond
Copy link
Member

spond commented Nov 18, 2024

Dear @aaannaw,

When you run from the install directory (as in your step 3), hyphy will correctly pick up the latest RELAX file. You can ignore the warning messages; the analysis will run normally.

You could also specify LIBPATH=/data/01/p1/user157/software/hyphy/res as a command line argument to ask HyPhy to look for its library files there.

Best,
Sergei

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants