'Error in generated code:', file=sys.stderr
See original GitHub issueDear SALSA programmers,
I am trying to run SALSA in a bioconda-installed version. Specifically, I installed it as follows:
mamba create -n salsa2_2.3 salsa2=2.3 ;
I then prepared a sorted *.bed file and length file as instructed:
conda activate bedtools_2.30.0 ;
bamToBed -i $PROJECT/necator/Hi-C/2021.12.16/N_amer_2021.10.26.OmniC.dedup.mapped.PT.bam > N_amer_2021.10.26.OmniC.dedup.mapped.PT.orig.bed ;
sort -k 4 N_amer_2021.10.26.OmniC.dedup.mapped.PT.orig.bed > N_amer_2021.10.26.OmniC.dedup.mapped.PT.bed ;
conda deactivate ;
conda activate samtools_1.14 ;
samtools faidx N_amer_2021.10.26.fa ;
conda deactivate ;
Finally, I tried running SALSA:
conda activate salsa2_2.3 ;
run_pipeline.py \
--assembly N_amer_2021.10.26.fa \
--length N_amer_2021.10.26.fa.fai \
--bed N_amer_2021.10.26.OmniC.dedup.mapped.PT.bed \
--enzyme DNASE \
--output $PROJECT/necator/Hi-C/2021.12.27.01/salsa \
--cutoff 10000 \
--iter 3 \
--dup N_amer_2021.10.26.salsa_dups.txt \
--exp 234000000 --clean yes --prnt yes ;
conda deactivate ;
SALSA2 ran for a short while, but then hit the wall and died, with the following error messages:
bedfile loaded
Starting Iteration 1
bedfile started
bedfile loaded
Traceback (most recent call last):
File "/ocean/projects/mcb190015p/schwarze/anaconda3/envs/salsa2_2.3/bin/fast_scaled_scores.py", line 2, in <module>
import networkx as nx
File "/ocean/projects/mcb190015p/schwarze/anaconda3/envs/salsa2_2.3/lib/python2.7/site-packages/networkx/__init__.py", line 68, in <module>
import networkx.utils
File "/ocean/projects/mcb190015p/schwarze/anaconda3/envs/salsa2_2.3/lib/python2.7/site-packages/networkx/utils/__init__.py", line 2, in <module>
from networkx.utils.decorators import *
File "/ocean/projects/mcb190015p/schwarze/anaconda3/envs/salsa2_2.3/lib/python2.7/site-packages/networkx/utils/decorators.py", line 7, in <module>
from decorator import decorator
File "/ocean/projects/mcb190015p/schwarze/anaconda3/envs/salsa2_2.3/lib/python2.7/site-packages/decorator.py", line 162
print('Error in generated code:', file=sys.stderr)
^
SyntaxError: invalid syntax
python2 /ocean/projects/mcb190015p/schwarze/anaconda3/envs/salsa2_2.3/bin/RE_sites.py -a /ocean/projects/mcb190015p/schwarze/necator/Hi-C/2021.12.27.01/salsa/assembly.cleaned.fasta -e DNASE > /ocean/projects/mcb190015p/schwarze/necator/Hi-C/2021.12.27.01/salsa/re_counts_iteration_1
python2 /ocean/projects/mcb190015p/schwarze/anaconda3/envs/salsa2_2.3/bin/make_links.py -b /ocean/projects/mcb190015p/schwarze/necator/Hi-C/2021.12.27.01/salsa/alignment_iteration_1.bed -d /ocean/projects/mcb190015p/schwarze/necator/Hi-C/2021.12.27.01/salsa -i 1 -x N_amer_2021.10.26.salsa_dups.txt
python2 /ocean/projects/mcb190015p/schwarze/anaconda3/envs/salsa2_2.3/bin/fast_scaled_scores.py -d /ocean/projects/mcb190015p/schwarze/necator/Hi-C/2021.12.27.01/salsa -i 1
Why should a bioconda package for SALSA2 running in its own versioned environment have this problem? How should I fix it?
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
IPython 'Error in generated code:', file=sys.stderr
Then when I tried the command ipython , I got the error print('Error in generated code:', file=sys.stderr) in line 162 of decorator.py ....
Read more >file=sys.stderr syntax error · Issue #1 · arvestad/alv - GitHub
I installed alv using pip install alv, after successful installation I run alv and get: File "/usr/local/bin/alv", line 103 print('Alv ...
Read more >Error message upgrading from 2.3.3 to 2.3.4 - Indico Community
hi, I tried to upgrade the 2.3.3 to latest version following instructions at: Upgrade — Indico 2.3.4 documentation but got following error messages:...
Read more >FS#34302 : [ipython2] syntax error - Arch Linux
print('Error in generated code:', file=sys.stderr) ^ SyntaxError: invalid syntax. Additional info: * package versions: 2013-03-13
Read more >exaile 3.4.5 shows file=sys.stderr error on ubuntu 16.04
I executed exaile command in terminal and it shows the below error. File "/usr/lib/python3.5/site.py", line 182 file=sys.stderr) ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the pointer about conflicting networkx versions. I have devised a method for using conda and pip to create an environment within which I have successfully run SALSA2. This may be useful to users who find conda to be a useful tool for managing versions of Python and other software. Here is what I did which worked:
… which worked! No crash at the networkx-invoking step; full run to near-chromosomal scaffolds.
I think the key step is using conda to create an invokable environment that has nothing but python 2.7, and then using pip to customize that environment by installing networkx 1.11 while actively in that environment, which will then be the sole active networkx version whenever that environment is reactivated. That works and allows SALSA2 to function; nothing else seems to.
Thank you for this solution. Pip install networkx instead of conda install networkx in salsa environment solved the problem.