Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault #2

Open
karved opened this issue Mar 5, 2022 · 1 comment
Open

Segmentation fault #2

karved opened this issue Mar 5, 2022 · 1 comment

Comments

@karved
Copy link

karved commented Mar 5, 2022

Some FASTA sequences break the code (Irrespective of the size).
So for example, there is a file with n seqs, when it reaches this particular seq 'X', the code breaks and displays segmentation fault.

I am attaching one such sequence and a terminal generated output when only ran for that sequence.

>NODE_275_length_155_cov_101.833333
TCGTCAACCCAGACAATCCGGTCATGGTCATAATCAGCATCAACAGCGATTTCGCGCTTT
TGATACACACAAAACATGGGATCTGACGTTATTCGATTGTCCTGTGTTCGAATATTTTCA
CCGATGATGCCAAACGAATCTGGTGCAGATTTTGT
Saving temp files to /tmp
Importing gene model...
Found MMseqs2 index at /tmp/balrog_mmseqs_index
Reading fasta...

contig 1 of 1 : length 155
Finding open reading frames...
Translating open reading frames...
Scoring longest open reading frames with gene model...
No GPU detected, using CPU...
Loading gene model...
Using cache found in /tmp/Markusjsommer_balrog_models_master
Scoring ORFs with gene model...
2  of  2
Calculating geneiness for all open reading frames...
Scoring potential start sites with TIS model...
No GPU detected, using CPU...
Loading TIS model...
Using cache found in /tmp/Markusjsommer_balrog_models_master
0  of  2
/tmp/balrog.tmp231493870:70: FutureWarning: The input object of type 'Tensor' is an array-like implementing one of the corresponding protocols (`__array__`, `__array_interface__` or `__array_struct__`); but not a sequence (or 0-D). In the future, this object will be coerced as if it was first converted using `np.array(obj)`. To retain the old behaviour, you have to either modify the type 'Tensor', or assign to an empty array created with `np.empty(correct_shape, dtype=object)`.
  y_pred_TIS = np.asarray(TIS_prob_list, dtype=float)
/tmp/balrog.tmp231493870:70: DeprecationWarning: setting an array element with a sequence. This was supported in some cases where the elements are arrays with a single element. For example `np.array([1, np.array([2])], dtype=int)`. In the future this will raise the same ValueError as `np.array([1, [2]], dtype=int)`.
2  of  2                     _prob_list, dtype=float)
Segmentation fault
@dgroves6
Copy link

dgroves6 commented Mar 7, 2023

Hi. I'm having the same issue for both the conda install and the source code compilation + build. This is one of my sequences that causes the bug.

>NODE_337_length_211_cov_28.714286
GTTTTCCTGTGCCGTCTTTCAGTACACCTGAAATCTTTACTGCCATATTCACCCCACAAA
AAAGCCCGCCTGAACCGGCGGGCTGTCATAACACTGTGTTACCTGGCTAATCAGAATTTA
TAGCCGATACCCACGATGAAGCCGTCAGTGCGCCAGTCGCCACTGGCGGAACCTTCATAA
GCAAGGTCAATAACCACCGTCTCTACGGGAC

This is my output from the conda install:

Saving temp files to /tmp
Importing gene model...
Found MMseqs2 index at /tmp/balrog_mmseqs_index
Reading fasta...

contig 1 of 1 : length 211
Finding open reading frames...
Translating open reading frames...
Scoring longest open reading frames with gene model...
No GPU detected, using CPU...
Loading gene model...
Using cache found in /tmp/Markusjsommer_balrog_models_main
Scoring ORFs with gene model...
3  of  3
Calculating geneiness for all open reading frames...
Scoring potential start sites with TIS model...
No GPU detected, using CPU...
Loading TIS model...
Using cache found in /tmp/Markusjsommer_balrog_models_main
0  of  4
/tmp/balrog.tmp1678679881:70: FutureWarning: The input object of type 'Tensor' is an array-like implementing one of the corresponding protocols (`__array__`, `__array_interface__` or `__array_struct__`); but not a sequence (or 0-D). In the future, this object will be coerced as if it was first converted using `np.array(obj)`. To retain the old behaviour, you have to either modify the type 'Tensor', or assign to an empty array created with `np.empty(correct_shape, dtype=object)`.
  y_pred_TIS = np.asarray(TIS_prob_list, dtype=float)
/tmp/balrog.tmp1678679881:70: DeprecationWarning: setting an array element with a sequence. This was supported in some cases where the elements are arrays with a single element. For example `np.array([1, np.array([2])], dtype=int)`. In the future this will raise the same ValueError as `np.array([1, [2]], dtype=int)`.
4  of  4                     _prob_list, dtype=float)
Segmentation fault (core dumped)

And this is my output from the source compilation:

Saving temp files to /tmp
Importing gene model...
Importing TIS model...
Found MMseqs2 index at /tmp/balrog_mmseqs_index
Reading fasta...

contig 1 of 1 : length 211
Finding open reading frames...
Tensorizing open reading frames...
Scoring longest open reading frames with gene model...
  ⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿▏ 100.0% [   3/   3 | 17.3 Hz | 0s<0s]
Calculating geneiness for all open reading frames...
Scoring potential start sites with TIS model...
  ⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿▏ 100.0% [   4/   4 | 22.0 Hz | 0s<0s]
Segmentation fault (core dumped)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants