[Biopython-dev] [Bug 2372] New: installing with non-admin permissions

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Mon Sep 24 10:08:51 EDT 2007


http://bugzilla.open-bio.org/show_bug.cgi?id=2372

           Summary: installing with non-admin permissions
           Product: Biopython
           Version: Not Applicable
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main Distribution
        AssignedTo: biopython-dev at biopython.org
        ReportedBy: gould at embl.de


I have a scenario where I want to install python 2.5 and biopython 1.43(also
dependencies egenix-mx-base-3.0.0 and Numeric-24.2) in a non-standard install
directory as I have only non-admin permissions on a particular machine. I have 
selected a single directory into which I have installed everything with the
PATH env variable now pointing to this version of python as opposed to one in
/usr/bin.

I have followed the instructions as per:
http://biopython.org/DIST/docs/install/Installation.html

However, there seems to be something missing as some of the tests in biopython
1.43 fail as outlined below:

ERROR: test_CodonUsage
----------------------------------------------------------------------
Traceback (most recent call last):
  File "run_tests.py", line 149, in runTest
    self.runSafeTest()
  File "run_tests.py", line 162, in runSafeTest
    cur_test = __import__(self.test_name)
  File "test_CodonUsage.py", line 10, in ?
    X.generate_index("./CodonUsage/HighlyExpressedGenes.txt")
  File
"/home/gould/biopython-1.43/build/lib.linux-x86_64-2.4/Bio/SeqUtils/CodonUsage.py",
line 74, in generate_index
    self._count_codons(FastaFile)
  File
"/home/gould/biopython-1.43/build/lib.linux-x86_64-2.4/Bio/SeqUtils/CodonUsage.py",
line 117, in _count_codons
    cur_record = iterator.next()
  File
"/home/gould/biopython-1.43/build/lib.linux-x86_64-2.4/Bio/Fasta/__init__.py",
line 72, in next
    result = self._iterator.next()
  File
"/home/gould/biopython-1.43/build/lib.linux-x86_64-2.4/Martel/IterParser.py",
line 152, in iterateFile
    self.header_parser.parseString(rec)
  File
"/home/gould/biopython-1.43/build/lib.linux-x86_64-2.4/Martel/Parser.py", line
356, in parseString
    self._err_handler.fatalError(result)
  File "/g/gibson/gould/submaster/python//lib/python2.4/xml/sax/handler.py",
line 38, in fatalError
    raise exception
ParserPositionException: error parsing at or beyond character 0

======================================================================
ERROR: test_Fasta2
----------------------------------------------------------------------
Traceback (most recent call last):
  File "run_tests.py", line 149, in runTest
    self.runSafeTest()
  File "run_tests.py", line 162, in runSafeTest
    cur_test = __import__(self.test_name)
  File "test_Fasta2.py", line 44, in ?
    data = record_parser.parse( src_handle )
  File
"/home/gould/biopython-1.43/build/lib.linux-x86_64-2.4/Bio/Fasta/__init__.py",
line 100, in parse
    return self.convert_lax(iterator.next())
  File
"/home/gould/biopython-1.43/build/lib.linux-x86_64-2.4/Martel/IterParser.py",
line 152, in iterateFile
    self.header_parser.parseString(rec)
  File
"/home/gould/biopython-1.43/build/lib.linux-x86_64-2.4/Martel/Parser.py", line
356, in parseString
    self._err_handler.fatalError(result)
  File "/g/gibson/gould/submaster/python//lib/python2.4/xml/sax/handler.py",
line 38, in fatalError
    raise exception
ParserPositionException: error parsing at or beyond character 0

======================================================================
ERROR: test_KEGG
----------------------------------------------------------------------
Traceback (most recent call last):
  File "run_tests.py", line 149, in runTest
    self.runSafeTest()
  File "run_tests.py", line 162, in runSafeTest
    cur_test = __import__(self.test_name)
  File "test_KEGG.py", line 67, in ?
    t_KEGG_Enzyme(test_KEGG_Enzyme_files)
  File "test_KEGG.py", line 23, in t_KEGG_Enzyme
    record = records.next()
  File
