Solved more or less - Ubuntu: MISO unittest fails
1
0
Entering edit mode
9.0 years ago

Hello,

I have the following problem. I installed MISO with pip like described in the installation guide using:

$ pip install misopy

After several attempts it finally worked. I did the first testing step of the installation:

$ module_availability

Here again there were no problems. Right after that I tried to do the unittest with:

$ python -m unittest discover misopy

I tried it without root and after it failed I tried it with root and I got the following message:

root@AceExt:~# python -m unittest discover misopy
Testing fr-unstranded...
Checking read  f_read  against  +
Checking read  f_read  against  -
Checking read  r_read  against  +
Checking read  r_read  against  -
Testing fr-firststrand...
.Testing conversion of SAM to BAM...
Executing: sam_to_bam --convert /usr/local/lib/python2.7/dist-packages/misopy/test-data/sam-data/c2c12.Atp2b1.sam /usr/local/lib/python2.7/dist-packages/misopy/test-output/sam-output
Converting SAM to BAM...
  - Executing: samtools view -Sbh /usr/local/lib/python2.7/dist-packages/misopy/test-data/sam-data/c2c12.Atp2b1.sam  > /usr/local/lib/python2.7/dist-packages/misopy/test-output/sam-output/c2c12.Atp2b1.bam
[main_samview] fail to open "/usr/local/lib/python2.7/dist-packages/misopy/test-data/sam-data/c2c12.Atp2b1.sam" for reading.
Sorting BAM file...
  - Executing: samtools sort /usr/local/lib/python2.7/dist-packages/misopy/test-output/sam-output/c2c12.Atp2b1.bam /usr/local/lib/python2.7/dist-packages/misopy/test-output/sam-output/c2c12.Atp2b1.sorted
[bam_header_read] EOF marker is absent. The input is probably truncated.
[bam_header_read] invalid BAM binary header (this is not a BAM file).
Segmentation fault (core dumped)
Indexing BAM...
  - Executing: samtools index /usr/local/lib/python2.7/dist-packages/misopy/test-output/sam-output/c2c12.Atp2b1.sorted.bam
open: No such file or directory
[bam_index_build2] fail to open the BAM file.
Conversion took 0.00 minutes.
FTesting gene-level Psi...
Testing GFF indexing of: /usr/local/lib/python2.7/dist-packages/misopy/gff-events/mm9/genes/Atp2b1.mm9.gff
Executing: index_gff --index /usr/local/lib/python2.7/dist-packages/misopy/gff-events/mm9/genes/Atp2b1.mm9.gff /usr/local/lib/python2.7/dist-packages/misopy/gff-events/mm9/genes/Atp2b1/indexed
Indexing GFF...
  - GFF: /usr/local/lib/python2.7/dist-packages/misopy/gff-events/mm9/genes/Atp2b1.mm9.gff
  - Outputting to: /usr/local/lib/python2.7/dist-packages/misopy/gff-events/mm9/genes/Atp2b1/indexed
Traceback (most recent call last):
  File "/usr/local/bin/index_gff", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/misopy/index_gff.py", line 191, in main
    compress_id=options.compress_id)
  File "/usr/local/lib/python2.7/dist-packages/misopy/index_gff.py", line 153, in index_gff
    gff_genes = gene_utils.load_genes_from_gff(gff_filename)
  File "/usr/local/lib/python2.7/dist-packages/misopy/Gene.py", line 878, in load_genes_from_gff
    reverse_recs=reverse_recs)
  File "/usr/local/lib/python2.7/dist-packages/misopy/gff_utils.py", line 191, in __init__
    include_introns=include_introns)
  File "/usr/local/lib/python2.7/dist-packages/misopy/gff_utils.py", line 201, in from_file
    FILE = open(filename, "r")
IOError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/misopy/gff-events/mm9/genes/Atp2b1.mm9.gff'
Executing: miso --run /usr/local/lib/python2.7/dist-packages/misopy/gff-events/mm9/genes/Atp2b1/indexed /usr/local/lib/python2.7/dist-packages/misopy/test-output/sam-output/c2c12.Atp2b1.sorted.bam --output-dir /usr/local/lib/python2.7/dist-packages/misopy/test-output/gene-psi-output --read-len 36 
MISO (Mixture of Isoforms model)
Probabilistic analysis of RNA-Seq data for detecting differential isoforms
Use --help argument to view options.

