foerstner-lab / READemption

A pipeline for the computational evaluation of RNA-Seq data
https://reademption.readthedocs.io
Other
37 stars 19 forks source link

align error with example data. #23

Closed Jomagrax closed 4 years ago

Jomagrax commented 4 years ago

Hi everyone, It's my first time using READemption and Im having some trouble with the align fuction.

Im following the tutorial and working on version 0.5.0

reademption align -f READemption_analysis_prueba -p 8 --poly_a_clipping

[E::hts_open_format] Failed to open file READemption_analysis_prueba/output/align/alignments/InSPI2_R1_alignments_final.bam
Traceback (most recent call last):
  File "/home/superuser/miniconda3/bin/reademption", line 316, in <module>
    main()
  File "/home/superuser/miniconda3/bin/reademption", line 280, in main
    args.func(controller)
  File "/home/superuser/miniconda3/bin/reademption", line 290, in align_reads
    controller.align_reads()
  File "/home/superuser/miniconda3/lib/python3.7/site-packages/reademptionlib/controller.py", line 81, in align_reads
    self._align_single_end_reads()
  File "/home/superuser/miniconda3/lib/python3.7/site-packages/reademptionlib/controller.py", line 327, in _align_single_end_reads
    paired_end=False)
  File "/home/superuser/miniconda3/lib/python3.7/site-packages/reademptionlib/readaligner.py", line 20, in run_alignment
    paired_end=paired_end)
  File "/home/superuser/miniconda3/lib/python3.7/site-packages/reademptionlib/segemehl.py", line 69, in align_reads
    pysam.sort("-o", tmp_sorted_outfile, output_file)
  File "/home/superuser/miniconda3/lib/python3.7/site-packages/pysam/utils.py", line 75, in __call__
    stderr))
pysam.utils.SamtoolsError: 'samtools returned with error 1: stdout=, stderr=samtools sort: can\'t open "READemption_analysis_prueba/output/align/alignments/InSPI2_R1_alignments_final.bam": No such file or directory\n

Let me know If there's any additional information you need. Thanks in advance, Jose.

Tillsa commented 4 years ago

Hi Jose, Thanks for reporting this error! Could you please post which files are inside the folder "READemption_analysis_prueba/output/align/alignments/" Best regards, Till

Jomagrax commented 4 years ago

Hi @Tillsa, Thanks for your response, here's the folder ls -l READemption_analysis_prueba/output/align/alignments/ total 0

Tillsa commented 4 years ago

Did you use segemehl 0.2.0 or 0.3.4?

Jomagrax commented 4 years ago

I have 0.2.0, as expalined here curl www.bioinf.uni-leipzig.de/Software/segemehl/old/segemehl_0_2_0.tar.gz > segemehl_0_2_0.tar.gz tar xzf segemehl_0_2_0.tar.gz cd segemehl_*/segemehl/ && make && cd ../../

Tillsa commented 4 years ago

Could you please install segemehl 0.3.4 and and add it to the path instead of 0.2.0 and then run the analysis again? Does that fix the error?

Haley-Wami commented 4 years ago

Hello again Tillsa,

I got the same error while testing the align module of READemption. I installed and tried using both segemehl versions (0.2.0 and 0.3.4) here are the errors I get from the tests.

=================== short test summary info ============================ FAILED tests/test_paths.py::TestPaths::test_set_read_files_dep_file_lists - AttributeError: 'Paths' object has no attribute 'primary_read_aligner_sam_paths' FAILED tests/test_segemehl.py::TestSegemehlAligning::test_align_reads_single_read_perfect_match - UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte FAILED tests/test_segemehl.py::TestSegemehlAligning::test_map_reads_single_read_not_matching - UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte FAILED tests/test_segemehl.py::TestSegemehlAligning::test_map_reads_single_read_one_mismatch - UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte FAILED tests/test_segemehl.py::TestSegemehlAligning::test_map_reads_single_read_three_mismatches - UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte FAILED tests/test_segemehl.py::TestSegemehlAligning::test_map_reads_single_read_two_mismatches_90 - UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte FAILED tests/test_segemehl.py::TestSegemehlAligning::test_map_reads_single_read_two_mismatches_95 - UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte FAILED tests/test_segemehl.py::TestSegemehlAligning::test_map_reads_single_too_short_read - UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte

When using the 0.3.4 version I get the same errors, except one error with test_controller.py seems to be fixed. (FAILED tests/test_controller.py::TestControllerReadAligning::test_read_aligning - pysam.utils.SamtoolsError: 'samtools returned with error 1: stdout=, stderr=samtools sort: can\'t open "a_test_project/output/...)

Many thanks in advance!

Tillsa commented 4 years ago

Hi! The tests are failing because of the to the switch from segemehl v0.2.0 to v0.3.4. I am adjusting the tests right now, but it takes some time. However, READemption v0.5.0 should be functional right now although the tests are failing. I'll get back to this issue thread once the tests are solved. Best, Till

Haley-Wami commented 4 years ago

Thanks a lot Till! :)

Tillsa commented 4 years ago

Hi @Haley-Wami @Jomagrax We just released version 0.6.0 that should fix the occurring errors. Feel free to try it and let me know if you still have problems. Best regards, Till

Haley-Wami commented 4 years ago

Hi Till, The new version works perfectly. Many thanks! Kind Regards, Haley

Tillsa commented 4 years ago

Great!