PengNi / ccsmethphase

Methylatino phasing using PacBio CCS reads
MIT License
9 stars 0 forks source link

demo workflow error #2

Open MY0NEMA opened 1 year ago

MY0NEMA commented 1 year ago

hej,

I am trying to run the demo data but it throws me an error in the last steps:

[71/07e145] process > CheckGenome (CheckGenome) [100%] 1 of 1, cached: 1 ✔ [2e/b2d050] process > CheckCMModel (CheckCMModel) [100%] 1 of 1, cached: 1 ✔ [0e/b4443f] process > CheckAGModel (CheckAGModel) [100%] 1 of 1, cached: 1 ✔ [- ] process > CCSMETH_pbccs_call_hifi - [0a/680851] process > SAMTOOLS_index_bam (hg002.chr20_demo.hifi) [100%] 1 of 1, cached: 1 ✔
[f5/7081a8] process > CCSMETH_call_mods_denovo (hg002.chr20_demo.hifi) [100%] 1 of 1, cached: 1 ✔ [f6/cab01f] process > CCSMETH_align_hifi (hg002.chr20_demo.hifi.ccsmeth.modbam) [100%] 1 of 1, cached: 1 ✔ [13/245444] process > SAMTOOLS_merge_sortedbams (G1.HG002_demo) [100%] 1 of 1, cached: 1 ✔ [d3/b24dee] process > CLAIR3_hifi (G1.HG002_demo.hifi.ccsmeth.modbam.pbmm2.merged_size1) [100%] 1 of 1, cached: 1 ✔ [59/a3fc4f] process > WHATSHAP_snv_phase_haplotag (G1.HG002_demo) [100%] 1 of 1, cached: 1 ✔ [6e/dc1920] process > CCSMETH_call_freq_bam (G1.HG002_demo.hifi.ccsmeth.modbam.pbmm2.merged_size1.SNV_PASS_whatshap) [100%] 1 of 1, cached: 1 ✔ [02/3aaa5b] process > DSS_callDMR (G1.HG002_demo) [100%] 1 of 1, failed: 1 ✘ Execution cancelled -- Finishing pending tasks before exit ERROR ~ Error executing process > 'DSS_callDMR (G1.HG002_demo)'

Caused by: Process DSS_callDMR (G1.HG002_demo) terminated with an error exit status (2)

Command executed:

date; hostname; pwd

find the bed files used for dss

if [[ 3 -gt 3 ]] ; then bed_hp1=$(find -L ./ -type f -regex '..aggregate.hp1.bed') bed_hp2=$(find -L ./ -type f -regex '..aggregate.hp2.bed') else bed_hp1=$(find -L ./ -type f -regex '..hp1.bed') bed_hp2=$(find -L ./ -type f -regex '..hp2.bed') fi

echo ${bed_hp1} echo ${bed_hp2}

file_prefix=$(echo ${bed_hp1%1.bed})

python ~/tools/pacbio_5mc/scripts/hap/call_dmr_dss_nanomethphase.py -c 1,2,6,10,11 -ca ${bed_hp1} -co ${bed_hp2} -o ./ -op ${file_prefix} --overwrite > ${file_prefix}.logdmr.log

rm ${file_prefix}ReadyForDSS.tsv dmr_txt=${file_prefix}_callDMR.txt if [[ ! -f ${dmrtxt} ]] ; then echo "### ERROR: no expected output file" exit -1 fi awk 'BEGIN{ FS=OFS=" " } NR!=1 && $1 !~ /X/ && $1 !~ /Y/ && $1 !~ // && $1 !~ /M/ && sqrt($8 $8) > 0.2' ${dmr_txt} > $(echo ${dmr_txt%.txt}).autosomes_cf0.2.bed

Command exit status: 2

Command output: Thu Nov 2 16:28:51 CET 2023 r484.uppmax.uu.se /crex/proj/snic2020-2-19/private/herring/users/sabine/2023-11-02_FishMeth/ccsmethphase/work/02/3aaa5b251edba59c71e4705fb58aff ./G1.HG002_demo.hifi.ccsmeth.modbam.pbmm2.merged_size1.SNV_PASS_whatshap.freq.aggregate.hp1.bed ./G1.HG002_demo.hifi.ccsmeth.modbam.pbmm2.merged_size1.SNV_PASS_whatshap.freq.aggregate.hp2.bed

Command error: WARNING: Could not find any nv files on this host! INFO: Environment variable SINGULARITYENV_TMPDIR is set, but APPTAINERENV_TMPDIR is preferred INFO: Environment variable SINGULARITYENV_NXF_TASK_WORKDIR is set, but APPTAINERENV_NXF_TASK_WORKDIR is preferred INFO: Environment variable SINGULARITYENV_NXF_DEBUG is set, but APPTAINERENV_NXF_DEBUG is preferred Thu Nov 2 16:28:51 CET 2023 r484.uppmax.uu.se /crex/proj/snic2020-2-19/private/herring/users/sabine/2023-11-02_FishMeth/ccsmethphase/work/02/3aaa5b251edba59c71e4705fb58aff ./G1.HG002_demo.hifi.ccsmeth.modbam.pbmm2.merged_size1.SNV_PASS_whatshap.freq.aggregate.hp1.bed ./G1.HG002_demo.hifi.ccsmeth.modbam.pbmm2.merged_size1.SNV_PASS_whatshap.freq.aggregate.hp2.bed python: can't open file '/home/myonema/tools/pacbio_5mc/scripts/hap/call_dmr_dss_nanomethphase.py': [Errno 2] No such file or directory

Work dir: /crex/proj/snic2020-2-19/private/herring/users/sabine/2023-11-02_FishMeth/ccsmethphase/work/02/3aaa5b251edba59c71e4705fb58aff

Tip: when you have fixed the problem you can continue the execution adding the option -resume to the run command line

-- Check '.nextflow.log' file for details

I found the file it is complaning about in utils/call_dmr_dss_nanomethphase.py andI just copied it to the location where it is looking for it, but the error remains. Iam new to nextflow and I do not quite yet understand how to quickly fix issues I encounter, sry.

thanks, myo

PengNi commented 1 year ago

Hi myo, thanks for using our tool. It is indeed a path issue. I have updated the code. You can try the latest version of ccsmethphase, or just change ~/tools/pacbio_5mc/scripts/hap/call_dmr_dss_nanomethphase.py to utils/call_dmr_dss_nanomethphase.py in modules/dss_dmr.nf.

Best, Peng