Comments (7)
Hi,
Sorry for being slow to get to this. Were you able to resolve the issue?
If not how many columns were in the alignment? I'm wondering if this is a memory issue and if so knowing how large the alignment is should let me reproduce the problem.
from fastbaps.
Hi, @gtonkinhill
I got the same issue. My MSA file includes 374 sequences and each sequence is 559676-bp-long (SNPs only).
from fastbaps.
Hi,
Sorry for the delay, I was not able to reproduce the issue with a matrix of that size. However, I did run into an issue with the function that loads the MSA directly from a file. Does loading using ape
resolve the problem?
msa <- ape::read.FASTA("my_msa.fasta")
sp_data <- fastbaps::import_fasta_sparse_nt(msa)
I will look into what causes the issue with importing directly from an MSA.
If this does not fix the issue would you be able to send me an example of how you are running fastbaps
? For reference I've copied the code I am using to attempt to reproduce the issue. It generates a random MSA of the same size so if you are able to reproduce the problem using this simulated data that would help a lot in finding the source of the bug.
library(fastbaps)
library(ape)
#Generate random data
aln_len <- 559676
nseqs <- 374
msa <- matrix(rep(sample(c('A','C','G','T'), replace = TRUE, size = aln_len), nseqs),
nrow = nseqs, byrow = TRUE)
nvar <- ceiling(0.02*aln_len*nseqs)
msa[sample(1:length(msa), size = nvar)] <- sample(c('A','C','G','T'), replace = TRUE, size = nvar)
msa <- ape::as.DNAbin(msa)
ape::write.FASTA(msa, "temp.fasta")
# Run fastbaps
msa <- ape::read.FASTA("temp.fasta")
sp_data <- fastbaps::import_fasta_sparse_nt(msa)
fb <- fastbaps::fast_baps(sp_data)
from fastbaps.
Same issue. I have 32 sequences that are 497993 bp long. I got SNPs from the genome alignment using snp-sites and ran the following commands:
msa <- ape::read.FASTA('wa_ak_aligned_snps.fasta')
sparse.data <- fastbaps::import_fasta_sparse_nt(msa)
fb <- fastbaps::fast_baps(sparse.data)
[1] "Calculating initial clustering..."
[1] "Calculating initial dk values..."
[1] "Clustering using hierarchical Bayesian clustering..."
Error in bhier_parallel(sparse.data, initial.partition, dk.initial, n.cores) :
Mat::operator(): index out of bounds
sparse.data.opt <- optimise_prior(sparse.data, type = "optimise.symmetric")
Error in tree_llk(temp.sparse.data, temp.h$merge) :
Mat::operator(): index out of bounds
from fastbaps.
Hi,
Thanks confirming this is still an issue. I have been having trouble reproducing this issue. Would it be possible for you to send me a dataset that reproduces the problem?
My email is [email protected]
from fastbaps.
Hi Janani,
Thanks very much for sending through the alignment. It turns out this was an issue with the matrix loading function which relied on ape
.
Thus,
fastbaps::import_fasta_sparse_nt(msa)
would fail while
fastbaps::import_fasta_sparse_nt('wa_ak_aligned_snps.fasta')
would have worked.
However, the later had another issue which caused a stack overflow error with large alignments.
Both of these issues should now be fixed in version 1.0.6
from fastbaps.
Can confirm that v 1.0.6 solves this issue. Thanks!
from fastbaps.
Related Issues (20)
- Calculating assignment probabilities
- Command line interface? HOT 7
- shared object ‘fastbaps.dylib’ not found HOT 6
- Problem in installing fastbaps (Ubuntu 20.0) HOT 1
- segfault from C stack overflow HOT 1
- Information on Symmetric Prior HOT 1
- Different results with "optimise.symmetric" and "optimised.symmetric" HOT 3
- Hashes in filenames cause name match issues HOT 2
- Inconsistencies with phylogeny HOT 2
- Errors with small alignments as input HOT 4
- conda install stuck on solving environment in WSL2 HOT 4
- Index out of bounds HOT 2
- how to force fastbaps to be consistent by using the best_baps_partition function with multi_res_baps HOT 2
- can fastbaps run in parallel? HOT 1
- Indexing error in fasta import HOT 2
- Instalation failling on Windows HOT 3
- Issue loading data HOT 4
- crash with small data HOT 1
- Issues installing - compilation failure HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastbaps.