Giter VIP home page Giter VIP logo

phydms's Introduction

phydms

https://travis-ci.org/jbloomlab/phydms.svg?branch=master

phydms enables phylogenetic analyses using deep mutational scanning data to inform the substitution models. It implements Experimentally informed codon models (ExpCM) for phylogenetic inference and the detection of biologically interesting selection.

phydms is written by the Bloom lab (see https://github.com/jbloomlab/phydms/contributors for a full list of contributors).

See the phydms documentation for information about using phydms and details about the recommended installation process.

The phydms source code is freely available under a GPLv3 license.

If you use phydms, please cite it appropriately.

phydms's People

Contributors

adingens avatar gavinmdouglas avatar jbloom avatar mbdoud avatar skhilton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

phydms's Issues

some tweaks to phydms_testdivpressure

  1. In the script itself, don't use file as a variable name. Replace with fname or something that isn't a Python reserved keyword.
  2. Right now the names in the final output file are funny with the directory name is something like phydms_results/ as the files get split at this underscore. Also wasn't clear to me why both file and name were needed, but maybe they are.
  3. Update the documentation to show a model comparison file with the actual output format.

`phydms_testdivpressure` broken

@skhilton: This program is currently broken and fails the test. I think the problem is that the expected name of the log files has changed from *.log to *_log.log after your recent changes.

This seems low priority until we get existing functionality implemented, but maybe fix this and then expand the test_phydms_testdivpressure.py test to both run correctly and test for the expected output. I will be putting an example of such test for test_phydms_comprehensive.py shortly, and maybe you can build off that. I don't think we want to test for exact equality, but rather approximate equality.

Can phydms calculate dN/dS ratios for entire genes in phylogeny?

Hi there,

I wanted to ask if phydms could calculate dN/dS ratios of tree leaves? I work with intra-celullar immune receptors. I have sequence and annotate this gene family across several individuals (sweetpotato cultivars). I generated amino acid phylogenies and now I am interested in improving my understanding of the phylogeny. I would like to color code my phylogeny based on genes that are experiencing diversifying selection. A dN/dS ratio for each gene would do the trick. However, I have tried running this on PAML and it has had issues with the number of sequences. If this is possible, I would like to give it a try. Would you recommend other software to accomplish this? Thanks

Camilo

phydms_plotselection

Hi,
I am trying to run an analysis using phydms_plotselection after phydms but this program does not seem to be present in the repository, so I keep getting "no such file or directory" errors even after importing. Where can I access this code? Thanks.

`--brlen` does not accept "fix" as an argument

command: phydms NP_data/NP_alignment.fasta NP_data/NP_tree.newick YNGKP_M0 testOut/ --brlen fix

The data is the NP data in the tests directory.

error:

File "/Users/sarah/Library/Python/3.5/lib/python/site-packages/phydms-2.0.dev0-py3.5-macosx-10.6-intel.egg/EGG-INFO/scripts/phydms", line 223, in main
    raise ValueError("Invalid brlen {0}".format(args['brlen']))
ValueError: Invalid brlen fix

check `divPressureValues` in `ExpCM_empirical_phi_divpressure`

@skhilton: Things are only guaranteed to work if the divPressureValues are normalized so that their absolute values are between 0 and 1. Otherwise you can end up with negative rates. But currently there is no check on these values in the ExpCM_empirical_phi_divpressure class __init__ method.

Therefore, the method is not guaranteed to work. In practice the values may be checked in the program calling this class, but this is not guaranteed if the program is re-implemented so such a check should be added and the documentation should reflect this limit on the values.

This check can be instituted via checkParam as for g in ExpCM_empirical_phi.

Typo in tutorial?

Hi there,

I believe this is a typo in the tutorial:

df["preference"] = [max(minenrichment, (10**df["Trial_1_AmpConc_2500"][x] + 10**df["Trial_1_AmpConc_2500"][x])/2) for x in range(len(df))]

I'm assuming that line is meant to calculate the mean of the Trial_1_AmpConc_2500 and Trial_2_AmpConc_2500, but Trial_1_AmpConc_2500 is specified each time.

Cheers,

Gavin

`scipy` convergence but Jacobian still large

Here is a run with a large H1 tree with the following error:

RuntimeError: Even though optimizer reports convergence, the maximum element in the Jacobian is too large: 2903.287319203765
Here is the summary from the optimization:
['Step 1: optimized parameters, loglik went from -19873.64 to -17170.75 (18 iterations, 27 function evals)', 'Step 2: optimized branches, loglik went from -17170.75 to -17168.14 (50 iterations, 59 function evals)', 'Step 3: optimized parameters, loglik went from -17168.14 to -17168.12 (4 iterations, 8 function evals)', 'Step 4: optimized branches, loglik went from -17168.12 to -17168.12 (1 iterations, 4 function evals)']
[jacobian_error.zip](https://github.com/jbloomlab/phydms/files/1002039/jacobian_error.zip)

`phydms_prepalignment` protein dictionary key error

phydms_prepalignment is throwing an error when it tries to look up certain sequences in a dictionary of protein sequences during the mafft protein alignment.

Here is the error message and I've attached the files to recreate the error.

Beginning execution of phydms_prepalignment in directory /home/shilton/phydms_prepalignment_error at time Tue Jan  7 12:52:01 2020

Version information:
	Time and date: Tue Jan  7 12:52:01 2020
	Platform: Linux-3.13.0-143-generic-x86_64-with-debian-jessie-sid
	Python version: 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34)  [GCC 7.3.0]
	phydms version: 2.3.1
	Bio version: 1.73
	cython version: 0.25.2
	numpy version: 1.15.0
	scipy version: 1.2.1
	matplotlib version: 3.0.3
	natsort version: 5.2.0
	sympy version: 1.0
	six version: 1.11.0
	pandas version: 0.23.4
	pyvolve version: 0.8.4
	statsmodels version: 0.8.0
	weblogolib version: 3.5.0
	PyPDF2 version: 1.26.0

Parsed the following command-line arguments:
	inseqs = bird.fasta
	alignment = out.fasta
	refseq = CY101265
	prealigned = False
	mafft = mafft
	minidentity = 0.7
	minuniqueness = 2
	purgeseqs = None
	keepseqs = None

Read 8 sequences from bird.fasta
Retained 8 after removing those specified for purging by '--purgeseqs.'
Retained 8 sequences after removing any with length not multiple of 3.
Retained 8 sequences after purging any with ambiguous nucleotides.
Retained 8 sequences after purging any with premature stops or that are otherwise un-translateable.
Using the following as reference sequence: gb:CY101265:13-2292|Organism:Influenza A virus (A/ruddy turnstone/Delaware Bay/136/1999(H3N2))|Strain Name:A/ruddy turnstone/Delaware Bay/136/1999|Protein Name:PB2 Polymerase (basic) protein 2|Gene Symbol:PB2|Segment: 1|Subtype:H3N2|Host:Ruddy Turnstone
Purged sequences encoding redundant proteins, being sure to retain reference sequence and any specified by '--keepseqs'. Overall, 7 sequences remain.
Aligning sequences with MAFFT using mafft b'v7.313 (2017/Nov/15)'
Traceback (most recent call last):
  File "/home/shilton/miniconda3/bin/phydms_prepalignment", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
  File "/home/shilton/phydms/scripts/phydms_prepalignment", line 354, in <module>
    main() # run the script
  File "/home/shilton/phydms/scripts/phydms_prepalignment", line 265, in main
    alignment = MAFFT_CDSandProtAlignments(seqs_unique + seqs_alwayskeep, args['mafft'], args['alignment'])
  File "/home/shilton/phydms/scripts/phydms_prepalignment", line 67, in MAFFT_CDSandProtAlignments
    prot = prot_d[head]
KeyError: 'gb_CY145192_16-2295|Organism_Influenza_A_virus__A/ruddy_turnstone/New_Jersey/Sg-00519/2008_H3N2__|Strain_Name_A/ruddy_turnstone/New_Jersey/Sg-00519/2008|Protein_Name_PB2_Polymerase__basic__protein_2|Gene_Symbol_PB2|Segment__1|Subtype_H3N2|Host_Ruddy_Turn'

Bernadetta found this error when she was trying to align PB2 sequences. I did some initial troubleshooting and found that the error was thrown when some sequences were included but not when all sequences were included (we could manually remove the "bad" sequences). I think that this might have to do with replacing characters in the header but I am not sure.

phydms_prepalignment_error.zip

hacked solution to nan problem with useLog and negative infinity problem without useLog

Laurent added a useLog option into the newlik branch of bpp-phyl in Bio++ (https://groups.google.com/forum/#!topic/biopp-devel-forum/2mX2ukZWXv4). This option fixes problems with numerical problems for certain trees that was causing likelihoods of zero (log likelihoods of infinity) for phydms using ExpCM, particularly during differential preference fitting.

In order to make the useLog option not give log likelihoods of nan when there are short branches, Laurent had to push a commit (this is bpp-phyl newlik commit 05a0e827f04bbb59448afe9247d947a2a926e19e) that makes the Bio++ method AbstractSubstitutionModel::getPij_t return the identity matrix for very short branch lengths. However, this created a new problem -- topology inference using the YNGKP model now would get stuck, probably because short branches became equivalent.

So in order to allow useLog to be used effectively with ExpCM while not breaking topology inference, I have written a method in ExperimentallyInformedCodonModels that overrides the AbstractSubstitutionModel method getPij_t when there are short branch lengths (this is phydms master commit ca150e5). I then reverted bpp-phyl back to commit e64cc6e165dff175c99e985e3efec3f188a1c59c so that it uses the older getPij_t.

This hacked solution seems to work for now to enable topology inference while also avoiding problems with differential preference inference when using ExpCM.

However, bpp-phyl is now behind the latest newlik commit, and this whole solution is rather hacked together.

The ultimate resolution of this issue will presumably require changing Bio++ itself so that topology inference is compatible with the most recent newlik bpp-phyl.

`--diffprefsbysite` does **not** work with `--gammaomega`

The current error in version 2.0.dev2 is

File "/home/jbloom/.local/lib/python2.7/site-packages/phydms-2.0.dev2-py2.7-linux-x86_64.egg/EGG-INFO/scripts/phydms", line 69, in fitDiffPrefsBySite
    diffprefs = treelik.model.pi[0] - treelik.model.origpi[0]
AttributeError: 'GammaDistributedOmegaModel' object has no attribute 'pi'

The basic problem appears to be the the pi values need to be made accessible from the GammaDistributedModel.

FloatingPointError: divide by zero encountered in true_divide

When running the Exp_CM model, the error below keeps coming up. This occurs even when running on the beta_lactamase dataset given as an example:

module load python/python-anaconda3.2019.7
phydms betaLactamase_alignment.fasta.phy.fasta betaLactamase_alignment.fasta.phy_phyml_tree.txt ExpCM_betaLactamase_prefs.txt test.out
/powerapps/share/python-anaconda-3.2019.7/lib/python3.7/site-packages/Bio/Alphabet/__init__.py:26: PendingDeprecationWarning: We intend to remove or replace Bio.Alphabet in 2020, ideally avoid using it explicitly in your code. Please get in touch if you will be adversely affected by this. https://github.com/biopython/biopython/issues/2046
  PendingDeprecationWarning)
2020-01-09 16:57:12,435 - INFO - Beginning execution of phydms in directory /sternadi/home/volume1/sternadi/CVB3_RG/test

2020-01-09 16:57:12,436 - INFO - Progress is being logged to test.out_log.log

2020-01-09 16:57:12,436 - INFO - Version information:
	Time and date: Thu Jan  9 16:57:08 2020
	Platform: Linux-3.10.0-514.el7.x86_64-x86_64-with-centos-7.3.1611-Core
	Python version: 3.7.3 (default, Mar 27 2019, 22:11:17)  [GCC 7.3.0]
	phydms version: 2.3.6
	Bio version: 1.74
	cython version: 0.29.12
	numpy version: 1.16.4
	scipy version: 1.3.0
	matplotlib version: 3.1.0
	natsort version: 6.0.0
	sympy version: 1.4
	six version: 1.12.0
	pandas version: 0.24.2
	pyvolve version: 1.0.0
	statsmodels version: 0.10.0
	weblogolib version: 3.5.0
	PyPDF2 version: 1.26.0

2020-01-09 16:57:12,437 - INFO - Parsed the following arguments:
	alignment = betaLactamase_alignment.fasta.phy.fasta
	tree = betaLactamase_alignment.fasta.phy_phyml_tree.txt
	model = ('ExpCM', 'betaLactamase_prefs.txt')
	outprefix = test.out
	brlen = optimize
	gammaomega = False
	gammabeta = False
	omegabysite = False
	omegabysite_fixsyn = False
	diffprefsbysite = False
	diffprefsprior = ('invquadratic', 150.0, 0.5)
	fitphi = False
	randprefs = False
	avgprefs = False
	divpressure = None
	ncpus = 1
	fitprefsmethod = 2
	ncats = 4
	minbrlen = 1e-06
	minpref = 0.002
	seed = 1
	initparams = None
	profile = False
	opt_details = False
	nograd = False

2020-01-09 16:57:12,437 - INFO - Random number seed: 1

2020-01-09 16:57:12,438 - INFO - Reading alignment from betaLactamase_alignment.fasta.phy.fasta
2020-01-09 16:57:13,083 - INFO - Read 50 aligned sequences from betaLactamase_alignment.fasta.phy.fasta, each consisting of 263 codons.

2020-01-09 16:57:13,084 - INFO - The model will be an ExpCM informed by site-specific amino-acid preferences in betaLactamase_prefs.txt
2020-01-09 16:57:14,735 - INFO - Successfully read site-specific amino-acid preferences for all 263 sites.

2020-01-09 16:57:14,736 - INFO - Nucleotide frequency parameters phi will be set so stationary state matches alignment nucleotide frequencies of A = 0.239, C = 0.269, G = 0.292, T = 0.201

2020-01-09 16:57:15,055 - ERROR - Terminating phydms at Thu Jan  9 16:57:15 2020 with ERROR
Traceback (most recent call last):
  File "/powerapps/share/python-anaconda-3.2019.7/bin/phydms", line 299, in main
    freeparams=freeparams)
  File "/powerapps/share/python-anaconda-3.2019.7/lib/python3.7/site-packages/phydmslib/models.py", line 1279, in __init__
    omega=omega, beta=beta, mu=mu, freeparams=freeparams)
  File "/powerapps/share/python-anaconda-3.2019.7/lib/python3.7/site-packages/phydmslib/models.py", line 434, in __init__
    self.updateParams({}, update_all=True)
  File "/powerapps/share/python-anaconda-3.2019.7/lib/python3.7/site-packages/phydmslib/models.py", line 539, in updateParams
    self._update_Frxy()
  File "/powerapps/share/python-anaconda-3.2019.7/lib/python3.7/site-packages/phydmslib/models.py", line 706, in _update_Frxy
    / (1 - self.piAx_piAy_beta), where=scipy.logical_and(
FloatingPointError: divide by zero encountered in true_divide
Traceback (most recent call last):
  File "/powerapps/share/python-anaconda-3.2019.7/bin/phydms", line 551, in <module>
    main() # run the script
  File "/powerapps/share/python-anaconda-3.2019.7/bin/phydms", line 299, in main
    freeparams=freeparams)
  File "/powerapps/share/python-anaconda-3.2019.7/lib/python3.7/site-packages/phydmslib/models.py", line 1279, in __init__
    omega=omega, beta=beta, mu=mu, freeparams=freeparams)
  File "/powerapps/share/python-anaconda-3.2019.7/lib/python3.7/site-packages/phydmslib/models.py", line 434, in __init__
    self.updateParams({}, update_all=True)
  File "/powerapps/share/python-anaconda-3.2019.7/lib/python3.7/site-packages/phydmslib/models.py", line 539, in updateParams
    self._update_Frxy()
  File "/powerapps/share/python-anaconda-3.2019.7/lib/python3.7/site-packages/phydmslib/models.py", line 706, in _update_Frxy
    / (1 - self.piAx_piAy_beta), where=scipy.logical_and(
FloatingPointError: divide by zero encountered in true_divide

DMS2_batch_prefs MCMC does not converge on certain ENV sites

There is a readme file within the zipped folder that describes the issue in more detail and how to reproduce it, but this is the error I am getting when running DMS2_batch_prefs:

2018-11-02 13:35:54,248 - INFO - Getting results for site 206...
2018-11-02 13:35:54,248 - ERROR - Terminating dms2_prefs with ERROR
Traceback (most recent call last):
File "/home/jroop/.local/bin/dms2_prefs", line 304, in main
.format(r, logstring))
RuntimeError: Failed for site 206:
Beginning MCMC at Fri Nov 2 11:59:53 2018
After 4 MCMC chains each of 20000 steps, mean R = 1.2541643122083816 and mean Neff = 37.9
MCMC failed to converge. Doing retry 1 with 40000 iterations per chain.
After 4 MCMC chains each of 40000 steps, mean R = 1.539564031833223 and mean Neff = 23.35
MCMC failed to converge. Doing retry 2 with 80000 iterations per chain.
After 4 MCMC chains each of 80000 steps, mean R = 1.2654302097288201 and mean Neff = 33.2
MCMC failed to converge. Doing retry 3 with 160000 iterations per chain.
After 4 MCMC chains each of 160000 steps, mean R = 1.530588807580061 and mean Neff = 57.35
MCMC failed to converge. Doing retry 4 with 320000 iterations per chain.
After 4 MCMC chains each of 320000 steps, mean R = 1.2578045547551282 and mean Neff = 151.3
MCMC failed to converge. Doing retry 5 with 640000 iterations per chain.
After 4 MCMC chains each of 640000 steps, mean R = 1.5417707240750493 and mean Neff = 199.05
MCMC FAILED to converge after all attempts at Fri Nov 2 13:35:52 2018.
181101_MCMC_debug_short.tar.gz