"/home/gould/biopython-1.43/build/lib.linux-x86_64-2.4/Bio/KEGG/Enzyme/__init__.py",
line 225, in next
    data = self._reader.next()
  File
"/home/gould/biopython-1.43/build/lib.linux-x86_64-2.4/Martel/RecordReader.py",
line 295, in next
    positions = _find_end_positions(lookahead, self.tagtable)
  File
"/home/gould/biopython-1.43/build/lib.linux-x86_64-2.4/Martel/RecordReader.py",
line 239, in _find_end_positions
    raise ReaderError("invalid format starting with %s" % repr(text[:50]))
ReaderError: invalid format starting with ''

======================================================================
ERROR: test_align
----------------------------------------------------------------------
Traceback (most recent call last):
  File "run_tests.py", line 149, in runTest
    self.runSafeTest()
  File "run_tests.py", line 162, in runSafeTest
    cur_test = __import__(self.test_name)
  File "test_align.py", line 129, in ?
    alignment = FastaAlign.parse_file(to_parse, 'PROTEIN')
  File
"/home/gould/biopython-1.43/build/lib.linux-x86_64-2.4/Bio/Fasta/FastaAlign.py",
line 48, in parse_file
    cur_align = iterator.next()
  File
"/home/gould/biopython-1.43/build/lib.linux-x86_64-2.4/Bio/Fasta/__init__.py",
line 72, in next
    result = self._iterator.next()
  File
"/home/gould/biopython-1.43/build/lib.linux-x86_64-2.4/Martel/IterParser.py",
line 152, in iterateFile
    self.header_parser.parseString(rec)
  File
"/home/gould/biopython-1.43/build/lib.linux-x86_64-2.4/Martel/Parser.py", line
356, in parseString
    self._err_handler.fatalError(result)
  File "/g/gibson/gould/submaster/python//lib/python2.4/xml/sax/handler.py",
line 38, in fatalError
    raise exception
ParserPositionException: error parsing at or beyond character 0

======================================================================
ERROR: test_format_registry
----------------------------------------------------------------------
Traceback (most recent call last):
  File "run_tests.py", line 149, in runTest
    self.runSafeTest()
  File "run_tests.py", line 162, in runSafeTest
    cur_test = __import__(self.test_name)
  File "test_format_registry.py", line 49, in ?
    parser.parseFile(_open('EDD_RAT.dat'))
  File
