starskyzheng / panpop

Application of pan-genome for population
MIT License
87 stars 8 forks source link

realign.py #31

Closed pengyan19 closed 4 months ago

pengyan19 commented 5 months ago

你好我使用这个长序列的检测结构变异的时候出现不能创建暂时文件,但是我特指了configs/base.yaml目录,为啥还会报错?

cannot create tmpdir: /run/user/32160! at /public/home/pengyan/biosoft/panpop/scripts/realign.pl line 128.

starskyzheng commented 5 months ago

您好,请改一下configs/base.yamlmemory_tmp_dir参数试试。

Please note that the default temporary directory is configured as /run/user/UID. Should this directory not exist on your system, you will need to specify an alternative directory by modifying the memory_tmp_dir parameter in configs/base.yaml.

pengyan19 commented 5 months ago

你好,我是设置了memory_tmp_dir: "/public/home/pengyan/biosoft/panpop/tmp" 但是还是报错: cannot create tmpdir: /run/user/32160! at /public/home/pengyan/biosoft/panpop/scripts/realign.pl line 128.

starskyzheng commented 5 months ago

您snakemake的报错也麻烦截个图,我看看是哪步出错了

pengyan19 commented 5 months ago

好的,这个是报错的信息

Building DAG of jobs... Using shell: /usr/bin/bash Provided cores: 1 (use --cores to define parallelism) Rules claiming more threads will be scaled down. Job stats: job count min threads max threads


SVIM_asm_call_1_map 1 1 1 SVIM_asm_call_2_sort 1 1 1 SVIM_asm_call_3_index 1 1 1 SVIM_asm_call_4_haploidrun 1 1 1 all 1 1 1 aug_merge_dp2_infos 1 1 1 aug_realign0 1 1 1 aug_realign0_filldp 1 1 1 cal_aug_dp 4 1 1 concat_inv 4 1 1 consensus 2 1 1 consensus_inv 2 1 1 cuteSV_call 1 1 1 fill_aug_dp 4 1 1 filter_parse 4 1 1 filter_raw_vcf_by_depth 1 1 1 gen_merge_mask 3 1 1 merge_callers 4 1 1 merge_samples 1 1 1 merge_samples_filldp 1 1 1 merge_samples_genlist 1 1 1 merge_samples_genlist_filldp 1 1 1 merge_vcf_same_pos 2 1 1 pbsv_call 1 1 1 pop_realign2 1 1 1 pop_realign3 1 1 1 pop_split_by_type 2 1 1 pop_thin11 1 1 1 pop_thin12 1 1 1 pop_thin21 1 1 1 pop_thin22 1 1 1 pop_thin31 1 1 1 pop_thin32 1 1 1 pop_thin33 1 1 1 realign1 4 1 1 realign12 4 1 1 realign2 4 1 1 realign3 4 1 1 sort_vcf 37 1 1 sort_vcf_tbi 10 1 1 split_snp_indel_sv 4 1 1 svim_call 1 1 1 thin11 4 1 1 thin12 4 1 1 thin21 4 1 1 thin22 4 1 1 thin32 4 1 1 vcf2poss 1 1 1 total 144 1 1

Select jobs to execute...

[Fri Mar 29 08:53:01 2024] rule realign1: input: 04_consensus_vcf/s1/02.merge_vcf_same_pos.sorted.vcf.gz, Ref.fa output: 04_consensus_vcf/s1/03.realign1.unsorted.vcf.gz log: logs/3.03.s1.realign1.log jobid: 87 reason: Missing output files: 04_consensus_vcf/s1/03.realign1.unsorted.vcf.gz wildcards: sample=s1 resources: tmpdir=/tmp, mem_mb=40000, mem_mib=38147

    perl /public/home/pengyan/biosoft/panpop/scripts/realign.pl --chr_tolerance --in_vcf 04_consensus_vcf/s1/02.merge_vcf_same_pos.sorted.vcf.gz --out_vcf 04_consensus_vcf/s1/03.realign1.unsorted.vcf.gz --ref_fasta_file Ref.fa --threads 1 --level 1 --skip_mut_at_same_pos 2 --ext_bp_min 100 --ext_bp_max 400 --first_merge >>logs/3.03.s1.realign1.log 2>&1

[Fri Mar 29 08:53:05 2024] Error in rule realign1: jobid: 87 input: 04_consensus_vcf/s1/02.merge_vcf_same_pos.sorted.vcf.gz, Ref.fa output: 04_consensus_vcf/s1/03.realign1.unsorted.vcf.gz log: logs/3.03.s1.realign1.log (check log file(s) for error details) shell:

    perl /public/home/pengyan/biosoft/panpop/scripts/realign.pl --chr_tolerance --in_vcf 04_consensus_vcf/s1/02.merge_vcf_same_pos.sorted.vcf.gz --out_vcf 04_consensus_vcf/s1/03.realign1.unsorted.vcf.gz --ref_fasta_file Ref.fa --threads 1 --level 1 --skip_mut_at_same_pos 2 --ext_bp_min 100 --ext_bp_max 400 --first_merge >>logs/3.03.s1.realign1.log 2>&1

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

Shutting down, this might take some time. Exiting because a job execution failed. Look above for error message Complete log: ../../.snakemake/log/2024-03-29T085210.746502.snakemake.log

starskyzheng commented 5 months ago

Try this: https://github.com/starskyzheng/panpop/tree/starskyzheng-patch-1 I did not tested this branch yet. Your feedback is welcome!

biochristmas commented 5 months ago

Hello, I encountered the same error. Has this issue been resolved? If so, how was it resolved?

pengyan19 commented 5 months ago

还是不行,感觉这个临时文件设置对于realign.pl 脚本没用

starskyzheng commented 5 months ago

同样的,麻烦把snakemake的报错信息截图给我看看吧

biochristmas commented 5 months ago

image image

biochristmas commented 5 months ago

This is my error message. I have already followed your suggestion to modify memory_tmp_dir to an existing directory under my user directory. image image

biochristmas commented 5 months ago

Could you please give me some advice on how to resolve an error? Thank you very much.

starskyzheng commented 5 months ago

Hi biochristmas, The branch you used was not starskyzheng-patch-1 (url: https://github.com/starskyzheng/panpop/tree/starskyzheng-patch-1) Could you try this branch and then give a feedback?

biochristmas commented 5 months ago

Sure, I'll give it a try and provide you with a response. Thank you very much.

biochristmas commented 5 months ago

image Hello, I still encountered errors even though I used the version you specified. How can I resolve this?

biochristmas commented 5 months ago

image

biochristmas commented 5 months ago

Hello, I made further adjustments in the "base.yaml" file of the patched version, modifying the memory_tmp_dir parameter to "/data/myaccount/panpop/tmp" and creating the directory. After rerunning it, the error was successfully resolved. I sincerely appreciate your guidance.

starskyzheng commented 5 months ago

Thanks for feedback. This brach has been merged into main branch.