marbl / metacarvel Goto Github PK
View Code? Open in Web Editor NEWMetaCarvel: A scaffolder for metagenomes
License: MIT License
MetaCarvel: A scaffolder for metagenomes
License: MIT License
Hi, I'm receiving this error when I run the install.sh
script:
usr/bin/env: ‘python2.7’: No such file or directory
make: *** No targets specified and no makefile found. Stop.
g++ spqr.cpp -O3 -Wall -Wextra -std=c++11 -I OGDF/include/ -L OGDF/_release/ -lOGDF -lCOIN -pthread -o spqr
In file included from OGDF/include/ogdf/basic/basic.h:44,
from OGDF/include/ogdf/basic/Array.h:45,
from OGDF/include/ogdf/internal/basic/list_templates.h:45,
from OGDF/include/ogdf/basic/List.h:43,
from OGDF/include/ogdf/basic/Graph.h:44,
from spqr.cpp:13:
OGDF/include/ogdf/internal/basic/config.h:44:10: fatal error: ogdf/internal/config_autogen.h: No such file or directory
44 | #include <ogdf/internal/config_autogen.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [makefile:26: spqr] Error 1
All dependencies are installed and the python environment version is 3.7. Thanks in advance!
need help trying to install python2 lazymux and get this error..
python lazymux.py
File "lazymux.py", line 86
infogathering += f"{x} "
^
SyntaxError: invalid syntax
Hi,
I got the following error while trying MetaCarvel, it looks like no repeats were found in the end, and raised an index error. Any idea?
Thanks!
-Shengwei
Networkx 1.10 found
Fri Oct 12 10:40:44 2018:Starting scaffolding..
Fri Oct 12 10:40:51 2018:Finished conversion
Fri Oct 12 10:40:51 2018:Started generating links between contigs
Fri Oct 12 10:40:51 2018:Started bulding of links between contigs
Fri Oct 12 10:40:51 2018:Started finding and removing repeats
invalidating...ESP_78428
/home/shengwei/anaconda3/envs/MetaCarvel/lib/python2.7/site-packages/numpy/core/fromnumeric.py:2920: RuntimeWarning: Mean of empty slice.
out=out, **kwargs)
/home/shengwei/anaconda3/envs/MetaCarvel/lib/python2.7/site-packages/numpy/core/_methods.py:85: RuntimeWarning: invalid value encountered in double_scalars
ret = ret.dtype.type(ret / rcount)
/home/shengwei/anaconda3/envs/MetaCarvel/lib/python2.7/site-packages/numpy/core/_methods.py:140: RuntimeWarning: Degrees of freedom <= 0 for slice
keepdims=keepdims)
/home/shengwei/anaconda3/envs/MetaCarvel/lib/python2.7/site-packages/numpy/core/_methods.py:110: RuntimeWarning: invalid value encountered in true_divide
arrmean, rcount, out=arrmean, casting='unsafe', subok=False)
/home/shengwei/anaconda3/envs/MetaCarvel/lib/python2.7/site-packages/numpy/core/_methods.py:132: RuntimeWarning: invalid value encountered in double_scalars
ret = ret.dtype.type(ret / rcount)
Traceback (most recent call last):
File "/home/shengwei/GitHub/Download/MetaCarvel/repeat_filter.py", line 65, in <module>
p_degree = np.percentile(contig_degree.values(),75)
File "/home/shengwei/anaconda3/envs/MetaCarvel/lib/python2.7/site-packages/numpy/lib/function_base.py", line 3540, in percentile
a, q, axis, out, overwrite_input, interpolation, keepdims)
File "/home/shengwei/anaconda3/envs/MetaCarvel/lib/python2.7/site-packages/numpy/lib/function_base.py", line 3652, in _quantile_unchecked
interpolation=interpolation)
File "/home/shengwei/anaconda3/envs/MetaCarvel/lib/python2.7/site-packages/numpy/lib/function_base.py", line 3250, in _ureduce
r = func(a, **kwargs)
File "/home/shengwei/anaconda3/envs/MetaCarvel/lib/python2.7/site-packages/numpy/lib/function_base.py", line 3767, in _quantile_ureduce_func
x1 = take(ap, indices_below, axis=axis) * weights_below
File "/home/shengwei/anaconda3/envs/MetaCarvel/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 181, in take
return _wrapfunc(a, 'take', indices, axis=axis, out=out, mode=mode)
File "/home/shengwei/anaconda3/envs/MetaCarvel/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 51, in _wrapfunc
return getattr(obj, method)(*args, **kwds)
IndexError: cannot do a non-empty take from an empty axes.
Fri Oct 12 10:40:53 2018: Failed to find repeats, terminating scaffolding....
Hi,
After installing everything I get:
> python run.py -h
File "run.py", line 35
print('Networkx ' + version + ' found', file=sys.stderr)
^
SyntaxError: invalid syntax
I am using python 2.7.15, I have used conda to install the dependencies, and did the compiling as per the GitHub Wiki instructions.
These are the commands I have used to set everything up:
conda create -n metacarvel python=2.7
conda activate metacarvel
conda install -c bioconda samtools bedtools
pip install networkx==1.10
conda install numpy
git clone --recursive https://github.com/marbl/MetaCarvel.git
cd MetaCarvel
bash install.sh
As far as I can tell nothing went wrong during compiling.
Does anyone have any idea what might be going on?
Igor
Hi,
Tried to install MetaCarvel according to the instructions, but ran into this error:
$ centrality
centrality: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by centrality)
centrality: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.19' not found (required by centrality)
It seems that centrality and spqr are binaries that are not generated during the make
process (they are bundled pre-compiled in the git repo), and attempting to build them fails due to missing headers (from networkit?). Is there some recommended way to compile them? metacarvel is python-2 while networkit is python-3, I think?
We have gotten it working by writing wrapper scripts that add LD_LIBRARY_PATH
etc, but it would be great to be able to compile that our install proceeded correctly. Is there some way to test our install? There wasn't a check
target in the makefile.
Thanks, ben
Hi,
I was curious as to how MetaCarvel was recognizing the correct read pairs after mapping in single-end mode. I see that after converting the read name sorted bam to bed file, the parse_bed
function in the libcorrect.cpp
file is recognising the pairs using the /1
/2
suffix in the read names or by matching the entire read names in the following code snippet from line 61 to 84:
if(read[read.length()-2] == '/')
{
if(read[read.length() -1 ] == '1')
{
first_in_pair[read.substr(0,read.length()-2)] = rec;
}
else
{
second_in_pair[read.substr(0,read.length()-2)] = rec;
}
}
else
{
if(seen.find(read) == seen.end())
{
first_in_pair[read] = rec;
seen[read] = true;
}
else
{
second_in_pair[read] = rec;
}
}
I was wondering if this strategy would fail to recognise the correct read pairs in the following two scenarios:
--no-unal
parameter to output only the aligned reads to the sam file.1:
2:
format that is very common now instead of /1
/2
suffix.Please let me know if that's correct.
Thank you,
Manu
Hi, Is there any way to speed up this software?
I was looping the command through for loop and found this error.
> for i in {1..7}; do python run.py --assembly /media/tien/E842296E42294324/bh/trim_reads/contigs/BH${i}_contigs.fa --mapping /media/tien/E842296E42294324/bh/trim_reads/mapping/BH${i}.bam --dir /media/tien/E842296E42294324/bh/trim_reads/scaffolds/BH${i} -r true -v true -k true; done
> Networkx 2.8.4 found
> Sun Jun 26 16:31:58 2022:Starting scaffolding..
> Sun Jun 26 16:33:10 2022:Finished conversion
> Sun Jun 26 16:33:10 2022:Started generating links between contigs
> finished conversion
> Size of First Map = 2554804
> Size of Second Map = 2393077
> Sum = 9.17633e+08
> Size = 1790143
> Mean = 512.603
> Stdev = 2823.34
> Sun Jun 26 16:33:29 2022:Finished conversion
> Sun Jun 26 16:33:29 2022:Started generating links between contigs
> Size of First Map = 2554804
> Size of Second Map = 2393077
> Sum = 9.17633e+08
> Size = 1790143
> Mean = 512.603
> Stdev = 2823.34
> Sun Jun 26 16:34:55 2022:Finished generating links between contigs
> Sun Jun 26 16:34:55 2022:Started bulding of links between contigs
> Sun Jun 26 16:35:05 2022:Finished generating links between contigs
> Sun Jun 26 16:35:05 2022:Started bulding of links between contigs
> Sun Jun 26 16:35:05 2022:Started finding and removing repeats
> invalidating...k141_127565
> /home/tien/miniconda3/lib/python3.9/site-packages/numpy/core/fromnumeric.py:3432: RuntimeWarning: Mean of empty slice.
> return _methods._mean(a, axis=axis, dtype=dtype,
> /home/tien/miniconda3/lib/python3.9/site-packages/numpy/core/_methods.py:190: RuntimeWarning: invalid value encountered in double_scalars
> ret = ret.dtype.type(ret / rcount)
> /home/tien/miniconda3/lib/python3.9/site-packages/numpy/core/_methods.py:265: RuntimeWarning: Degrees of freedom <= 0 for slice
> ret = _var(a, axis=axis, dtype=dtype, out=out, ddof=ddof,
> /home/tien/miniconda3/lib/python3.9/site-packages/numpy/core/_methods.py:223: RuntimeWarning: invalid value encountered in divide
> arrmean = um.true_divide(arrmean, div, out=arrmean, casting='unsafe',
> /home/tien/miniconda3/lib/python3.9/site-packages/numpy/core/_methods.py:257: RuntimeWarning: invalid value encountered in double_scalars
> ret = ret.dtype.type(ret / rcount)
> Traceback (most recent call last):
> File "/home/tien/MetaCarvel/repeat_filter.py", line 65, in <module>
> p_degree = np.percentile(list(contig_degree.values()),75)
> File "<__array_function__ internals>", line 180, in percentile
> File "/home/tien/miniconda3/lib/python3.9/site-packages/numpy/lib/function_base.py", line 4166, in percentile
> return _quantile_unchecked(
> File "/home/tien/miniconda3/lib/python3.9/site-packages/numpy/lib/function_base.py", line 4424, in _quantile_unchecked
> r, k = _ureduce(a,
> File "/home/tien/miniconda3/lib/python3.9/site-packages/numpy/lib/function_base.py", line 3725, in _ureduce
> r = func(a, **kwargs)
> File "/home/tien/miniconda3/lib/python3.9/site-packages/numpy/lib/function_base.py", line 4593, in _quantile_ureduce_func
> result = _quantile(arr,
> File "/home/tien/miniconda3/lib/python3.9/site-packages/numpy/lib/function_base.py", line 4699, in _quantile
> take(arr, indices=-1, axis=DATA_AXIS)
> File "<__array_function__ internals>", line 180, in take
> File "/home/tien/miniconda3/lib/python3.9/site-packages/numpy/core/fromnumeric.py", line 190, in take
> return _wrapfunc(a, 'take', indices, axis=axis, out=out, mode=mode)
> File "/home/tien/miniconda3/lib/python3.9/site-packages/numpy/core/fromnumeric.py", line 57, in _wrapfunc
> return bound(*args, **kwds)
> IndexError: cannot do a non-empty take from an empty axes.
> Sun Jun 26 16:35:10 2022: Failed to find repeats, terminating scaffolding....
> b''
> finished conversion
> ^CTraceback (most recent call last):
> File "/home/tien/MetaCarvel/run.py", line 187, in <module>
> main()
> File "/home/tien/MetaCarvel/run.py", line 91, in main
> p = subprocess.check_output(cwd+'/bundler -l '+ args.dir+'/contig_links -o ' + args.dir+'/bundled_links + -b '+args.dir+'/bundled_graph.gml -c '+str(args.bsize), shell=True)
> File "/home/tien/miniconda3/lib/python3.9/subprocess.py", line 424, in check_output
> return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
> File "/home/tien/miniconda3/lib/python3.9/subprocess.py", line 507, in run
> stdout, stderr = process.communicate(input, timeout=timeout)
> File "/home/tien/miniconda3/lib/python3.9/subprocess.py", line 1121, in communicate
> stdout = self.stdout.read()
> KeyboardInterrupt
> [2] Exit 1 python run.py -a /media/tien/E842296E42294324/bh/trim_reads/contigs/BH${i}_contigs.fa -m /media/tien/E842296E42294324/bh/trim_reads/mapping/BH${i}.bam -d /media/tien/E842296E42294324/bh/trim_reads/scaffolds/BH${i} -r true -v true -k true
I have make a mistake
Hey!
Thank you for the amazing software! I wanted to ask if it can be applied to two bam files? For example, I have two metaSPAdes assembly files for the same sample which I want to combine together to get better scaffolds (i.e. one final file). I can generate two bam files for each assembly, but can they be used together in MetaCarvel to get better scaffolds?
Looking forward to your reply!
Hi,
I got the same error as this issue (#4), but after I pull the latest code and run make clean
and then make
doesn't work. Following is the error log, can you help me?
Thank you!
Zhenmiao
Networkx 1.10 found
Mon Feb 10 10:02:26 2020:Starting scaffolding..
converting bam file to bed file
finished conversion
Mon Feb 10 10:59:28 2020:Finished conversion
Mon Feb 10 10:59:28 2020:Started generating links between contigs
Mean = 1555.2
Stdev = -nan
Mon Feb 10 12:06:29 2020:Finished generating links between contigs
Mon Feb 10 12:06:29 2020:Started bulding of links between contigs
Mon Feb 10 12:06:29 2020:Finished bundling of links between contigs
Mon Feb 10 12:06:29 2020:Started finding and removing repeats
invalidating...k141_3744
/home/zhangzhm/software/anaconda3/envs/python2/lib/python2.7/site-packages/numpy/core/fromnumeric.py:3118: RuntimeWarning: Mean of empty slice.
out=out, **kwargs)
/home/zhangzhm/software/anaconda3/envs/python2/lib/python2.7/site-packages/numpy/core/_methods.py:85: RuntimeWarning: invalid value encountered in double_scalars
ret = ret.dtype.type(ret / rcount)
/home/zhangzhm/software/anaconda3/envs/python2/lib/python2.7/site-packages/numpy/core/_methods.py:140: RuntimeWarning: Degrees of freedom <= 0 for slice
keepdims=keepdims)
/home/zhangzhm/software/anaconda3/envs/python2/lib/python2.7/site-packages/numpy/core/_methods.py:110: RuntimeWarning: invalid value encountered in true_divide
arrmean, rcount, out=arrmean, casting='unsafe', subok=False)
/home/zhangzhm/software/anaconda3/envs/python2/lib/python2.7/site-packages/numpy/core/_methods.py:132: RuntimeWarning: invalid value encountered in double_scalars
ret = ret.dtype.type(ret / rcount)
Traceback (most recent call last):
File "/home/zhangzhm/software/MetaCarvel/repeat_filter.py", line 65, in <module>
p_degree = np.percentile(contig_degree.values(),75)
File "/home/zhangzhm/software/anaconda3/envs/python2/lib/python2.7/site-packages/numpy/lib/function_base.py", line 3707, in percentile
a, q, axis, out, overwrite_input, interpolation, keepdims)
File "/home/zhangzhm/software/anaconda3/envs/python2/lib/python2.7/site-packages/numpy/lib/function_base.py", line 3826, in _quantile_unchecked
interpolation=interpolation)
File "/home/zhangzhm/software/anaconda3/envs/python2/lib/python2.7/site-packages/numpy/lib/function_base.py", line 3405, in _ureduce
r = func(a, **kwargs)
File "/home/zhangzhm/software/anaconda3/envs/python2/lib/python2.7/site-packages/numpy/lib/function_base.py", line 3941, in _quantile_ureduce_func
x1 = take(ap, indices_below, axis=axis) * weights_below
File "/home/zhangzhm/software/anaconda3/envs/python2/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 189, in take
return _wrapfunc(a, 'take', indices, axis=axis, out=out, mode=mode)
File "/home/zhangzhm/software/anaconda3/envs/python2/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 56, in _wrapfunc
return getattr(obj, method)(*args, **kwds)
IndexError: cannot do a non-empty take from an empty axes.
Mon Feb 10 12:06:32 2020: Failed to find repeats, terminating scaffolding....
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.