Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnicodeDecodeError: 'ascii' codec can't decode byte 0x8b in position 1: ordinal not in range(128) #397

Open
kerendanan1511 opened this issue Apr 21, 2024 · 1 comment

Comments

@kerendanan1511
Copy link

Hello,

when running rmats.py with these parameters

file=/a/home/cc/lifesci/kerendanan1/provide/high_quality/C017_SCR1Aligned.sortedByCoord.out.bam

output_dir=/a/home/cc/lifesci/kerendanan1/rmats_turbo/provide_rmats/C017_SCR1/rmats

GTF=/a/home/cc/lifesci/kerendanan1/rmats_turbo/gencode.v31lift37.annotation.gtf

python ~/.conda/envs/rmats_env/bin/rmats.py --b1 $file --gtf $GTF -t paired --readLength 150 --nthread 16 --od output_dir --tmp $output_dir/tmp_output --variable-read-length --novelSS --task both

I get this error:

Traceback (most recent call last):
File "/a/home/cc/lifesci/kerendanan1/.conda/envs/rmats_env/bin/rmats.py", line 595, in
main()
File "/a/home/cc/lifesci/kerendanan1/.conda/envs/rmats_env/bin/rmats.py", line 558, in main
args = get_args()
File "/a/home/cc/lifesci/kerendanan1/.conda/envs/rmats_env/bin/rmats.py", line 188, in get_args
args.b1 = fp.read().strip().strip(',')
File "/a/home/cc/lifesci/kerendanan1/.conda/envs/rmats_env/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0x8b in position 1: ordinal not in range(128)

Any idea what has gone wrong?

Thanks

@EricKutschera
Copy link
Contributor

Here's the line for that error: https://github.com/Xinglab/rmats-turbo/blob/v4.1.2/rmats.py#L188

The code expects --b1 to be a file with a single line of comma separated bam file paths: https://github.com/Xinglab/rmats-turbo/tree/v4.3.0?tab=readme-ov-file#starting-with-bam-files

Your command used a bam file directly as --b1 (C017_SCR1Aligned.sortedByCoord.out.bam)

Here's a similar issue: #213 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants