GithubHelp home page GithubHelp logo

phrapl's Introduction

Travis build status Codecov test coverage

<img src="https://cloud.githubusercontent.com/assets/7992349/15196013/661bb536-1798-11e6-964f-100ae6aa1b7a.jpg" alt "phraplLogo" width= "600", height="200">

PHRAPL (Phylogeography using approximate likelihoods) is a method for phylogeographic model selection. This method can estimate the probability of observing a set of gene trees across a set of models that include population genetic parameters, e.g., population coalescence times and gene flow, in order to infer the model(s) in the set that most likely gave rise to the observed data.

Note that PHRAPL has recently moved from R-forge to Github for development. Moving to Github allows users to install pre-CRAN versions using devtools. To do this, within R, type

install.packages("devtools")
devtools::install_github("bomeara/phrapl")

phrapl's People

Contributors

bomeara avatar ndjaxon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

wbyu adachornelia

phrapl's Issues

Error at subsampling step

Hi,

I'm trying to run PHRAPL on my dataset. I have set the popAssignments vector as follows:
popAssignments<-list(c(3,3,3))

I get following error while trying to generate subsampled trees.

Error in retainedTaxaMatrix[rep, ] <- keepTaxa :
number of items to replace is not a multiple of replacement length

Can you please explain this error?

long vectors are not supported in .C

Hello,

I tried subsampling a set of 6.5K gene trees, each with a few tips per species. Subsampling works, but I cannot calculate the topology weights:

clyWeights.df<-GetPermutationWeightsAcrossSubsamples(popAssignments=clyAssign,observedTrees=clySubsampling2)

Error in perms(length(assignFrame[, 2][which(assignFrame[, 1] == popLabels[i])])) :
long vectors (argument 1) are not supported in .C

Is it possible to run it without subsampling? I tried GridSearch with doWeights=FALSE, but it fails...

Error in append(startingVectorList, list(collapseStarts)) :
object 'collapseStarts' not found

Installation issues

Hi!

I have been trying to install PHRAPL and I couldn't do it yet.

First, I have tried in my Windows personal computer, but two packages seem to be unsuitable for my versions of R: "P2C2M" and "partitions". After changing my R version four times, I found a version that accept the installation of "partitions", but I can't find one that accept "P2C2M".
One of those versions gave me an error message saying that this package is avaiable only for Linux.

So I tried to install PHRAPL in a linux cluster that I have access with Bioconda.

But I got another type of error:

Downloading GitHub repo bomeara/phrapl@master
sh: 1: sh: 1: /bin/gtar: not found
/usr/bin/gzip: not found
sh: 1: sh: 1: /bin/gtar: not found
/usr/bin/gzip: not found
Error: Failed to install 'phrapl' from GitHub:
error in running command
In addition: Warning messages:
1: In system(paste(TAR, "--version >", tf, "2>&1")) :
error in running command
2: In system(cmd) : error in running command
3: In utils::untar(tarfile, ...) :
โ€˜/usr/bin/gzip -dc '/tmp/Rtmp7uPNJK/file1f17521ee0c.tar.gz' | /bin/gtar -xf '-' -C '/tmp/Rtmp7uPNJK/remotes1f16ffc295b'โ€™ returned error code 127
4: In system(paste(TAR, "--version >", tf, "2>&1")) :
error in running command

Do you know what type of error is it?

Is there any special way to install PHRAPL in Windows or linux?

Thank you in advance

Ariadne F. Sabbag
UNESP, Brazil

R install failure

Hi Brian,

I'm using OSX 10.11.16, R v3.2.1, and I am having an issue with the PHRAPL install. When I follow your instructions, I get an error apparently due to failure to unpack a file with a name ending in "-1":

> devtools::install_github("bomeara/phrapl")
Downloading GitHub repo bomeara/phrapl@master
from URL https://api.github.com/repos/bomeara/phrapl/zipball/master
Installing phrapl
trying URL 'http://cran.cnr.Berkeley.edu/bin/macosx/mavericks/contrib/3.2/binom_1.1-1'
Content type 'application/x-gzip' length 331405 bytes (323 KB)
==================================================
downloaded 323 KB

Error: Don't know how to decompress files with extension 1-1
> 
> 

In response, I downloaded the master dir and tried to use devtools to install locally, but this also failed:

> install("/Users/justinbagley/Downloads/bomeara-phrapl-688acb1")
Installing phrapl
trying URL 'http://cran.cnr.Berkeley.edu/bin/macosx/mavericks/contrib/3.2/binom_1.1-1'
Content type 'application/x-gzip' length 331405 bytes (323 KB)
==================================================
downloaded 323 KB

Error: Don't know how to decompress files with extension 1-1
> 
>

Please help me find a solution to this so I can start working with PHRAPL.
Thanks.

Best,

Justin

Error in PrepSubsampling

##Hi,
I'm getting the below error when running the PrepSubsampling step:

> observedTrees<-PrepSubsampling(
+     assignmentsGlobal=PopsA,      # the population assignments table
+     observedTrees=TreesA,           # the original trees
+     popAssignments=list(c(3,3,3)),        # the number of tips subsampled per population
+     subsamplesPerGene=subsamplesPerGene,  # the number of replicate subsamples to take per locus
+     outgroup=TRUE,                       # whether an outgroup is present in the dataset (TRUE or FALSE)
+     outgroupPrune=TRUE) 
Error in retainedTaxaMatrix[rep, ] <- keepTaxa : 
  number of items to replace is not a multiple of replacement length

I have 482 trees from UCE/sequence-capture data. I did midpoint root my trees to double check that they were all rooted using TreesA <-midpoint(TreesA) after I initially received the error, but that didn't appear to change anything.

One of my populations has 9 individuals in it, but I still received an error even when moving popAssignments for that population to 1, just in case there were not enough individuals to subsample.
Thanks for any suggestions!

Empty migrationArray

Dear Brian,

I am trying to generate a set of models from a fixed topology, but my migrationArray returns an empty list. Here is the code:

library(ape)
popAssignments<-list(c(3,3,3,3,3))
library(phrapl)
library(rPython)
library(P2C2M)

#Fix the tree from stacey

pop1 <- c(0,0,0,4)
pop2 <- c(0,0,3,NA)
pop3 <- c(0,2,NA,NA)
pop4 <- c(1,NA,NA,NA)
pop5 <- c(1,2,3,4)
collapseList <- list(pop1,pop2,pop3,pop4,pop5)


popVector<-popAssignments[[1]]  
maxK<-5  
maxMigrationK=0 
maxN0K=1
maxGrowthK=1
forceTree=T  
forceSymmetricalMigration=T  
migrationArray<-GenerateMigrationIndividuals(popVector=popVector,maxK=maxK, collapseList = collapseList,
                                             maxMigrationK=maxMigrationK,maxN0K=maxN0K,maxGrowthK=maxGrowthK,
                                             forceTree=forceTree,forceSymmetricalMigration=forceSymmetricalMigration,
                                             verbose = T)

Am I doing anything wrong?

Thanks,

Pedro

Make clickable R GUI for building models

Click on rootward end of edges to add a collapse, midpoint of edges to add a migration event, etc. Prototype code was in an email, need to merge with the PlotModel2D

Get rid of library calls within main code

All packages should be in DESCRIPTION & NAMESPACE files. Note this isn't a simple matter of just deleting library lines; need to verify that the code works correctly after this change (unit testing would come to the rescue in this case...).

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.