Comments (7)
Wow this was a while ago but it might also have to do with the chromosome name as well?
This was from part of the email we exchanged last year
Currently, the chromosome ids are numeric but the program expects
strings. Consequently, it is giving an error. You can solve this easily
by adding 'chr' to chromosome ids (so, chromosome '1' would become
'chr1', chromosome '2' would become 'chr2' and so on).
Unless this was fixed in later version?
from syri.
Thanks @mnshgl0110 and @cjy8709 for the suggestions! I've gotten chroder to work now without the error. Changing to python3.5 alone had no effect (same error), but indeed one of my assemblies had numeric scaffold ids. When I changed these to character strings, the error disappeared. Thanks!
I'm going to document what I did below in case anyone else has the same problem and finds it useful.
- Changing to python 3.5. I set up a miniconda environment for python 3.5.5 (on a Linux system). In addition, I had to make sure the following packages were correctly installed for python 3.5.5 in this environment in order to install/run syri and chroder: numpy, scipy (not sure if it was necessary), cython, biopython, python-igraph, psutil, pandas.
That alone didn't work, but I mentioned it as I continued using this python environment when implementing step 2 below.
- Changing scaffold names to character strings. One of my scaffold-level assemblies had numeric scaffold names. For example, the first lines might look like:
>14 edges=1 [...]
ACTG[...]
...
And it should be changed to:
>scaffold14 edges=1 [...]
ACTG[...]
...
I added "scaffold" to the beginning of the scaffold names (e.g., "14" > "scaffold14") using sed:
sed 's/>\(.*\)/>scaffold\1/' input.fasta > output.fasta
Then, using this new modified fasta, I re-aligned my two assemblies with nucmer and used the .coords file output from nucmer as input into chroder. Now chroder worked for me with no errors.
from syri.
Would it be possible for you to share the input file? Otherwise, it is very difficult to know what caused this.
from syri.
Yup I can share the file.
Is there an email I can send? I'll send the delta and coords file.
from syri.
You can send it to [email protected]
from syri.
Hi, what was the solution to this issue? I'm having a similar problem. I got .tsv output from a nucmer alignment using show-coords, and am now trying to use the .coords file with the chroder script:
python /home/0_PROGRAMS/syri/syri/bin/chroder -o test -noref AlderWillowOut_m_i90_l100.coords GCA_003031625.1_ASM303162v1_genomic.fna EMAL_JTW1653__DATE__800mill.fasta
I assume from the manual that the argument for chroder ("Alignment coordinates in a tsv format") was supposed to refer to the .coords file. (Is that correct?). However, when I run the above command I get the following error:
"
Traceback (most recent call last):
File "/home/0_PROGRAMS/miniconda3/envs/SyRI_env/lib/python3.8/site-packages/pandas/core/ops/array_ops.py", line 149, in na_arithmetic_op
result = expressions.evaluate(op, str_rep, left, right)
File "/home/0_PROGRAMS/miniconda3/envs/SyRI_env/lib/python3.8/site-packages/pandas/core/computation/expressions.py", line 208, in evaluate
return _evaluate(op, op_str, a, b)
File "/home/0_PROGRAMS/miniconda3/envs/SyRI_env/lib/python3.8/site-packages/pandas/core/computation/expressions.py", line 70, in _evaluate_standard
return op(a, b)
File "/home/0_PROGRAMS/miniconda3/envs/SyRI_env/lib/python3.8/site-packages/pandas/core/ops/roperator.py", line 9, in radd
return right + left
numpy.core._exceptions.UFuncTypeError: ufunc 'add' did not contain a loop with signature matching types (dtype('<U21'), dtype('<U21')) -> dtype('<U21')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/0_PROGRAMS/syri/syri/bin/chroder", line 732, in
scaf(args)
File "/home/0_PROGRAMS/syri/syri/bin/chroder", line 266, in scaf
coords.bChr = "qry"+coords.bChr
File "/home/0_PROGRAMS/miniconda3/envs/SyRI_env/lib/python3.8/site-packages/pandas/core/ops/common.py", line 64, in new_method
return method(self, other)
File "/home/0_PROGRAMS/miniconda3/envs/SyRI_env/lib/python3.8/site-packages/pandas/core/ops/init.py", line 500, in wrapper
result = arithmetic_op(lvalues, rvalues, op, str_rep)
File "/home/0_PROGRAMS/miniconda3/envs/SyRI_env/lib/python3.8/site-packages/pandas/core/ops/array_ops.py", line 197, in arithmetic_op
res_values = na_arithmetic_op(lvalues, rvalues, op, str_rep)
File "/home/0_PROGRAMS/miniconda3/envs/SyRI_env/lib/python3.8/site-packages/pandas/core/ops/array_ops.py", line 151, in na_arithmetic_op
result = masked_arith_op(left, right, op)
File "/home/0_PROGRAMS/miniconda3/envs/SyRI_env/lib/python3.8/site-packages/pandas/core/ops/array_ops.py", line 112, in masked_arith_op
result[mask] = op(xrav[mask], y)
File "/home/0_PROGRAMS/miniconda3/envs/SyRI_env/lib/python3.8/site-packages/pandas/core/ops/roperator.py", line 9, in radd
return right + left
numpy.core._exceptions.UFuncTypeError: ufunc 'add' did not contain a loop with signature matching types (dtype('<U21'), dtype('<U21')) -> dtype('<U21')
"
Thanks for the help!
from syri.
I cannot remember what actually solved that issue, but I would guess it was due to incompatible Python version. Please try with python3.5, I think that would fix it.
from syri.
Related Issues (20)
- Can't install on Ubuntu 22.04 HOT 2
- How to cite chroder? HOT 1
- error running syri: IndexError: list index out of range HOT 2
- How to identify breakpoint of large inversion HOT 3
- Aligning bacterial genomes with different number of contigs HOT 2
- longer processing time for large genome? HOT 1
- nearly identical HDRs HOT 3
- How long does it take to generate the result file? HOT 3
- conda installation HOT 2
- Removes 'low-quality alignments' - what does this mean? HOT 1
- complicated region not detected correctly HOT 2
- About InvOut and Inv breakpoints HOT 3
- Huge chromosome problem HOT 6
- keyerror HOT 3
- Request for Guidance on Converting NOTALs to Presence in Syri Outputs HOT 3
- translocated to different chromosomes HOT 3
- Consult DUP/INVDP for details HOT 2
- microhomology at ends of insertions HOT 4
- INV vs INVDUP HOT 2
- ERROR syri:201 - Length of query sequence of Chr1 is less than the maximum coordinate of its aligned regions HOT 7
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 syri.