BSSeeker / BSseeker2

A versatile aligning pipeline for bisulfite sequencing data
http://pellegrini.mcdb.ucla.edu/BS_Seeker2/
MIT License
60 stars 25 forks source link

bs_seeker2-call_methylation.py error report #11

Closed Shicheng-Guo closed 7 years ago

Shicheng-Guo commented 7 years ago

Hi,

I met such problems for bs_seeker2-call_methylation.py. I am appreciated to get some help. Thanks.

[shg047@tscc-login2 fastq]$ python /home/shg047/software/BSseeker2/bs_seeker2-call_methylation.py -x -r 5 --rm-CCGG -i T19.bam -o T19.mr --txt

 BS-Seeker2 v2.0.10 - Nov 5, 2015

[2016-11-10 22:22:03] sorting BS-Seeker alignments Traceback (most recent call last): File "/home/shg047/software/BSseeker2/bs_seeker2-call_methylation.py", line 106, in pysam.sort(options.infilename, sorted_input_filename) File "/home/shg047/anaconda2/lib/python2.7/site-packages/pysam/utils.py", line 75, in call stderr)) pysam.utils.SamtoolsError: 'samtools returned with error 1: stdout=, stderr=[bam_sort] Use -T PREFIX / -o FILE to specify temporary and final output files\nUsage: samtools sort [options...] [in.bam]\nOptions:\n -l INT Set compression level, from 0 (uncompressed) to 9 (best)\n -m INT Set maximum memory per thread; suffix K/M/G recognized [768M]\n -n Sort by read name\n -o FILE Write final output to FILE rather than standard output\n -T PREFIX Write temporary files to PREFIX.nnnn.bam\n -@, --threads INT\n Set number of sorting and compression threads [1]\n --input-fmt-option OPT[=VAL]\n Specify a single input file format option in the form\n of OPTION or OPTION=VALUE\n -O, --output-fmt FORMAT[,OPT[=VAL]]...\n Specify output format (SAM, BAM, CRAM)\n --output-fmt-option OPT[=VAL]\n Specify a single output file format option in the form\n of OPTION or OPTION=VALUE\n --reference FILE\n Reference sequence FASTA FILE [null]\n'

Regards,

guoweilong commented 7 years ago

Hi Shicheng,

Thanks for writting to me the issue.

It seems to related with pysam. The samtools command parameters for sorting seems changed. And I might take some time to validate it on multiple versions of pysam before fix it.

Two ways you can try currently:

  1. You can try to install a local version of python and pysam (v0.6+) would be help https://github.com/BSSeeker/BSseeker2#qa31
  2. You can follow markmcdowall's suggestions and change the BS-Seeker2 code locally.

https://github.com/BSSeeker/BSseeker2/issues/9

Best, Weilong

Shicheng-Guo commented 7 years ago

Eventually, I made it. It seems BSSeeker2 dependent on the version strongly. The current verison could run:

BS-Seeker2 v2.0.9 - Dec 30, 2014 Python-2.7.4 pysam-0.6

Hope it is helpful for others.

guoweilong commented 7 years ago

Thanks Shicheng. Indeed it is. BS-Seeker2 was developed when pysam v0.6, while the new versions of pysam seems have changed a lot. Hopefully more people could involved in improving the version support.

Weilong

At 2016-11-15 10:24:41, "Shicheng Guo" notifications@github.com wrote:

Eventually, I made it. It seems BSSeeker2 dependent on the version strongly. The current verison could run:

BS-Seeker2 v2.0.9 - Dec 30, 2014 Python-2.7.4 pysam-0.6

Hope it is helpful for others.

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

Shicheng-Guo commented 7 years ago

I see. but I am not python user. I like bismark since I know how to change it because it is completed with Perl. However, there are too many great features of BSSeeker2, that's why I want to make a try, but actually, BSSeeker spend me lots of time to install, for example, python 2 vs python 3 and pysam versions and so on.

I am lucky. Now I can use it.

guoweilong commented 7 years ago

Thanks for your comments. I'll try to update it to be more convenient recently.

Weilong

At 2016-11-15 10:56:40, "Shicheng Guo" notifications@github.com wrote:

I see. but I am not python user. I like bismark since I know how to change it since it is completed with perl. but there are two many great features of BSSeeker2, that's why I want to make a try, but actually, BSSeeker spend me lots of time to install, for example, python 2 vs python 3 and pysam versions and so on.

I am lucky. Now I can use it.

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

guoweilong commented 7 years ago

Hi ShiCheng,

Thanks for your comments. And I have updated BS-Seeker2 to v2.1.0. The new version should work with pysam new versions.

Do let me know if you have any problem/comments/suggestion with BS-Seeker2.

Thanks and best, Weilong

DarrellL commented 7 years ago

Hi Weilong,

I'm seeing the same error mentioned by OP. I'm running BS-Seeker2 v2.1.0 & pysam v 0.9. Can you tell me which version(s) of pysam you validated the latest B-Seeker2 release with?

Thanks, Darrell

guoweilong commented 7 years ago

Hi Darrell,

Thanks for your feedback. It seems not fully commit the changes to the github. Currently, additional modificaitons are made here. You can try the new version v2.1.1.

Tip: Whenever update the BS_Seeker2 to newer version, just mv the bs_utils/reference_genome folder to your new BS-Seeker2 location, instead of re-building the new indexes.

Let me know if you have further question.

Thanks and best, Weilong

DarrellL commented 7 years ago

Thanks very much for the quick fix Weilong, it seems to be working fine now,

Cheers, Darrell

On 13/03/2017, at 4:27 PM, Weilong Guo notifications@github.com wrote:

Hi Darrell,

Thanks for your feedback. It seems not fully commit the changes to the github. Currently, additional modificaitons are made here. You can try the new version v2.1.1 https://github.com/BSSeeker/BSseeker2/releases/tag/v2.1.1.

Tip: Whenever update the BS_Seeker2 to newer version, just mv the bs_utils/reference_genome folder to your new BS-Seeker2 location, instead of re-building the new indexes.

Let me know if you have further question.

Thanks and best, Weilong

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/BSSeeker/BSseeker2/issues/11#issuecomment-286007555, or mute the thread https://github.com/notifications/unsubscribe-auth/AICtZBWVqMnBbw_LrZan8diFHLKuNlNVks5rlLeRgaJpZM4Kvdku.