<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: arial,helvetica,sans-serif; font-size: 12pt; color: #000000'><font face="arial, helvetica, sans-serif" size="3">Hi Yarden,</font><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 12pt;"><br>Thanks for the quick reply. &nbsp;The version of misopy that is installed is 0.4.9. &nbsp;I'm explicitly calling the python 2.7 executable when I run these scripts:</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 12pt;"><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 12pt;"><div>$ /share/apps/bin/python2.7 -V</div><div>Python 2.7.2</div></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 12pt;"><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 12pt;">Perhaps one of the scripts that is being executed is calling the python in my path (2.4.3)? &nbsp;If I grep for 'python' on all of the .py files in the package, I can see a few lines where it seems to be calling the python in the user's path. &nbsp;For example, the run_events_analysis.py contains the following line:</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 12pt;"><br></div><div><font face="arial, helvetica, sans-serif">"python %s --compute-genes-from-file \"%s\" %s %s --read-len %d "</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">If I prepend my PATH with the path to the python that miso should be using, the test seem to run just fine. &nbsp;I suppose I can have users add the proper version of python to their path, but this seems like a bug that should be fixed.</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">Thanks,</font></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 12pt;"><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 12pt;">J<br><br><div><span name="x"></span><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; "><div><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt; "><br></span></div><div><span style="font-family: arial, helvetica, sans-serif; font-size: 12pt; ">--</span></div></div><font class="Apple-style-span" face="garamond, 'new york', times, serif" style="font-family: arial, helvetica, sans-serif; color: rgb(0, 0, 0); "><b>Jason Greenbaum, Ph.D.<br></b>Manager, Bioinformatics Core | <a href="mailto:jgbaum@liai.org">jgbaum@liai.org</a><br>La Jolla Institute for Allergy and Immunology</font><div><font class="Apple-style-span" face="garamond, 'new york', times, serif" style="font-family: arial, helvetica, sans-serif; color: rgb(0, 0, 0); "><br></font></div><div><font class="Apple-style-span" face="garamond, 'new york', times, serif" style="font-family: arial, helvetica, sans-serif; color: rgb(0, 0, 0); "><br></font></div><span name="x"></span><br></div><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Yarden Katz" &lt;yarden@mit.edu&gt;<br><b>To: </b>"J. Greenbaum" &lt;jgbaum@liai.org&gt;<br><b>Cc: </b>miso-users@mit.edu, "Lukas Chavez Wurm" &lt;lchavez@liai.org&gt;<br><b>Sent: </b>Wednesday, July 17, 2013 3:15:51 PM<br><b>Subject: </b>Re: [miso-users] MISO tests appear to be failing<br><br>Hi,<br><br>Could you please let me know which MISO version you are using? &nbsp;Is it 0.4.9?<br><br>One cause of this error this is a mixup between an old and a new version of Python. &nbsp;Older versions of Python do not support the syntax "with open(...)" and that might cause that. &nbsp;Although you're intending to use Python 2.7 which definitely is recent enough to support this, note that the tests call:<br><br>&gt; python /share/apps/lib/python2.7/site-packages/misopy/index_gff.py ...<br><br>which means that whatever Python is available in your environment will be invoked, and if that one is significantly older, it could cause the issue.<br><br>Could you please let me know what the output of these commands is?<br><br>$ /usr/bin/env python -v <br>$ python -v<br><br>Thanks. Best, --Yarden<br><br><br><br>On Jul 17, 2013, at 5:58 PM, J. Greenbaum wrote:<br><br>&gt; Hi all,<br>&gt; <br>&gt; I've recently installed MISO (and all prerequisites) on our cluster and have run into an issue when I run the test_miso.py script (output below). &nbsp;I was hoping someone might have had a similar experience but haven't had any luck searching the archives for these error messages. &nbsp;I've posted the output of test_miso.py and module_availability.py as well as the versions of each of the prerequisite modules below. &nbsp;Any insight would be appreciated. &nbsp;If more information is required, please let me know.<br>&gt; <br>&gt; Thanks in advance,<br>&gt; <br>&gt; J<br>&gt; <br>&gt; <br>&gt; Output of test_miso.py:<br>&gt; [jgbaum@compute-0-6 site-packages]$ /share/apps/bin/python2.7 misopy/test_miso.py &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>&gt; Testing fr-unstranded...<br>&gt; Checking read &nbsp;f_read &nbsp;against &nbsp;+<br>&gt; Checking read &nbsp;f_read &nbsp;against &nbsp;-<br>&gt; Checking read &nbsp;r_read &nbsp;against &nbsp;+<br>&gt; Checking read &nbsp;r_read &nbsp;against &nbsp;-<br>&gt; Testing fr-firststrand...<br>&gt; Testing fr-secondstrand...<br>&gt; .Testing conversion of SAM to BAM...<br>&gt; Executing: python /share/apps/lib/python2.7/site-packages/misopy/sam_to_bam.py --convert /share/apps/lib/python2.7/site-packages/misopy/test-data/sam-data/c2c12.Atp2b1.sam /share/apps/lib/python2.7/site-packages/misopy/test-output/sam-output<br>&gt; Converting SAM to BAM...<br>&gt; &nbsp; - Executing: samtools view -Sbh /share/apps/lib/python2.7/site-packages/misopy/test-data/sam-data/c2c12.Atp2b1.sam &nbsp;&gt; /share/apps/lib/python2.7/site-packages/misopy/test-output/sam-output/c2c12.Atp2b1.bam<br>&gt; [samopen] SAM header is present: 35 sequences.<br>&gt; Sorting BAM file...<br>&gt; &nbsp; - Executing: samtools sort /share/apps/lib/python2.7/site-packages/misopy/test-output/sam-output/c2c12.Atp2b1.bam /share/apps/lib/python2.7/site-packages/misopy/test-output/sam-output/c2c12.Atp2b1.sorted<br>&gt; Indexing BAM...<br>&gt; &nbsp; - Executing: samtools index /share/apps/lib/python2.7/site-packages/misopy/test-output/sam-output/c2c12.Atp2b1.sorted.bam<br>&gt; Conversion took 0.00 minutes.<br>&gt; .Testing gene-level Psi...<br>&gt; Testing GFF indexing of: /share/apps/lib/python2.7/site-packages/misopy/gff-events/mm9/genes/Atp2b1.mm9.gff<br>&gt; Executing: python /share/apps/lib/python2.7/site-packages/misopy/index_gff.py --index /share/apps/lib/python2.7/site-packages/misopy/gff-events/mm9/genes/Atp2b1.mm9.gff /share/apps/lib/python2.7/site-packages/misopy/gff-events/mm9/genes/Atp2b1/indexed<br>&gt; &nbsp; File "/share/apps/lib/python2.7/site-packages/misopy/index_gff.py", line 151<br>&gt; &nbsp; &nbsp; with open(gff_filename) as gff_in:<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^<br>&gt; SyntaxError: invalid syntax<br>&gt; Executing: python /share/apps/lib/python2.7/site-packages/misopy/run_events_analysis.py &nbsp;--compute-genes-psi /share/apps/lib/python2.7/site-packages/misopy/gff-events/mm9/genes/Atp2b1/indexed /share/apps/lib/python2.7/site-packages/misopy/test-output/sam-output/c2c12.Atp2b1.sorted.bam --output-dir /share/apps/lib/python2.7/site-packages/misopy/test-output/gene-psi-output --read-len 35 <br>&gt; &nbsp; File "/share/apps/lib/python2.7/site-packages/misopy/run_events_analysis.py", line 123<br>&gt; &nbsp; &nbsp; with open(batch_fname, "w") as batch_out:<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^<br>&gt; SyntaxError: invalid syntax<br>&gt; .<br>&gt; ----------------------------------------------------------------------<br>&gt; Ran 3 tests in 0.177s<br>&gt; <br>&gt; OK<br>&gt; <br>&gt; <br>&gt; Output of module_availability.py:<br>&gt; [jgbaum@compute-0-6 site-packages]$ /share/apps/bin/python2.7 misopy/module_availability.py<br>&gt; Looking for required Python modules..<br>&gt; Checking for availability of: numpy<br>&gt; Checking for availability of: scipy<br>&gt; Checking for availability of: json<br>&gt; Checking for availability of: matplotlib<br>&gt; Checking for availability of: pysam<br>&gt; All modules are available!<br>&gt; Looking for required executables..<br>&gt; Checking if samtools is available<br>&gt; &nbsp; - samtools is available<br>&gt; Checking if bedtools is available<br>&gt; &nbsp; - bedtools is available<br>&gt; <br>&gt; <br>&gt; Module/program versions:<br>&gt; pysam 0.7.4<br>&gt; numpy 1.6.1<br>&gt; scipy 0.9.0<br>&gt; matplotlib: 1.1.0<br>&gt; samtools: 0.1.18<br>&gt; bedtools: v2.16.2-zip-466a9f0<br>&gt; Python: 2.7<br>&gt; <br>&gt; <br>&gt; --<br>&gt; Jason Greenbaum, Ph.D.<br>&gt; Manager, Bioinformatics Core | jgbaum@liai.org<br>&gt; La Jolla Institute for Allergy and Immunology<br>&gt; <br>&gt; <br>&gt; <br>&gt; _______________________________________________<br>&gt; miso-users mailing list<br>&gt; miso-users@mit.edu<br>&gt; http://mailman.mit.edu/mailman/listinfo/miso-users<br><br></blockquote><br></div></div></body></html>