Closed arivers closed 5 years ago
Hi, thank you for reaching out, for using CAMSA, and for catching the bug.
This error seems to be the result of the API breaking change in the networkx
library (as it transitioned form version 2.0
to 2.1
) that CAMSA uses for graph related tasks.
A temporary workaround may be to ensure that in your isolated python environment in Anaconda the netowrkx
library version is 2.0
, and not 2.1
.
Please, try that and let me know if it works as a temporary fix.
Meanwhile, I'll see what I can do to ensure that CAMSA works with both older and newer versions of the networkx
library.
Downgrading to networkx 2.0 solved it. Thanks!
As a quick workaround you can add a max dependency version to the setup.py file:
install_requires=[ 'networkx>=1.11,<=2', ...]
I've updated the CAMSA distribution where this problem shall be fixed (with a networkx
2.0 version being the newest supported), putting a new 1.1.0b15
version online and it is available for install through pip
, conda
, etc.
Please, try it out and let me know how it works.
Also, the camsa_points2fasts.py
script is corrected in the new 1.1.0b15
version.
I upgraded to 1.1.0b15 and reran camsa_points2fasta.py but I'm still having trouble generating a fasta. The error I get is this:
CRITICAL:root:Fragment k141_25601 or k141_65179 which is present assembly points is not present in supplied fasta file. Exiting.
I think the problem is likely with how I'm using the script. I'm not sure which fastas and points files to feed into the system. I'm also not sure that I fed the correct scaffolds and contigs into fasta2camsa_points.py. I'll explain what I used and maybe you can tell me if it matches with what the program expects.
I had a small subset of scaffolds (35) created from a metagenomic assembly using spades and extended by lab work doing 5' and 3' RACE sequencing. I treated this file as my scaffolds file and added contigs from the original assembly and and alternate assembly created with Megahit. My goal was to extend and connect the 35 core contigs as much as possible.
Here is what I ran:
fasta2camsa_points.py megahit_contigs.fasta spades_contigs.fasta lab_confirmed_scaffolds.fasta -o test
run_camsa.py spades_contigs.camsa.points -o testout1
camsa_points2fasta.py --fasta lab_confirmed_scaffolds.fasta --points ab_confirmed_scaffolds.points -o testout2
when using the camsa_points2fasta.py
script the --fasta
flag shall refer to the fasta file with contigs sequences (i.e., the contigs that were used in each and every scaffold assembly that were together merged by CASMA were comprised of).
So in other words, lets say you have two scaffold assemblies s1.fasta
and s2.fasta
on the same set of contigs c.fasta
. The following CAMSA pipeline can be used:
fasta2camsa_points.py c.fasta s1.fasta s2.fasta -o wd
run_camsa.py wd/s1.camsa.points wd/s2.camsa.points -o wd/camsa_results
camsa_points2fasta.py --fasta c.fasta --points wd/camsa_results/merged/merged.camsa.points -o merged.fasta
Please, also note that CAMSA works on order and orientation when producing the merged scaffold assembly. Gap merging is somewhat tangential to CAMSA point, and I would suggest that GAP merging be performed after producing the merged.fasta
.
Closing the issue as the problem seems to be resolved.
I processed two assemblies and a scaffold with fasta2camsa to create points files. When I use run_camsa.py on the two points files I get the error message:
Run command:
Error message:
The fist few lines of the two points files are:
I installed camsa using pip in an isolated conda environment using Python 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56)