"/home/gould/biopython-1.43/build/lib.linux-x86_64-2.4/Martel/Parser.py", line
452, in parseFile
    self._err_handler.fatalError(ParserRecordException(
  File "/g/gibson/gould/submaster/python//lib/python2.4/xml/sax/handler.py",
line 38, in fatalError
    raise exception
ParserRecordException: Traceback (most recent call last):
  File
"/home/gould/biopython-1.43/build/lib.linux-x86_64-2.4/Martel/Parser.py", line
444, in parseFile
    record = reader.next()
  File
"/home/gould/biopython-1.43/build/lib.linux-x86_64-2.4/Martel/RecordReader.py",
line 295, in next
    positions = _find_end_positions(lookahead, self.tagtable)
  File
"/home/gould/biopython-1.43/build/lib.linux-x86_64-2.4/Martel/RecordReader.py",
line 239, in _find_end_positions
    raise ReaderError("invalid format starting with %s" % repr(text[:50]))
ReaderError: invalid format starting with ''


======================================================================
ERROR: test_geo
----------------------------------------------------------------------
Traceback (most recent call last):
  File "run_tests.py", line 149, in runTest
    self.runSafeTest()
  File "run_tests.py", line 162, in runSafeTest
    cur_test = __import__(self.test_name)
  File "test_geo.py", line 24, in ?
    record = records.next()
  File
"/home/gould/biopython-1.43/build/lib.linux-x86_64-2.4/Bio/Geo/__init__.py",
line 79, in next
    return self._parser.parse(File.StringHandle(data))
  File
"/home/gould/biopython-1.43/build/lib.linux-x86_64-2.4/Bio/Geo/__init__.py",
line 228, in parse
    self._scanner.feed(handle, self._consumer)
  File
"/home/gould/biopython-1.43/build/lib.linux-x86_64-2.4/Bio/Geo/__init__.py",
line 126, in feed
    self._parser.parseFile(handle)
  File
"/home/gould/biopython-1.43/build/lib.linux-x86_64-2.4/Martel/Parser.py", line
328, in parseFile
    self.parseString(fileobj.read())
  File
"/home/gould/biopython-1.43/build/lib.linux-x86_64-2.4/Martel/Parser.py", line
356, in parseString
    self._err_handler.fatalError(result)
  File "/g/gibson/gould/submaster/python//lib/python2.4/xml/sax/handler.py",
line 38, in fatalError
    raise exception
ParserPositionException: error parsing at or beyond character 1427

======================================================================
FAIL: test_Fasta
----------------------------------------------------------------------
Traceback (most recent call last):
  File "run_tests.py", line 149, in runTest
    self.runSafeTest()
  File "run_tests.py", line 186, in runSafeTest
    expected_handle)
  File "run_tests.py", line 286, in compare_output
    assert expected_line == output_line, \
AssertionError:
Output  : 'Basic operation of the Record Parser. ... ERROR\n'
Expected: 'Basic operation of the Record Parser. ... ok\n'

======================================================================
FAIL: test_GenBankFormat
----------------------------------------------------------------------
Traceback (most recent call last):
  File "run_tests.py", line 149, in runTest
    self.runSafeTest()
  File "run_tests.py", line 166, in runSafeTest
    cur_test.run_tests([])
  File "test_GenBankFormat.py", line 588, in run_tests
    test_list.test()
  File "martel_support.py", line 51, in test
    raise AssertionError, "cannot parse"
AssertionError: cannot parse

======================================================================
FAIL: test_NNGene
----------------------------------------------------------------------
Traceback (most recent call last):
  File "run_tests.py", line 149, in runTest
    self.runSafeTest()
  File "run_tests.py", line 186, in runSafeTest
    expected_handle)
  File "run_tests.py", line 286, in compare_output
    assert expected_line == output_line, \
AssertionError:
Output  : 'Find all motifs in a set of sequences. ... ERROR\n'
Expected: 'Find all motifs in a set of sequences. ... ok\n'

======================================================================
FAIL: test_SCOP_Astral
----------------------------------------------------------------------
Traceback (most recent call last):
  File "run_tests.py", line 149, in runTest
    self.runSafeTest()
  File "run_tests.py", line 186, in runSafeTest
    expected_handle)
  File "run_tests.py", line 286, in compare_output
    assert expected_line == output_line, \
AssertionError:
Output  : 'testConstructWithCustomFile (test_SCOP_Astral.AstralTests) ...
ERROR\n'
Expected: 'testConstructWithCustomFile (test_SCOP_Astral.AstralTests) ... ok\n'

----------------------------------------------------------------------
Ran 92 tests in 81.465s


I've tried various versions of python with biopython but without success at
getting these tests to run.

I basically need the following piece of code to run:

from Bio.WWW import ExPASy
from Bio.SwissProt import SProt
from Bio import File

results = ExPASy.get_sprot_raw('P12931')
all_results = results.read()
sp_parser = SProt.RecordParser()
sp_iterator = SProt.Iterator(File.StringHandle(all_results), sp_parser)
Record = sp_iterator.next()
but it crashes out at the last line with error:

File "/g/gibson/gould/submaster/python/lib/python2.4/site-packages/Bio/ParserS 
                                                                               
                                   upport.py", line 300, in read_and_call
    raise SyntaxError, errmsg
SyntaxError: Line does not start with 'SQ':
PE   1: Evidence at protein level;

any suggestions as to what the problem might be would be appreciated.
thanks in advance


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Biopython-dev mailing list