glennhickey / progressiveCactus

Distribution package for the Prgressive Cactus multiple genome aligner. Dependencies are linked as submodules
Other
83 stars 26 forks source link

after changing python to python2 in runProgressiveCactus.sh, still print error #98

Closed cistarsa closed 6 years ago

cistarsa commented 6 years ago

Success with help output when I changed python to python2:

/bin/runProgressiveCactus.sh 
Usage: runProgressiveCactus.sh [options] <seqFile> <workDir> <outputHalFile>

Required Arguments:
  <seqFile>     File containing newick tree and seqeunce paths paths.
            (see documetation or examples for format).
  <workDir>     Working directory (which can grow exteremely large)
  <outputHalFile>   Path of output alignment in .hal format.

but when I did a test run, I got another print error:

$ ./bin/runProgressiveCactus.sh Lrubi_ldec.txt WD Ldec_Lrubi 

Beginning Alignment
Traceback (most recent call last):
  File "/home/molecularecology/Desktop/BWA/progressiveCactus/submodules/cactus/bin/cactus_createMultiCactusProject.py", line 16, in <module>
    from cactus.progressive.multiCactusProject import MultiCactusProject
  File "/home/molecularecology/Desktop/BWA/progressiveCactus/submodules/cactus/progressive/multiCactusProject.py", line 23, in <module>
    from cactus.progressive.multiCactusTree import MultiCactusTree
  File "/home/molecularecology/Desktop/BWA/progressiveCactus/submodules/cactus/progressive/multiCactusTree.py", line 22, in <module>
    from sonLib.nxnewick import NXNewick
  File "/home/molecularecology/Desktop/BWA/progressiveCactus/submodules/sonLib/nxnewick.py", line 190
    print "PRE"
              ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(int "PRE")?
Error: Command: cactus_createMultiCactusProject.py "/home/molecularecology/Desktop/BWA/progressiveCactus/WD/expTemplate.xml" "WD/progressiveAlignment" --fixNames=0 exited with non-zero status 1

head Lrubi_ldec.txt 

## for seqfile:
Ldec_redundans_on_alpaths_contigs_genome /home/molecularecology/Desktop/BWA/Reads_Maps/Ldec_redundans_on_alpaths_contigs_genome.fa
Scaffolds_pass1.fa /home/molecularecology/Desktop/BWA/BESST_noscore/BESST_output/pass1/Scaffolds_pass1.fa
diekhans commented 6 years ago

looks like it's still running python3

Perhaps the easiest fix is to put program named python in your PATH that is python2. This could probably be a symlink from python2.

kingcohn1 notifications@github.com writes:

Success with help output when I changed python to python2:

/bin/runProgressiveCactus.sh Usage: runProgressiveCactus.sh [options]

Required Arguments:

File containing newick tree and seqeunce paths paths. (see documetation or examples for format). Working directory (which can grow exteremely large) Path of output alignment in .hal format. but when I did a test run, I got another print error: $ ./bin/runProgressiveCactus.sh Lrubi_ldec.txt WD Ldec_Lrubi Beginning Alignment Traceback (most recent call last): File "/home/molecularecology/Desktop/BWA/progressiveCactus/submodules/cactus/bin/cactus_createMultiCactusProject.py", line 16, in from cactus.progressive.multiCactusProject import MultiCactusProject File "/home/molecularecology/Desktop/BWA/progressiveCactus/submodules/cactus/progressive/multiCactusProject.py", line 23, in from cactus.progressive.multiCactusTree import MultiCactusTree File "/home/molecularecology/Desktop/BWA/progressiveCactus/submodules/cactus/progressive/multiCactusTree.py", line 22, in from sonLib.nxnewick import NXNewick File "/home/molecularecology/Desktop/BWA/progressiveCactus/submodules/sonLib/nxnewick.py", line 190 print "PRE" ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(int "PRE")? Error: Command: cactus_createMultiCactusProject.py "/home/molecularecology/Desktop/BWA/progressiveCactus/WD/expTemplate.xml" "WD/progressiveAlignment" --fixNames=0 exited with non-zero status 1 head Lrubi_ldec.txt ## for seqfile: Ldec_redundans_on_alpaths_contigs_genome /home/molecularecology/Desktop/BWA/Reads_Maps/Ldec_redundans_on_alpaths_contigs_genome.fa Scaffolds_pass1.fa /home/molecularecology/Desktop/BWA/BESST_noscore/BESST_output/pass1/Scaffolds_pass1.fa — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.*
cistarsa commented 6 years ago

Ok I’ll try that! Thanks, Mark.

On Thu, Jan 4, 2018 at 6:12 PM Mark Diekhans notifications@github.com wrote:

