wdecoster / chopper

MIT License
155 stars 13 forks source link

Not working on M2 Mac #24

Closed stachyris closed 10 months ago

stachyris commented 10 months ago

Hi, I am facing a weird issue - log below

`thread '' panicked at src/main.rs:thread 'thread '120:' panicked at src/main.rs:120:4141: : called Result::unwrap() on an Err value: ReadError(Error { kind: InvalidData, message: "stream did not contain valid UTF-8" })called Result::unwrap() on an Err value: MissingAt note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

' panicked at src/main.rs:120:41: called Result::unwrap() on an Err value: ReadError(Error { kind: InvalidData, message: "stream did not contain valid UTF-8" }) thread '' panicked at src/main.rs:120:41: called Result::unwrap() on an Err value: MissingAt ``

This is my code gunzip -c ./00_Nanopore_Data/SO_12538_WBS_Sample2.fastq.gz | chopper -q 7 2> chopper.log | gzip > ./01_Trimmed_Data/SHAL_ONT_filtered.fq.gz

This seems to be coming from some config/incompatibility with the OS? I did download the compiled binary for Mac OS and also Conda install is not working.

I am on a M2 Mac Sonoma. Would be great if you can help me out what's going on?!

Thank you best, Vinay

wdecoster commented 10 months ago

Do you think you could share your input data? Or do you get the same error for other fastq files as well?

stachyris commented 10 months ago

Thank you for the quick response. I have yet to try running on different files. Initially, we received the file in fq format and then gzipped with tar -czvf. I am re-archiving the file to see if something went wrong. I will keep you posted. Thank you.

wdecoster commented 10 months ago

Well, that is not how you should gzip it. You have made a tar archive, not a gzipped file. A tar archive is to combine multiple files (which you presumably have). Tar archives are nice to transfer or archvie data, but are not ready to be used by other tools.

You should gzip yourreads.fastq to create a gzipped fastq file.

stachyris commented 10 months ago

Well, that is not how you should gzip it. You have made a tar archive, not a gzipped file. A tar archive is to combine multiple files (which you presumably have). Tar archives are nice to transfer or archvie data, but are not ready to be used by other tools.

You should gzip yourreads.fastq to create a gzipped fastq file.

I realised that after I posted the issue - re-running now with gzip. Sorry for the premature post.

stachyris commented 10 months ago

@wdecoster It's working fine with the correct gzipped file. Extremely sorry for the issue. Closing it now. Feel free to delete the issue.

best, Vinay

wdecoster commented 10 months ago

Glad to hear that things work! Feel free to let me know if there is anything else I can help with.