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

thread 'main' panicked at src/refine/refinery.rs:115:33 #58

Closed
Aveglia opened this issue Oct 15, 2024 · 2 comments
Closed

thread 'main' panicked at src/refine/refinery.rs:115:33 #58

Aveglia opened this issue Oct 15, 2024 · 2 comments

Comments

@Aveglia
Copy link

Aveglia commented Oct 15, 2024

Hello,

I have unfortunately been running into a few issues while trying to use Rosella recently. Oddly enough I was able to use it previously without issue and when I had to remove then reinstall the conda environment I cannot seem to get it to work. I had issues when I did not supply the coverage file, but then I went and produced a coverage file with metabat and input the coverage file into my command and now I am getting the following:

Command -> rosella recover --assembly contigs.fasta -C metabat_contigs_coverage.txt -t 31 --output-directory rosella_bins

output ->
[2024-10-15T20:40:55Z INFO rosella] rosella version 0.5.4
[2024-10-15T20:40:55Z INFO rosella::recover::recover_engine] Calculating contig coverages.
[2024-10-15T20:40:55Z INFO rosella::recover::recover_engine] Calculating TNF table.
[2024-10-15T20:40:57Z INFO rosella::recover::recover_engine] 277448 valid contigs, 0 filtered contigs.
[2024-10-15T20:40:57Z INFO rosella::recover::recover_engine] Time - 15:40:57 15-10-2024
[2024-10-15T20:40:57Z INFO rosella::recover::recover_engine] Command - /home/.mamba/envs/rosella/bin/flight bin --input metabat_non_xenia_non_sym_contigs_coverage.txt --kmer_frequencies xenia_rosella/kmer_frequencies.tsv --output xenia_rosella --min_contig_size 1500 --min_bin_size 200000 --n_neighbors 100 --cores 31
[2024-10-15T20:41:05Z INFO rosella::recover::recover_engine] Filtering disconnected contigs...
[2024-10-15T20:41:05Z INFO rosella::recover::recover_engine] Filtering Params - Max: 3.550032, 0.039308, 4445 Min: 3.698970, 0.003999, 1872
[2024-10-15T20:41:24Z INFO rosella::recover::recover_engine] Found 411 disconnected points. 411 TNF disconnected and 0 ADP disconnected...
[2024-10-15T20:41:24Z INFO rosella::recover::recover_engine] Filtered 411 contigs...
[2024-10-15T20:41:24Z INFO rosella::recover::recover_engine] Creating initial embedding of 280 contigs...
[2024-10-15T20:41:24Z INFO rosella::recover::recover_engine] Creating intersected UMAP...
[2024-10-15T20:41:32Z INFO rosella::recover::recover_engine] Clustering UMAP embedding...
[2024-10-15T20:41:33Z INFO rosella::recover::recover_engine] Embedding unbinned contigs...
[2024-10-15T20:41:33Z INFO rosella::recover::recover_engine] Creating intersected UMAP...
[2024-10-15T20:41:33Z INFO rosella::recover::recover_engine] Preparing output for parsing...
[2024-10-15T20:41:33Z INFO rosella::recover::recover_engine] Binning filtered contigs...
[2024-10-15T20:41:33Z INFO rosella::recover::recover_engine] Writing bins... 12
[2024-10-15T20:41:34Z INFO rosella::recover::recover_engine] Writing clusters.
thread 'main' panicked at src/refine/refinery.rs:115:33:
attempt to divide by zero
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Here is the output of head metabat_contigs_coverage.txt

contigName contigLen totalAvgDepth sorted_read_alignments_to_non sorted_read_alignments_to_non-var
NODE_353_length_27116_cov_87.845423 27116 194.504 194.504 543.121
NODE_1805_length_13210_cov_65.677233 13210 104.421 104.421 423.02
NODE_1919_length_12750_cov_75.069870 12750 95.8071 95.8071 588.248
NODE_2035_length_12320_cov_69.101345 12320 106.653 106.653 1244.08
NODE_2080_length_12179_cov_89.299159 12179 199.612 199.612 499.589
NODE_2144_length_12015_cov_98.964883 12015 169.155 169.155 5266.02
NODE_2364_length_11340_cov_83.420027 11340 123.715 123.715 2059.02
NODE_2714_length_10441_cov_3.495282 10441 5.4776 5.4776 16.5699
NODE_2959_length_9888_cov_74.982915 9888 101.181 101.181 584.575

Thank you for the program and any help/guidance you can provide!

@rhysnewell
Copy link
Owner

Hello!

Sorry my delay in responding, I've had my hands a bit full. So the good news, rosella is failing at this particular line:

let extra_threads = max(self.threads / self.mags_to_refine.len(), 1);

Due to a divide by 0 error. A silly mistake on my end. But it means that rosella found 0 mags to refine, so the output that currently exists should be the MAGs that rosella would have finished on. So you can take that output as the output of rosella, if it exists.

I'll fix this small issue. Does that make sense?

Cheers,
Rhys

rhysnewell added a commit that referenced this issue Oct 21, 2024
@Aveglia
Copy link
Author

Aveglia commented Oct 22, 2024

No worries at all, completely understandable. Yes, that makes sense. Ouput files seems to be there. Thanks for the help and for the tool!

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