MrOlm / inStrain

Bioinformatics program inStrain
MIT License
134 stars 33 forks source link

inStrain Profile freeze - OSError: truncated file #174

Closed havi-rojer closed 3 months ago

havi-rojer commented 3 months ago

Hello,

I am running inStrain profile on a group of MAGs and the Illumina sequences used to assemble them. I've followed all the instructions in the inStrain manual and I have a BAM file made with Bowtie2, a sorted and indexed file for that BAM file in the same folder with the same basename, a FASTA file with the concatenated MAGs I mapped my reads to, a .fna file, and a .stb file. However, when I try to run inStrain profile, it freezes up during the "Establishing processes" step and the last terminal message before freezing is the following:

OSError: truncated file
ERROR:root:read filtering whole scaffold exception-

I've tried regenerating my SAM and BAM files but it doesn't seem to help. If you have any suggestions, I would really appreciate it.

Thanks!

MrOlm commented 3 months ago

Hi @havi-rojer - interesting, I haven't seen this error before. Can I ask what operating system your running this on? (linux, mac, etc.). Additionally, have you tried running in on a smaller set of genomes? (assuming you have a lot). I'm just wondering if this is a problem from your operating system or from having a really big file.

Finally, if you could try and run in debug mode (with -d) and then send me the log file (log.log in the log folder) that could help me troubleshoot as well.

Best, Matt

havi-rojer commented 3 months ago

Hi Matt,

Thanks so much for your reply.

I run inStrain on linux through a remote RStudio server. I tested it on your sample data set and it worked, which then prompted me to take a closer look at my files- I noticed that my bam file was labelled .BAM (capitalized) instead of .bam (lowercase). Once I made that change as well as adding the flags --use_full_fasta_header and --pairing_filter non_discordant (as suggested by the program), I was able to run it!