looks like it's still running python3

Perhaps the easiest fix is to put program named python in your PATH that is python2. This could probably be a symlink from python2.

kingcohn1 notifications@github.com writes:

Success with help output when I changed python to python2:

/bin/runProgressiveCactus.sh Usage: runProgressiveCactus.sh [options]

Required Arguments: File containing newick tree and seqeunce paths paths. (see documetation or examples for format). Working directory (which can grow exteremely large) Path of output alignment in .hal format. but when I did a test run, I got another print error: $ ./bin/runProgressiveCactus.sh Lrubi_ldec.txt WD Ldec_Lrubi Beginning Alignment Traceback (most recent call last): File "/home/molecularecology/Desktop/BWA/progressiveCactus/submodules/cactus/bin/cactus_createMultiCactusProject.py", line 16, in from cactus.progressive.multiCactusProject import MultiCactusProject File "/home/molecularecology/Desktop/BWA/progressiveCactus/submodules/cactus/progressive/multiCactusProject.py", line 23, in from cactus.progressive.multiCactusTree import MultiCactusTree File "/home/molecularecology/Desktop/BWA/progressiveCactus/submodules/cactus/progressive/multiCactusTree.py", line 22, in from sonLib.nxnewick import NXNewick File "/home/molecularecology/Desktop/BWA/progressiveCactus/submodules/sonLib/nxnewick.py", line 190 print "PRE" ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(int "PRE")? Error: Command: cactus_createMultiCactusProject.py "/home/molecularecology/Desktop/BWA/progressiveCactus/WD/expTemplate.xml" "WD/progressiveAlignment" --fixNames=0 exited with non-zero status 1 head Lrubi_ldec.txt ## for seqfile: Ldec_redundans_on_alpaths_contigs_genome /home/molecularecology/Desktop/BWA/Reads_Maps/Ldec_redundans_on_alpaths_contigs_genome.fa Scaffolds_pass1.fa /home/molecularecology/Desktop/BWA/BESST_noscore/BESST_output/pass1/Scaffolds_pass1.fa — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.*

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/glennhickey/progressiveCactus/issues/98#issuecomment-355436685, or mute the thread https://github.com/notifications/unsubscribe-auth/AT5bu1gXtlnyVtfwLUMmsnk847xJWpuuks5tHWjigaJpZM4RT3rP .

cistarsa commented 6 years ago

still a bit amiss here. I tried changing the alias using


$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.5 2
$ update-alternatives --list python
/usr/bin/python2.7
/usr/bin/python3.5
# check version
$ python -V
Python 2.7.12
# and
alias python=python2
#and 
alias python=python2.7
# the version still shows 2.7.12
diekhans commented 6 years ago

2.7.* is great. The problem with the print statement is with 3.0.

Alias is only for your local shell it will not impact anything It seems your default `python' is now 2.7.12.

Give cactus a try

kingcohn1 notifications@github.com writes:

still a bit amiss here. I tried changing the alias using

$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1 $ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.5 2 $ update-alternatives --list python /usr/bin/python2.7 /usr/bin/python3.5

check version

$ python -V Python 2.7.12

and

alias python=python2

and

alias python=python2.7

the version still shows 2.7.12

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.*

cistarsa commented 6 years ago

OK so as the default seems to be 2.7.12, why am I still getting the same print error?

$ python -V
Python 2.7.12

Beginning Alignment
Traceback (most recent call last):
  File "/home/molecularecology/Desktop/BWA/progressiveCactus/submodules/cactus/bin/cactus_createMultiCactusProject.py", line 16, in <module>
    from cactus.progressive.multiCactusProject import MultiCactusProject
  File "/home/molecularecology/Desktop/BWA/progressiveCactus/submodules/cactus/progressive/multiCactusProject.py", line 23, in <module>
    from cactus.progressive.multiCactusTree import MultiCactusTree
  File "/home/molecularecology/Desktop/BWA/progressiveCactus/submodules/cactus/progressive/multiCactusTree.py", line 22, in <module>
    from sonLib.nxnewick import NXNewick
  File "/home/molecularecology/Desktop/BWA/progressiveCactus/submodules/sonLib/nxnewick.py", line 190
    print "PRE"
              ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(int "PRE")?
Error: Command: cactus_createMultiCactusProject.py "/home/molecularecology/Desktop/BWA/progressiveCactus/WD/expTemplate.xml" "WD/progressiveAlignment" --fixNames=0 exited with non-zero status 1

Temporary data was left in: WD
More information can be found in WD/cactus.log

thank you

cistarsa commented 6 years ago

I rebuilt on a system that only has python 2.6.6 and it worked!