mandricigor / imrep

ImReP is a computational method for rapid and accurate profiling of the adaptive immune repertoire from regular RNA-Seq data.
https://mandricigor.github.io/imrep/
28 stars 14 forks source link

Problem with installation #39

Closed tAndreani closed 4 years ago

tAndreani commented 4 years ago

Hello,

I am trying to install imrep following the tutorial:

1) git clone https://github.com/mandricigor/imrep.git 2) cd imrep 3) ./install.sh

It seems that most of the things are installed (i did several run of installation):

 ./install.sh
Requirement already satisfied: pysam in /site/ne/home/i0439277/.local/lib/python3.7/site-packages (0.15.4)
Requirement already satisfied: biopython in /site/ne/home/i0439277/anaconda3/lib/python3.7/site-packages (1.76)
Requirement already satisfied: numpy in /site/ne/home/i0439277/anaconda3/lib/python3.7/site-packages/numpy-1.18.1-py3.7-linux-x86_64.egg (from biopython) (1.18.1)
Requirement already satisfied: intervaltree in /site/ne/home/i0439277/.local/lib/python3.7/site-packages (3.0.2)
Requirement already satisfied: sortedcontainers<3.0,>=2.0 in /site/ne/home/i0439277/.local/lib/python3.7/site-packages (from intervaltree) (2.1.0)
Requirement already satisfied: jellyfish in /site/ne/home/i0439277/.local/lib/python3.7/site-packages (0.7.2)
Requirement already satisfied: numpy in /site/ne/home/i0439277/anaconda3/lib/python3.7/site-packages/numpy-1.18.1-py3.7-linux-x86_64.egg (1.18.1)
Requirement already satisfied: networkx in /site/ne/home/i0439277/anaconda3/lib/python3.7/site-packages (1.11)
Requirement already satisfied: decorator>=3.4.0 in /site/ne/home/i0439277/anaconda3/lib/python3.7/site-packages (from networkx) (4.4.2)

at the end I got an error:

error: command '/site/ne/home/i0439277/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc' failed with exit status 1

Before the error I got this intermediate errors:

