Comments (5)
Thank you for sharing this! I was able to reproduce the error with test data, but it depended on the input fasta!
from gimmemotifs.motif import Motif, read_motifs
from gimmemotifs.fasta import Fasta
jaspar_motif_file="data/motif_databases/JASPAR2022_vertebrates.pfm"
motifs = read_motifs(jaspar_motif_file)
print(len([m for m in motifs if m.id.startswith("MA0046.2")])) # prints 1
m = [m for m in motifs if m.id.startswith("MA0046.2")][0]
print(m.id) # prints 'MA0046.2_MA0046.2.HNF1A'
ff = "test/data/scan/genome/scan_test.fa" # segfault
ff = "test/data/genomes/hg38sample.fa" # no segfault
f = Fasta(ff)
m.scan_all(f)
The file with proper output contained one chromosome with zero hits, so I'm not sure what causes this. @simonvh, could you have a look if you have the time? This is happening inside the C function pfmscan
.
from gimmemotifs.
Hello,
I believe, I have identified problem - when a sequence in FASTA file is shorter then motif, I believe that is when segmentation fault happens.
For example if I have something like this in FASTA file (usually incomplete CDS):
ENSG00000146733|ENST00000416592
ATGGTCT
And consensus is for example (https://jaspar.genereg.net/matrix/MA0114.4/):
'nnCAAAGTCCAnn'
Similar happens on the other short sequences.
from gimmemotifs.
I only got a segfault with a long sequence, but not with a short sequence!
Perhaps I'm missing something though, so I made a PRs that might fix either cases: #303 and #304
If you could test these, or provide me with your input data, that would be wonderful :)
from gimmemotifs.
You can download file I have used here: https://filebin.net/sxmgfi99b5rnzb1y
from gimmemotifs.
Thanks!
I used your example code, with your mart file, and this MA0046.2 motif (I guess its the same you had?) but did not get a segfault!
I'm using a beefy PC, so my theory is that I have a bigger CPU cache (stack, I think?). If that is the case, #303 / #305 should fix this issue. Let me know what you think @simonvh :)
from gimmemotifs.
Related Issues (20)
- set_genomes function in Scanner() cannot be passed additional arguments for class Genome HOT 1
- xgboost dependency HOT 1
- gimme threshold error
- Push most recent version (0.17.2) to gimmemotifs HOT 1
- PerformanceWarning HOT 1
- FutureWarning
- ConvergenceWarning HOT 1
- FR: support pandas 2
- gimme motif2factors: No Orthologs Found for any factor in my custom organism genome HOT 6
- Exception on motif enrichment analysis
- Exception on differential enrichment HOT 1
- Incompatibility with certain common PWM files
- Gimme maelstrom didn't work with custom pfm file
- FYI: SafeConfigParser in versioneer not compatible with Python 3.12 HOT 1
- Gimmemotif motif scan 'score' metric
- Supporting for metagenomic data
- Maelstrom: uninformative error when duplicate regions present
- Maelstrom: failing during MultiTaskLasso HOT 1
- Cannot install package
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 gimmemotifs.