akcorut / kGWASflow

kGWASflow is a Snakemake workflow for performing k-mers-based GWAS.
https://github.com/akcorut/kGWASflow/wiki
MIT License
28 stars 8 forks source link

Error in rule kmc_canonical #30

Open spaddys opened 7 months ago

spaddys commented 7 months ago

Hello! When I run the code I get the following error and when I check the log file logs/count_kmers/kmc/22558Bue_BER03/kmc_canon.log it is empty. Any help is much appreciated!

[Tue Feb 13 10:07:53 2024] Error in rule kmc_canonical: jobid: 1040 input: results/reads/22558Bue_BER03/input_files.txt output: results/kmers_count/22558Bue_BER03/output_kmc_canon.kmc_suf, results/kmers_count/22558Bue_BER03/output_kmc_canon.kmc_pre, results/kmers_count/22558Bue_BER03/kmc_canonical.done log: logs/count_kmers/kmc/22558Bue_BER03/kmccanon.log (check log file(s) for error details) conda-env: /mnt/gs21/scratch/creachma/kgwasflow/.snakemake/conda/e104339c381ba82f16e0be4d689f88f5 shell:

    kmc -t8  -v -k31 -ci2         @results/reads/22558Bue_BER03/input_files.txt results/kmers_count/22558Bue_BER03/output_kmc_canon results/kmers_count/22558Bue_BER03         1> results/kmers_count/22558Bue_BER03/kmc_canon.1 2> results/kmers_count/22558Bue_BER03/kmc_canon.2         > logs/count_kmers/kmc/22558Bue_BER03/kmc_canon.log

    (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)

Touching output file results/kmers_count/22557Eva_KTZ05/kmc_canonical.done. [Tue Feb 13 10:08:25 2024] Finished job 985. 50 of 723 steps (7%) done Shutting down, this might take some time. Exiting because a job execution failed. Look above for error message Complete log: .snakemake/log/2024-02-13T091310.930171.snakemake.log Checking if all required files are provided... All required files are present! Error! The Snakemake workflow aborted. ERROR:root:Error running Snakemake: Command '['snakemake', '--use-conda', '--conda-frontend', 'conda', '--cores', '16', '--snakefile', '/mnt/ufs18/rs-034/VanBuren_Lab/02_users/Maddy_Creach/CSS_844/envs/kgwasflow/lib/python3.11/site-packages/workflow/Snakefile', '--rerun-triggers', 'mtime', 'params', 'input', 'software-env', 'code']' returned non-zero exit status 1.

cedarwarman commented 7 months ago

Does "results/reads/22558Bue_BER03/input_files.txt" have the correct file paths, are the files non-zero in size? Does the log "logs/count_kmers/kmc/22558Bue_BER03/kmc_canon.log " have any extra info in it? Sometimes it helps to load the Conda environment and run the kmc command interactively, it might give you a more useful error message.

spaddys commented 7 months ago

Does "results/reads/22558Bue_BER03/input_files.txt" have the correct file paths, are the files non-zero in size? Does the log "logs/count_kmers/kmc/22558Bue_BER03/kmc_canon.log " have any extra info in it? Sometimes it helps to load the Conda environment and run the kmc command interactively, it might give you a more useful error message.

"results/reads/22558Bue_BER03/input_files.txt" does have the correct file paths with files that are non-zero. "logs/count_kmers/kmc/22558Bue_BER03/kmc_canon.log " does not have anything in it. I will try loading the Conda environment and running kmc to see what error it gives!

spaddys commented 7 months ago

Does "results/reads/22558Bue_BER03/input_files.txt" have the correct file paths, are the files non-zero in size? Does the log "logs/count_kmers/kmc/22558Bue_BER03/kmc_canon.log " have any extra info in it? Sometimes it helps to load the Conda environment and run the kmc command interactively, it might give you a more useful error message.

I just ran kmc in the Conda environment and it produced no error. The output file kmc_canon.1 is empty but the file kmc_canon.2 is not empty.

spaddys commented 6 months ago

The problem was with one of the samples I was running when removed kmc_canonical ran with no issue!

cedarwarman commented 6 months ago

Hooray! Glad it worked.

spaddys commented 6 months ago

Hooray! Glad it worked.

I now have an error with kmer_stats, I've attached the log file here. I tried to activate the conda environment and run the command but I only see the input and output and not the actual command. And "logs/plots/kmer_stats/plot_kmer_stats.log" is empty. Any more help is much appreciated! kgwas.log

cedarwarman commented 6 months ago

Hmm do the inputs (like logs/count_kmers/kmc/22557Eva_AEM01/kmc_all.log etc) have data in them? This is where the rule is calling the script that it seems like failed. If the input logs have data in them, you could try hard coding a couple in the python script at these lines. I would check the python script and look at your input log files and see if the python script is extracting the right information in the generate_kmers_stats_tab function.