/site/ne/home/i0439277/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /site/ne/home/i0439277/anaconda3/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /site/ne/home/i0439277/anaconda3/include -fPIC -I/site/ne/home/i0439277/anaconda3/include/python3.7m -c python_bindings.c -o build/temp.linux-x86_64-3.7/python_bindings.o
python_bindings.c:83:38: warning: missing braces around initializer [-Wmissing-braces]
 static PyTypeObject SuffixTreeType = {
                                      ^
python_bindings.c:83:38: warning: missing braces around initializer [-Wmissing-braces]
python_bindings.c:159:32: warning: missing braces around initializer [-Wmissing-braces]
 static PyTypeObject NodeType = {
                                ^
python_bindings.c:166:6: error: 'PyTypeObject {aka struct _typeobject}' has no member named 'tp_compare'; did you mean 'tp_clear'?
     .tp_compare    = (cmpfunc)Node_compare,
      ^~~~~~~~~~
      tp_clear
python_bindings.c:166:23: error: 'cmpfunc' undeclared here (not in a function); did you mean 'newfunc'?
     .tp_compare    = (cmpfunc)Node_compare,
                       ^~~~~~~
                       newfunc
python_bindings.c:166:31: error: expected '}' before 'Node_compare'
     .tp_compare    = (cmpfunc)Node_compare,
                               ^~~~~~~~~~~~
python_bindings.c:159:32: warning: missing braces around initializer [-Wmissing-braces]
 static PyTypeObject NodeType = {
                                ^
python_bindings.c: In function 'init_suffix_tree':
python_bindings.c:185:44: warning: 'return' with no value, in function returning non-void
     if (PyType_Ready(&SuffixTreeType) < 0) return;
                                            ^~~~~~
python_bindings.c:183:1: note: declared here
 init_suffix_tree(void)
 ^~~~~~~~~~~~~~~~
python_bindings.c:186:38: warning: 'return' with no value, in function returning non-void
     if (PyType_Ready(&NodeType) < 0) return;
                                      ^~~~~~
python_bindings.c:183:1: note: declared here
 init_suffix_tree(void)
 ^~~~~~~~~~~~~~~~
python_bindings.c:191:19: warning: implicit declaration of function 'Py_InitModule3'; did you mean 'Py_Initialize'? [-Wimplicit-function-declaration]
     PyObject* m = Py_InitModule3("_suffix_tree", _suffix_tree_methods,
                   ^~~~~~~~~~~~~~
                   Py_Initialize
python_bindings.c:191:19: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
python_bindings.c: In function 'SuffixTree_init':
python_bindings.c:231:9: warning: implicit declaration of function 'PyString_AsStringAndSize'; did you mean 'PyBytes_AsStringAndSize'? [-Wimplicit-function-declaration]
     if (PyString_AsStringAndSize(string,&s,&n))   return -1; /* rethrow */
         ^~~~~~~~~~~~~~~~~~~~~~~~
         PyBytes_AsStringAndSize
python_bindings.c: In function 'SuffixTree_string':
python_bindings.c:252:12: warning: implicit declaration of function 'PyString_FromStringAndSize'; did you mean 'PyBytes_FromStringAndSize'? [-Wimplicit-function-declaration]
     return PyString_FromStringAndSize(self->tree->str, self->tree->str_len);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~
            PyBytes_FromStringAndSize
python_bindings.c:252:12: warning: return makes pointer from integer without a cast [-Wint-conversion]
     return PyString_FromStringAndSize(self->tree->str, self->tree->str_len);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
python_bindings.c: In function 'Node_dealloc':
python_bindings.c:317:11: error: 'NodeObject {aka struct NodeObject}' has no member named 'ob_type'; did you mean 'ob_base'?
     self->ob_type->tp_free((PyObject*)self);
           ^~~~~~~
           ob_base
python_bindings.c: In function 'Node_start':
python_bindings.c:338:12: warning: implicit declaration of function 'PyInt_FromLong'; did you mean 'PyLong_FromLong'? [-Wimplicit-function-declaration]
     return PyInt_FromLong(self->node->start);
            ^~~~~~~~~~~~~~
            PyLong_FromLong
python_bindings.c:338:12: warning: return makes pointer from integer without a cast [-Wint-conversion]
     return PyInt_FromLong(self->node->start);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
python_bindings.c: In function 'Node_end':
python_bindings.c:344:12: warning: return makes pointer from integer without a cast [-Wint-conversion]
     return PyInt_FromLong(self->node->end);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
python_bindings.c: In function 'Node_index':
python_bindings.c:350:12: warning: return makes pointer from integer without a cast [-Wint-conversion]
     return PyInt_FromLong(self->node->term_number);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
python_bindings.c: In function 'Node_string_depth':
python_bindings.c:356:12: warning: return makes pointer from integer without a cast [-Wint-conversion]
     return PyInt_FromLong(self->node->depth);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
python_bindings.c: In function 'Node_edge_label':
python_bindings.c:368:27: warning: return makes pointer from integer without a cast [-Wint-conversion]
     if (start < 0) return PyString_FromStringAndSize("", 0);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
python_bindings.c:369:12: warning: return makes pointer from integer without a cast [-Wint-conversion]
     return PyString_FromStringAndSize(self->tree->tree->str + start, length);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
python_bindings.c: In function 'Node_path_label':
python_bindings.c:378:12: warning: return makes pointer from integer without a cast [-Wint-conversion]
     return PyString_FromStringAndSize(self->tree->tree->str + start, length);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
python_bindings.c: In function 'Node_suffix':
python_bindings.c:388:12: warning: return makes pointer from integer without a cast [-Wint-conversion]
     return PyString_FromStringAndSize(self->tree->tree->str + start, length);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At top level:
python_bindings.c:327:1: warning: 'Node_hash' defined but not used [-Wunused-function]
 Node_hash(NodeObject *self)
 ^~~~~~~~~
python_bindings.c:321:1: warning: 'Node_compare' defined but not used [-Wunused-function]
 Node_compare(NodeObject *n1, NodeObject *n2)
 ^~~~~~~~~~~~
python_bindings.c:296:1: warning: 'Node_new' defined but not used [-Wunused-function]
 Node_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 ^~~~~~~~
python_bindings.c:95:20: warning: 'Node_getseters' defined but not used [-Wunused-variable]
 static PyGetSetDef Node_getseters[] = {
                    ^~~~~~~~~~~~~~

It seems to be related with the python version maybe from https://github.com/openai/mujoco-py/issues/500. I am using python 3.7.4. Do you know which python version is required to install imrep?

jaquejbrito commented 4 years ago

This version is for Python 2. I used version 2.7.14 and it worked. We are working to release a version for Python 3. It will be available soon here: https://github.com/Mangul-Lab-USC/imrep.

tAndreani commented 4 years ago

Thank you for the reply, I was able to install it by upgrading anaconda. best

tAndreani commented 4 years ago

I have another question, which annotation is used by imrep? I have mapped the reads to hg38, can i use the command provided below?

python imrep.py --bam my_bam_mapped_hg38.bam annotated.cdr3

From what I am understanding is it possible that you do not need annotation because all the potential genes are in fasta sequence (in the folder db/mouse or db/human).. But how does it knows that is human or mouse if I do not provide this info?

thank you for your reply.

jaquejbrito commented 4 years ago

For hg38, you can use option "--hg38". To differentiate human and mouse, you can use the option "--species human" or "--species mouse".