brannala / ba3 Goto Github PK
View Code? Open in Web Editor NEWBA3 is a software package for estimating rates of migration between populations using multilocus genotype data.
License: GNU Affero General Public License v3.0
BA3 is a software package for estimating rates of migration between populations using multilocus genotype data.
License: GNU Affero General Public License v3.0
Hi Bruce,
I am writing you because in all my several runs I found low ESS values for logprob. I am running Bayesass for 5 populations of ~10 individuals using 4k SNPs. I tried with different numbers of iterations (1m - 10m) and even when the rest of the parameters have more than 5k ESS, the logprob continue being too small (< 20). I attach the trace file and could attach the input if you needed.
4k.5g.trace.txt
Hi,
I've been running into some issue with my dataset. I am working on a freshwater mussel species, with 34 individuals in 7 populations and 4639 SNPs.
I have been varying the different parameters and checking the trace file each time I run the model, but I don't think it converges.
For the last run I tried this:
./BA3SNP -v -a1 -f1 -m1 -t -s445 -i20000000 -b5000000 -n50 -o run6outbugensis.txt bugensisBA3.inp
And have this a result (I tried to attach the trace file but it's too big):
I'm not sure which parameter I should increase/decrease to have something reliable. I try to ran the model with different starting seeds, and I have different results each time.
Thank you in advance for your help,
Léa Blondel
run6outputbugensis.txt
Hello Bruce
I hope this finds you well, apologies for 'abusing' the github issues for questions. I did not find a google group or similar and wasn't sure where to best post my question where it could potentially also be seen (and help) others.
I am getting slightly confusing results when running my analyses. I have 8 sampling sites (n = 3-13 per site) of Australian humpback dolphins along the coast of Queensland with 602 baitSTR loci (2-7 alleles per locus). Clustering analyses point towards five distinct clusters. I would now like to compare historic gene flow (migrate-n) with contemporary gene flow (BayesAss).
I decided to first run a series of analyses with only two populations (i.e. 1 and 2, 2 and 3 and so on) and then also run an analysis with all five populations. In the two population analyses I'm getting significant gene flow (lower 95CI > 0) from population 1 to 2. In the five population analysis I am getting the same (even similar m) but also significant gene flow from 5 to 4. I repeated the analyses several times with longer chains, trace files look good for all of them as far as I can tell.
Do you have any insights for me as to why the gene flow from 5 to 4 might get picked up in the five population case but not when I test 5 and 4 separately?
Thank you very much and best wishes
Sam
Hello
I am having issues running BayesAss with my data (baitSTR data for 602 loci, 63 individuals, 5 populations). As the description in the release states BA3MSAT is compiled to run up to 500 loci I subsampled my data down to 500 loci randomly, however, it crashed repeatedly. Further subsampling lead to the program running fine with 100 loci and crashing with 101 (segmentation fault).
When inspecting the source I found MAXLOCI=100 in BA3.h and changed this to 500. Now it runs fine with 101 loci so I'm assuming it'll run fine with 500 too. Two questions:
Thank you!
Samuel Wittwer
Hi, Dr. Rannala!
I have been trying to install and compile BayesAss from Source Code (https://github.com/brannala/BA3/releases), to install in my personal Linux and/or a cluster that I use. I am very bad in computing, so I do things only by following manuals.
Following your manual, I can't find configure file, for example.
Is there anything that I might be downloading wrong?
Thank you very much.
Dr. Bruce Rannala,
Sorry to disturb you. My name is Shuli Wang, i am a graduate student learning botany in Xishuangbanna Tropical Botanical Garden, Chinese Academy of Sciences. I am studying BA3 for genetic analysis these days. According to your suggestions, i used MSYS to compile BA3 source code files, but there are always errors after the command "make". The makefile edited and errors picture are attached in this email, please help me find the reasons. Thank you very much for your time and help.
Best wishes,
Shuli Wang
makefile
INCLUDE = -Iinclude
CFLAGS = -O3
LDLIBS = -lgsl
CC = g++
all:
error
Hi there,
I am currently working on microsatellite data consisting of 4 populations with 16 loci. I have previously run BayesAss on the same data but using 3 and 2 populations, this worked correctly. However, I am now unable to run the data for 4 populations and even after changing the data to 2 populations, I still seem to be getting the same error:
gsl: ../gsl/gsl_rng.h:200: ERROR: invalid n, either 0 or exceeds maximum value of generator. Default GSL error handler invoked.
I have tried troubleshooting, adjusting the seed number but am still unable to get this to work. Could you kindly advise on a way forward?. Attached is a copy of the data file.
Regards.
Dataset.txt
Hello Dr. Rannala,
Is there any reason I should not use the haplotypes of RADseq loci in BA3SNP as long as I filter for <= 4 alleles/locus? It seems that they would be treated the same by the program. I can choose a random snps from each locus, but there is more information in the haplotype data so I would like to use that set.
Thanks for any advice.
Cheers,
Brian D.
Hi,
I've been running BA3 to estimate migration rates between 2 fish populations but I'm getting some unexpected results.
I used BA3-SNPS and the finetuning script to help set the mixing parameters.
For the actual analyses I used BA3-3.0.5 using the following syntax.
BA3SNP -v -u -g -t -b500000 -i5000000 -n100 -m 0.05 -a 0.15625 -f 0.0046875 -s$SEED -o $OUT/$SET'_s'$SEED'_BA3.out' $DIR/$SET'.ba3' 1> $OUT/$SET'_s'$SEED'_std.out'
I expected unequal migration rates between the populations, but one of the migration rates is unrealistic.
I suspect the program has issues with the low level of genetic divergence between the two populations.
0->East 1->West
Migration Rates:
m[0][0]: 0.9833(0.0063) m[0][1]: 0.0167(0.0063)
m[1][0]: 0.3281(0.0217) m[1][1]: 0.6719(0.0217)
The program keeps converging m[1][0] to ~0.33 in all my runs.
Migrant ancestries from most West[1] individuals were estimated as second-generation migrants.
for example:
Migrant ancestry>>
[0,0]:0.000 [1,0]:0.024
[0,1]:0.000 [1,1]:0.000
[0,2]:0.976 [1,2]:0.000
Is there anything I can do to improve my runs? I've looked into setting prior distributions, but that isn't an option for BA3. I've made sure that all SNPs included in the analyses have a maf of 0.05 in both populations. This turned out to only slow down the convergence process.
Any suggestions would be much appreciated :)
Attached is the trace file, output, stdout, and ancestries for each individual from my last run.
BA3trace.txt
snapper_norm_s182_BA3out.txt
snapper_norm_s182_stdout.txt
BA3indiv_no_genotypes.txt
Hi, Dr. Rannala
Thanks for your patience last time. I followed your suggestions and edited my make file again, but the new errors appeared. I don't know the error's meaning due to poor knowledge on computing. sorry to disturb you again.
For Microsatellite data analysis, I have installed MSYS2 and three additional packages in disk C to compile BA3, and the BA3 files are put in the bin of x86_64-w64-mingw32.
The edited make file and the new errors are as follows:
INCLUDE = -Iinclude
CFLAGS = -O3
LDLIBS = -lgsl
CC = g++ --static -O1 -DMSAT main.cpp -o BA3 -lgsl
all:
Best wishes,
Shuli Wang
Hi Dr. Rannala,
BA3SNP is exiting with an error stating that a locus in my data has more than the maximum number of alleles. I filtered my data to max 4 alleles/locus and double checked that this is indeed the case for the locus in question. Looking at the checkDataSize function where it counts the number of alleles per locus, it looks like it would count a missing allele (i.e. '0') in the total allele count for a locus. I don't think it differentiates between allele labels (e.g. 01 or 03) and the missing data label: '0' when adding to the alleleLabels map variable.
I know nothing about coding in C++ so I may be wrong, but any help would be appreciated.
Thanks,
Brian D.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.