Incompatibility with recent numpy version

Hi there,

Thanks for developing this method, it is extremely useful and presents a unique twist on traditional dN/dS!

I have a minor comment, which is no longer an issue for myself, but may be helpful to others troubleshooting the same issue.

When running the data from the tutorial with this command (using phydms version 2.4.1):

phydms_comprehensive \
	betaLactamase_tutorial_out/ \
	tutorial/example_data/betaLactamase_alignment.fasta \
	tutorial/example_data/betaLactamase_prefs.csv \
	--raxml raxml

The command failed with this error:

2024-03-19 10:33:15,957 - INFO - Analysis completed for YNGKP_M0
2024-03-19 10:33:15,958 - ERROR - Terminating phydms_comprehensive at Tue Mar 19 10:33:15 2024 with ERROR
Traceback (most recent call last):
  File "/Users/gavin/opt/miniconda3/envs/phydms/bin/phydms_comprehensive", line 349, in main
    raise RuntimeError(
RuntimeError: phydms failed to created expected output file betaLactamase_tutorial_out/YNGKP_M0_tree.newick.

Looking into YNGKP_M5_log.log I saw this more specific error:

2024-03-18 17:12:31,341 - INFO - Adjusted 1 branch lengths up to minbrlen 1e-06

2024-03-18 17:12:31,341 - INFO - Initializing TreeLikelihood..
2024-03-18 17:12:31,355 - ERROR - Terminating phydms at Mon Mar 18 17:12:31 2024 with ERROR
Traceback (most recent call last):
  File "phydms/scripts/phydms", line 405, in main
    tl = phydmslib.treelikelihood.TreeLikelihood(tree, alignment, model)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "phydms/phydmslib/treelikelihood.py", line 303, in __init__
    self.gaps = numpy.array(self.gaps)
                ^^^^^^^^^^^^^^^^^^^^^^
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (50,) + inhomogeneous part.

I believe this is an incompatibility with numpy v1.26.4, as this error disappeared when I downgraded to numpy v1.16.6.

All the best,

Gavin

Error when using Pip to install phydms

I am using pip to install phydms - pip install phydms. When I do I get the following error:

Building wheels for collected packages: phydms
  Building wheel for phydms (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [42 lines of output]
      /Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/setuptools/__init__.py:81: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
      !!
      
              ********************************************************************************
              Requirements should be satisfied by a PEP 517 installer.
              If you are using pip, you can try `pip install --use-pep517`.
              ********************************************************************************
      
      !!
        dist.fetch_build_eggs(dist.setup_requires)
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/sl/jyxzdp856v70v9s_8s8mczbm0000gq/T/pip-install-f01x632f/phydms_7a086d2a8c484765a61a94d1369277eb/setup.py", line 70, in <module>
          setup(
        File "/Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/setuptools/__init__.py", line 103, in setup
          _install_setup_requires(attrs)
        File "/Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/setuptools/__init__.py", line 76, in _install_setup_requires
          _fetch_build_eggs(dist)
        File "/Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/setuptools/__init__.py", line 81, in _fetch_build_eggs
          dist.fetch_build_eggs(dist.setup_requires)
        File "/Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/setuptools/dist.py", line 640, in fetch_build_eggs
          return _fetch_build_eggs(self, requires)
        File "/Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/setuptools/installer.py", line 38, in _fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/pkg_resources/__init__.py", line 798, in resolve
          dist = self._resolve_dist(
        File "/Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/pkg_resources/__init__.py", line 834, in _resolve_dist
          dist = best[req.key] = env.best_match(
        File "/Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1104, in best_match
          return self.obtain(req, installer)
        File "/Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1115, in obtain
          return installer(requirement) if installer else None
        File "/Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/setuptools/installer.py", line 106, in _fetch_build_egg_no_warn
          wheel.install_as_egg(dist_location)
        File "/Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/setuptools/wheel.py", line 120, in install_as_egg
          self._install_as_egg(destination_eggdir, zf)
        File "/Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/setuptools/wheel.py", line 128, in _install_as_egg
          self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
        File "/Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/setuptools/wheel.py", line 173, in _convert_metadata
          os.rename(dist_info, egg_info)
      OSError: [Errno 66] Directory not empty: '/private/var/folders/sl/jyxzdp856v70v9s_8s8mczbm0000gq/T/pip-install-f01x632f/phydms_7a086d2a8c484765a61a94d1369277eb/.eggs/Cython-3.0.10-py3.10-macosx-10.9-x86_64.egg/Cython-3.0.10.dist-info' -> '/private/var/folders/sl/jyxzdp856v70v9s_8s8mczbm0000gq/T/pip-install-f01x632f/phydms_7a086d2a8c484765a61a94d1369277eb/.eggs/Cython-3.0.10-py3.10-macosx-10.9-x86_64.egg/EGG-INFO'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for phydms
  Running setup.py clean for phydms
  error: subprocess-exited-with-error
  
  × python setup.py clean did not run successfully.
  │ exit code: 1
  ╰─> [42 lines of output]
      /Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/setuptools/__init__.py:81: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
      !!
      
              ********************************************************************************
              Requirements should be satisfied by a PEP 517 installer.
              If you are using pip, you can try `pip install --use-pep517`.
              ********************************************************************************
      
      !!
        dist.fetch_build_eggs(dist.setup_requires)
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/sl/jyxzdp856v70v9s_8s8mczbm0000gq/T/pip-install-f01x632f/phydms_7a086d2a8c484765a61a94d1369277eb/setup.py", line 70, in <module>
          setup(
        File "/Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/setuptools/__init__.py", line 103, in setup
          _install_setup_requires(attrs)
        File "/Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/setuptools/__init__.py", line 76, in _install_setup_requires
          _fetch_build_eggs(dist)
        File "/Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/setuptools/__init__.py", line 81, in _fetch_build_eggs
          dist.fetch_build_eggs(dist.setup_requires)
        File "/Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/setuptools/dist.py", line 640, in fetch_build_eggs
          return _fetch_build_eggs(self, requires)
        File "/Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/setuptools/installer.py", line 38, in _fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/pkg_resources/__init__.py", line 798, in resolve
          dist = self._resolve_dist(
        File "/Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/pkg_resources/__init__.py", line 834, in _resolve_dist
          dist = best[req.key] = env.best_match(
        File "/Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1104, in best_match
          return self.obtain(req, installer)
        File "/Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1115, in obtain
          return installer(requirement) if installer else None
        File "/Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/setuptools/installer.py", line 106, in _fetch_build_egg_no_warn
          wheel.install_as_egg(dist_location)
        File "/Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/setuptools/wheel.py", line 120, in install_as_egg
          self._install_as_egg(destination_eggdir, zf)
        File "/Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/setuptools/wheel.py", line 128, in _install_as_egg
          self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
        File "/Users/kevinmyers/opt/anaconda3/envs/dms_tools2/lib/python3.10/site-packages/setuptools/wheel.py", line 173, in _convert_metadata
          os.rename(dist_info, egg_info)
      OSError: [Errno 66] Directory not empty: '/private/var/folders/sl/jyxzdp856v70v9s_8s8mczbm0000gq/T/pip-install-f01x632f/phydms_7a086d2a8c484765a61a94d1369277eb/.eggs/Cython-3.0.10-py3.10-macosx-10.9-x86_64.egg/Cython-3.0.10.dist-info' -> '/private/var/folders/sl/jyxzdp856v70v9s_8s8mczbm0000gq/T/pip-install-f01x632f/phydms_7a086d2a8c484765a61a94d1369277eb/.eggs/Cython-3.0.10-py3.10-macosx-10.9-x86_64.egg/EGG-INFO'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed cleaning build dir for phydms
Failed to build phydms
ERROR: Could not build wheels for phydms, which is required to install pyproject.toml-based projects

I have Python 3.10.14 and am on Mac OS 14.4.1. Any ideas on if I can do anything?

list index out of range in phydms_prepalignments

Beginning execution of phydms_prepalignment in directory /fh/fast/bloom_j/grp/mike/HAhomologs at time Fri Jul 22 15:24:57 2016

Version information:
Time and date: Fri Jul 22 15:24:57 2016
Platform: Linux-3.13.0-68-generic-x86_64-with-Ubuntu-14.04-trusty
Python version: 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2]
phydms version: 1.2.dev4
Bio version: 1.67
cython version: 0.23.4
dms_tools version: 1.1.16
scipy version: 0.17.0
matplotlib version: 1.5.1

Parsed the following command-line arguments:
inseqs = H3_WSNref.fa
minidentity = 0.7
prealigned = False
purgeseqs = None
minuniqueness = 2
keepseqs = None
refseq = Reference_WSN_HA_coding_sequence_mature_nostop
alignment = H3_WSNalignment
mafft = mafft

Read 8126 sequences from H3_WSNref.fa
Retained 8126 after removing those specified for purging by '--purgeseqs.'
Retained 8126 sequences after removing any with length not multiple of 3.
Retained 7445 sequences after purging any with ambiguous nucleotides.
Traceback (most recent call last):
File "/home/mdoud/.local/bin//phydms_prepalignment", line 5, in
pkg_resources.run_script('phydms==1.2.dev4', 'phydms_prepalignment')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 528, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1401, in run_script
exec(script_code, namespace, namespace)
File "/home/mdoud/.local/lib/python2.7/site-packages/phydms-1.2.dev4-py2.7-linux-x86_64.egg/EGG-INFO/scripts/phydms_prepalignment", line 344, in

File "/home/mdoud/.local/lib/python2.7/site-packages/phydms-1.2.dev4-py2.7-linux-x86_64.egg/EGG-INFO/scripts/phydms_prepalignment", line 189, in main

IndexError: list index out of range

incompatibile with `pandas` 0.25

Parts of the code break with pandas 0.25, for instance see attached screenshot.
Screen Shot 2019-07-23 at 5 28 28 AM

The reason is that pandas.DataFrame.select is deprecated (see here).

@skhilton, are you able to do a pull request to fix this?

Sites in ExpCM preferences file must start with 1?

I was wondering if there was any particular reason for the checks in phydms that the preferences file be numbered starting with "1" (line 333 of phydms):

if not (min(sites) == 1 and max(sites) - min(sites) == len(sites) - 1): raise ValueError("Sites in preferences file must start at 1 and be consecutive")

Would it be sufficient to just make sure that the number of sites in the preferences file matches the length of the alignment provided? I think it would be much more flexible if the preferences file didn't have to start at site "1", but I can't immediately tell how much work (if any) it would take in the phydms code to do this.

examples of `YNGKP_M0` *not* optimizing

@jbloom: Here are two examples of YNGKP_M0 phydms runs which consistently do not optimize. That is, the likelihood optimization goes through one iteration and does not update any of the parameter values. I have run into similar problems with the ExpCM but strangely those errors do not appear to happen consistently.
YNGKP_M0_error.zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.