Closed ganiatgithub closed 1 year ago
Hi @ganiatgithub,
Thank you for reporting this issue. Your feedback is much appreciated!
The concatenate.py
script is part of the vamb package. Your cobinning.log
file shows the location of the script:
/home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/lib/python3.11/site-packages/metaphor/config/conda/224348222af4ceee3e6272b4bdf77bfe_/bin/concatenate.py
All tools installed by Metaphor are inside conda environments which in turn go into the config/conda
directory within the Metaphor installation directory.
Looking from the content of the cobinning.log
file, one of your contig files (which are used as input for concatenate.py
) is empty. Please check your MegaHIT output to see if any files are empty.
Furthermore, there is an error with the assembly_report
. I believe this one can be fixed if you update to the latest version of Metaphor (v1.7.7
), as there were a few bug fixes related to plotting, which includes the assembly_report
rule.
Best wishes, Vini
Hi Vini,
Thanks for the feedback.
I've updated to v1.7.7
, and ran the above command again within the existing project directory. It seems it is starting from the beginning or I'm mistaken? Here is a glimpse of terminal.
[Wed May 31 08:33:29 2023]
rule fastp_pe:
input: /home/gnii0001/rk81_scratch/gaofeng/projects/12_nutrition/data/00_reads/Fe1_11_S17_L003_R1_001.fastq.gz, /home/gnii0001/rk81_scratch/gaofeng/projects/12_nutrition/data/00_reads/Fe1_11_S17_L003_R2_001.fastq.gz
output: output/qc/fastp/Fe1_11_S17_L003_single_unit_R1.fq.gz, output/qc/fastp/Fe1_11_S17_L003_single_unit_R2.fq.gz, output/qc/fastp/Fe1_11_S17_L003_single_unit.html, output/qc/fastp/Fe1_11_S17_L003_single_unit.json
log: output/logs/qc/fastp/Fe1_11_S17_L003-single_unit.log
jobid: 192
benchmark: output/benchmarks/qc/fastp/Fe1_11_S17_L003-single_unit.txt
reason: Missing output files: output/qc/fastp/Fe1_11_S17_L003_single_unit_R1.fq.gz, output/qc/fastp/Fe1_11_S17_L003_single_unit_R2.fq.gz
wildcards: sample=Fe1_11_S17_L003, unit=single_unit
threads: 12
resources: tmpdir=/tmp, mem_mb=100000, mem_mib=95368
/home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/bin/python3.11 /fs03/rk81/gaofeng/projects/12_nutrition/script/.snakemake/scripts/tmpf2t4fbki.wrapper.py
/home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/bin/python3.11 /fs03/rk81/gaofeng/projects/12_nutrition/script/.snakemake/scripts/tmpkuy8uk40.wrapper.py
/home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/bin/python3.11 /fs03/rk81/gaofeng/projects/12_nutrition/script/.snakemake/scripts/tmp5j6aq8cp.wrapper.py
/home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/bin/python3.11 /fs03/rk81/gaofeng/projects/12_nutrition/script/.snakemake/scripts/tmpfqwocsrn.wrapper.py
Activating conda environment: ../../../../../../home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/lib/python3.11/site-packages/metaphor/config/conda/ab6cef3b4c38106c014c89e31ce84a7c_
Activating conda environment: ../../../../../../home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/lib/python3.11/site-packages/metaphor/config/conda/ab6cef3b4c38106c014c89e31ce84a7c_
Activating conda environment: ../../../../../../home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/lib/python3.11/site-packages/metaphor/config/conda/ab6cef3b4c38106c014c89e31ce84a7c_
Activating conda environment: ../../../../../../home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/lib/python3.11/site-packages/metaphor/config/conda/ab6cef3b4c38106c014c89e31ce84a7c_
(fastp --thread 12 -M 30 -l 50 --detect_adapter_for_pe --in1 /home/gnii0001/rk81_scratch/gaofeng/projects/12_nutrition/data/00_reads/Fe1_14_S38_L003_R1_001.fastq.gz --in2 /home/gnii0001/rk81_scratch/gaofeng/projects/12_nutrition/data/00_reads/Fe1_14_S38_L003_R2_001.fastq.gz --out1 output/qc/fastp/Fe1_14_S38_L003_single_unit_R1.fq.gz --out2 output/qc/fastp/Fe1_14_S38_L003_single_unit_R2.fq.gz --json output/qc/fastp/Fe1_14_S38_L003_single_unit.json --html output/qc/fastp/Fe1_14_S38_L003_single_unit.html ) > output/logs/qc/fastp/Fe1_14_S38_L003-single_unit.log 2>&1
(fastp --thread 12 -M 30 -l 50 --detect_adapter_for_pe --in1 /home/gnii0001/rk81_scratch/gaofeng/projects/12_nutrition/data/00_reads/Fe2_3_S59_L003_R1_001.fastq.gz --in2 /home/gnii0001/rk81_scratch/gaofeng/projects/12_nutrition/data/00_reads/Fe2_3_S59_L003_R2_001.fastq.gz --out1 output/qc/fastp/Fe2_3_S59_L003_single_unit_R1.fq.gz --out2 output/qc/fastp/Fe2_3_S59_L003_single_unit_R2.fq.gz --json output/qc/fastp/Fe2_3_S59_L003_single_unit.json --html output/qc/fastp/Fe2_3_S59_L003_single_unit.html ) > output/logs/qc/fastp/Fe2_3_S59_L003-single_unit.log 2>&1
Previously, I have completed assembly of 90 samples, and 90 *contigs_renamed.fa
files were found:
find . -type f -name "*renamed.fa"
./Fe2_40_S32_L003/Fe2_40_S32_L003.contigs_renamed.fa
./Fe2_42_S53_L003/Fe2_42_S53_L003.contigs_renamed.fa
./Fe2_43_S13_L003/Fe2_43_S13_L003.contigs_renamed.fa
./Fe2_34_S47_L003/Fe2_34_S47_L003.contigs_renamed.fa
./Fe1_34_S66_L003/Fe1_34_S66_L003.contigs_renamed.fa
./Fe2_24_S80_L003/Fe2_24_S80_L003.contigs_renamed.fa
./Fe1_21_S49_L003/Fe1_21_S49_L003.contigs_renamed.fa
./Fe2_28_S5_L003/Fe2_28_S5_L003.contigs_renamed.fa
./Fe2_12_S81_L003/Fe2_12_S81_L003.contigs_renamed.fa
./Fe2_10_S33_L003/Fe2_10_S33_L003.contigs_renamed.fa
./Fe1_31_S20_L003/Fe1_31_S20_L003.contigs_renamed.fa
./Fe2_5_S23_L003/Fe2_5_S23_L003.contigs_renamed.fa
./Fe1_19_S58_L003/Fe1_19_S58_L003.contigs_renamed.fa
./Fe1_13_S75_L003/Fe1_13_S75_L003.contigs_renamed.fa
./Fe2_20_S39_L003/Fe2_20_S39_L003.contigs_renamed.fa
./Fe2_30_S88_L003/Fe2_30_S88_L003.contigs_renamed.fa
./Fe1_22_S22_L003/Fe1_22_S22_L003.contigs_renamed.fa
./Fe1_8_S28_L003/Fe1_8_S28_L003.contigs_renamed.fa
./Fe2_36_S4_L003/Fe2_36_S4_L003.contigs_renamed.fa
./Fe2_31_S19_L003/Fe2_31_S19_L003.contigs_renamed.fa
./Fe2_15_S86_L003/Fe2_15_S86_L003.contigs_renamed.fa
./Fe1_9_S16_L003/Fe1_9_S16_L003.contigs_renamed.fa
./Fe2_21_S34_L003/Fe2_21_S34_L003.contigs_renamed.fa
./Fe1_45_S48_L003/Fe1_45_S48_L003.contigs_renamed.fa
./Fe2_29_S41_L003/Fe2_29_S41_L003.contigs_renamed.fa
./Fe1_11_S17_L003/Fe1_11_S17_L003.contigs_renamed.fa
./Fe1_29_S42_L003/Fe1_29_S42_L003.contigs_renamed.fa
./Fe2_38_S3_L003/Fe2_38_S3_L003.contigs_renamed.fa
./Fe1_30_S77_L003/Fe1_30_S77_L003.contigs_renamed.fa
./Fe2_6_S76_L003/Fe2_6_S76_L003.contigs_renamed.fa
./Fe1_42_S87_L003/Fe1_42_S87_L003.contigs_renamed.fa
./Fe2_44_S84_L003/Fe2_44_S84_L003.contigs_renamed.fa
./Fe2_7_S73_L003/Fe2_7_S73_L003.contigs_renamed.fa
./Fe1_28_S36_L003/Fe1_28_S36_L003.contigs_renamed.fa
./Fe1_15_S61_L003/Fe1_15_S61_L003.contigs_renamed.fa
./Fe1_44_S69_L003/Fe1_44_S69_L003.contigs_renamed.fa
./Fe1_23_S21_L003/Fe1_23_S21_L003.contigs_renamed.fa
./Fe2_39_S55_L003/Fe2_39_S55_L003.contigs_renamed.fa
./Fe1_26_S56_L003/Fe1_26_S56_L003.contigs_renamed.fa
./Fe2_4_S51_L003/Fe2_4_S51_L003.contigs_renamed.fa
./Fe1_6_S67_L003/Fe1_6_S67_L003.contigs_renamed.fa
./Fe1_10_S35_L003/Fe1_10_S35_L003.contigs_renamed.fa
./Fe2_3_S59_L003/Fe2_3_S59_L003.contigs_renamed.fa
./Fe1_2_S44_L003/Fe1_2_S44_L003.contigs_renamed.fa
./Fe2_35_S9_L003/Fe2_35_S9_L003.contigs_renamed.fa
./Fe1_39_S7_L003/Fe1_39_S7_L003.contigs_renamed.fa
./Fe2_25_S46_L003/Fe2_25_S46_L003.contigs_renamed.fa
./Fe1_41_S50_L003/Fe1_41_S50_L003.contigs_renamed.fa
./Fe2_41_S37_L003/Fe2_41_S37_L003.contigs_renamed.fa
./Fe1_3_S78_L003/Fe1_3_S78_L003.contigs_renamed.fa
./Fe1_7_S54_L003/Fe1_7_S54_L003.contigs_renamed.fa
./Fe2_2_S12_L003/Fe2_2_S12_L003.contigs_renamed.fa
./Fe1_1_S1_L003/Fe1_1_S1_L003.contigs_renamed.fa
./Fe1_24_S74_L003/Fe1_24_S74_L003.contigs_renamed.fa
./Fe2_11_S45_L003/Fe2_11_S45_L003.contigs_renamed.fa
./Fe1_38_S14_L003/Fe1_38_S14_L003.contigs_renamed.fa
./Fe2_17_S25_L003/Fe2_17_S25_L003.contigs_renamed.fa
./Fe1_37_S64_L003/Fe1_37_S64_L003.contigs_renamed.fa
./Fe1_20_S15_L003/Fe1_20_S15_L003.contigs_renamed.fa
./Fe1_18_S57_L003/Fe1_18_S57_L003.contigs_renamed.fa
./Fe2_13_S43_L003/Fe2_13_S43_L003.contigs_renamed.fa
./Fe2_18_S65_L003/Fe2_18_S65_L003.contigs_renamed.fa
./Fe1_33_S70_L003/Fe1_33_S70_L003.contigs_renamed.fa
./Fe2_9_S8_L003/Fe2_9_S8_L003.contigs_renamed.fa
./Fe2_37_S85_L003/Fe2_37_S85_L003.contigs_renamed.fa
./Fe1_32_S30_L003/Fe1_32_S30_L003.contigs_renamed.fa
./Blank2_S82_L003/Blank2_S82_L003.contigs_renamed.fa
./Fe1_12_S11_L003/Fe1_12_S11_L003.contigs_renamed.fa
./Fe2_8_S6_L003/Fe2_8_S6_L003.contigs_renamed.fa
./Fe1_4_S63_L003/Fe1_4_S63_L003.contigs_renamed.fa
./Fe1_27_S29_L003/Fe1_27_S29_L003.contigs_renamed.fa
./Fe2_19_S90_L003/Fe2_19_S90_L003.contigs_renamed.fa
./Fe2_33_S89_L003/Fe2_33_S89_L003.contigs_renamed.fa
./Fe2_1_S2_L003/Fe2_1_S2_L003.contigs_renamed.fa
./Fe1_35_S72_L003/Fe1_35_S72_L003.contigs_renamed.fa
./Fe1_5_S40_L003/Fe1_5_S40_L003.contigs_renamed.fa
./Fe2_22_S31_L003/Fe2_22_S31_L003.contigs_renamed.fa
./Fe1_16_S62_L003/Fe1_16_S62_L003.contigs_renamed.fa
./Fe1_40_S27_L003/Fe1_40_S27_L003.contigs_renamed.fa
./Fe1_36_S52_L003/Fe1_36_S52_L003.contigs_renamed.fa
./Fe1_25_S79_L003/Fe1_25_S79_L003.contigs_renamed.fa
./Fe2_16_S83_L003/Fe2_16_S83_L003.contigs_renamed.fa
./Fe1_14_S38_L003/Fe1_14_S38_L003.contigs_renamed.fa
./Fe2_26_S68_L003/Fe2_26_S68_L003.contigs_renamed.fa
./Fe2_45_S26_L003/Fe2_45_S26_L003.contigs_renamed.fa
./Fe1_43_S10_L003/Fe1_43_S10_L003.contigs_renamed.fa
./Blank1_S60_L003/Blank1_S60_L003.contigs_renamed.fa
./Fe2_32_S71_L003/Fe2_32_S71_L003.contigs_renamed.fa
./Fe2_27_S18_L003/Fe2_27_S18_L003.contigs_renamed.fa
./Fe1_17_S24_L003/Fe1_17_S24_L003.contigs_renamed.fa
find . -type f -name "*renamed.fa" | wc -l
90
So I'm not understanding the error from concatenate.py
.
Will updating the software will make it to default to start from beginning?
Hi @ganiatgithub, thank you for the follow-up.
Will updating the software will make it to default to start from beginning?
No, that shouldn't be the case.
Your output shows that it's running it again because there are some output files missing:
reason: Missing output files: output/qc/fastp/Fe1_11_S17_L003_single_unit_R1.fq.gz, output/qc/fastp/Fe1_11_S17_L003_single_unit_R2.fq.gz
Why that is the case, I am not sure. Could be a problem with Snakemake itself. Usually it will look for previously existing files and if they are there, there should be no reason to run things again.
Previously, I have completed assembly of 90 samples, and 90 *contigs_renamed.fa files were found: [...] So I'm not understanding the error from concatenate.py.
Yes, apparently all of your files were correctly generated, as evidenced by your find
command. However, I think one or more of these files may be empty, hence the error in concatenate.py
. Can you check the content of all files to see if they are not empty, e.g. with du -shc */*_renamed.fa
?
Thanks, Vini
Indeed, one contig file from control samples is empty, which makes sense. I've added artificial sequence into this contig as a quick-and-dirty way to bypass this for now. And because of the following, I'm re-running with -e " --rerun-incomplete"
Thanks again!
>artificial
ACGT
Building DAG of jobs...
IncompleteFilesException:
The files below seem to be incomplete. If you are sure that certain files are not incomplete, mark them as complete with
snakemake --cleanup-metadata <filenames>
To re-generate the files rerun your command with the --rerun-incomplete flag.
Incomplete files:
output/qc/fastp/Fe1_11_S17_L003_single_unit_R1.fq.gz
output/qc/fastp/Fe1_11_S17_L003_single_unit_R2.fq.gz
output/qc/fastp/Fe1_11_S17_L003_single_unit.html
output/qc/fastp/Fe1_11_S17_L003_single_unit.json
output/qc/fastp/Fe1_14_S38_L003_single_unit_R1.fq.gz
output/qc/fastp/Fe1_14_S38_L003_single_unit_R2.fq.gz
output/qc/fastp/Fe1_14_S38_L003_single_unit.html
output/qc/fastp/Fe1_14_S38_L003_single_unit.json
output/qc/fastp/Fe2_13_S43_L003_single_unit_R1.fq.gz
output/qc/fastp/Fe2_13_S43_L003_single_unit_R2.fq.gz
output/qc/fastp/Fe2_13_S43_L003_single_unit.html
output/qc/fastp/Fe2_13_S43_L003_single_unit.json
Metaphor did not finish with exit code 1. Please see the error message below.
Traceback (most recent call last):
File "/home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/bin/metaphor", line 10, in <module>
sys.exit(main())
^^^^^^
File "/home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/lib/python3.11/site-packages/metaphor/cli/cli.py", line 260, in main
args.func(args)
File "/home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/lib/python3.11/site-packages/metaphor/cli/execute.py", line 109, in main
retcode = run_cmd(cmd)
^^^^^^^^^^^^
File "/home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/lib/python3.11/site-packages/metaphor/utils.py", line 92, in run_cmd
retcode = check_call(cmd.split())
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/lib/python3.11/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['snakemake', '--snakefile', '/home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/lib/python3.11/site-packages/metaphor/workflow/Snakefile', '--configfile', 'metaphor_settings.yaml', '--cores', '48', '-p', '-r', '--use-conda', '--wrapper-prefix', 'https://github.com/snakemake/snakemake-wrappers/raw/', '--conda-prefix', '/home/gnii0001/rp24/gaofeng/tools/Miniconda3/envs/metaphor/lib/python3.11/site-packages/metaphor/config/conda', '--config', 'samples=samples.csv', '--config', 'max_mb=200000']' returned non-zero exit status 1.
Great! Glad you got it to work. Please don't hesitate to reopen this or open another issue if you continue to have problems.
Hi @vinisalazar,
I'm with
Metaphor v1.7.5 CLI
. I was wondering if the following is related to aconcatenate.py
, which I cannot locate. My script for running metaphor:Error log:
Also, in the
cobinning.log
, it has:Could you suggest ways to troubleshoot?
Best, Gaofeng