Using MISO settings file: /usr/local/lib/python2.7/dist-packages/misopy/settings/miso_settings.txt
Error: Settings file /usr/local/lib/python2.7/dist-packages/misopy/settings/miso_settings.txt does not exist.
.Testing gene-level Psi...
Executing: python /usr/local/lib/python2.7/dist-packages/misopy/index_gff.py --index /usr/local/lib/python2.7/dist-packages/misopy/gff-events/mm9/genes/Atp2b1.mm9.gff /usr/local/lib/python2.7/dist-packages/misopy/gff-events/mm9/indexed
Indexing GFF...
  - GFF: /usr/local/lib/python2.7/dist-packages/misopy/gff-events/mm9/genes/Atp2b1.mm9.gff
  - Outputting to: /usr/local/lib/python2.7/dist-packages/misopy/gff-events/mm9/indexed
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/misopy/index_gff.py", line 199, in <module>
    main()
  File "/usr/local/lib/python2.7/dist-packages/misopy/index_gff.py", line 191, in main
    compress_id=options.compress_id)
  File "/usr/local/lib/python2.7/dist-packages/misopy/index_gff.py", line 153, in index_gff
    gff_genes = gene_utils.load_genes_from_gff(gff_filename)
  File "/usr/local/lib/python2.7/dist-packages/misopy/Gene.py", line 878, in load_genes_from_gff
    reverse_recs=reverse_recs)
  File "/usr/local/lib/python2.7/dist-packages/misopy/gff_utils.py", line 191, in __init__
    include_introns=include_introns)
  File "/usr/local/lib/python2.7/dist-packages/misopy/gff_utils.py", line 201, in from_file
    FILE = open(filename, "r")
IOError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/misopy/gff-events/mm9/genes/Atp2b1.mm9.gff'
Executing: python /usr/local/lib/python2.7/dist-packages/misopy/run_events_analysis.py  --compute-genes-psi /usr/local/lib/python2.7/dist-packages/misopy/gff-events/mm9/indexed /usr/local/lib/python2.7/dist-packages/misopy/test-output/sam-output/c2c12.Atp2b1.sorted.bam --output-dir /usr/local/lib/python2.7/dist-packages/misopy/test-output/gene-psi-output --read-len 36  --paired-end 250 30 --use-cluster
MISO (Mixture of Isoforms model)
To run MISO, please use "miso" instead.
.Testing single-end SE event interface...
Executing: python /usr/local/lib/python2.7/dist-packages/misopy/run_events_analysis.py  --compute-events-psi se-sample /usr/local/lib/python2.7/dist-packages/misopy/test-data/se-counts/se_test.counts --output-dir /usr/local/lib/python2.7/dist-packages/misopy/test-output/SE-output --read-len 35 --overhang-len 4  --event-type SE --use-cluster 
MISO (Mixture of Isoforms model)
To run MISO, please use "miso" instead.
.
======================================================================
FAIL: test_a_sam_to_bam (misopy.test_miso.TestMISO)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/misopy/test_miso.py", line 51, in test_a_sam_to_bam
    "c2c12.Atp2b1.sorted.bam")))
AssertionError

----------------------------------------------------------------------
Ran 5 tests in 1.014s

FAILED (failures=1)

I hope that somebody can help me with that.

Best regards

Mixture-of-Isoforms Unit-test MISO • 3.4k views
ADD COMMENT
1
Entering edit mode
9.0 years ago

I actually managed to solve the problem myself. I removed everything using

$ pip uninstall "thisandthat"

and i reinstalled MISO doing THE EXACT SAME STEPS like shown in the installation guide. For some reason it everything worked perfectly, so i guess it was just some kind of vodoo curse that you encounter every now and then when using ubuntu.

Anyway, sorry for the trouble.

ADD COMMENT
0
Entering edit mode

installed misopy by anaconda $python -m unittest discover misopy Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/usr/lib/python2.7/unittest/__main__.py", line 12, in <module> main(module=None) File "/usr/lib/python2.7/unittest/main.py", line 94, in __init__ self.parseArgs(argv) File "/usr/lib/python2.7/unittest/main.py", line 113, in parseArgs self._do_discovery(argv[2:]) File "/usr/lib/python2.7/unittest/main.py", line 214, in _do_discovery self.test = loader.discover(start_dir, pattern, top_level_dir) File "/usr/lib/python2.7/unittest/loader.py", line 204, in discover raise ImportError('Start directory is not importable: %r' % start_dir) ImportError: Start directory is not importable: 'misopy'

ADD REPLY

Login before adding your answer.

Traffic: 1793 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6