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

Require for Singularity image of Clair3 #6

Closed
huangnengCSU opened this issue May 18, 2021 · 4 comments · Fixed by #8
Closed

Require for Singularity image of Clair3 #6

huangnengCSU opened this issue May 18, 2021 · 4 comments · Fixed by #8
Labels
enhancement New feature or request

Comments

@huangnengCSU
Copy link

Hi,
Since HPC can not support docker, could you provide the singularity image and running example. I converted the docker image to a singularity image and successfully ran run_clair3.sh --help. However, when I tried to call variants, it always outputs the error message as follows:

[hpc_hn@node0023 120G]$ singularity exec --bind /public/home/hpc_hn/ont-quickstart/input/120G ~/tools/clair_docker_image/clair3_docker_image.sif /opt/bin/run_clair3.sh -b /public/home/hpc_hn/ont-quickstart/input/120G/hg003_120G.bam -f /public/home/hpc_hn/ont-quickstart/input/120G/GCA_000001405.15_GRCh38_no_alt_plus_hs38d1_analysis_set.fna -t 2 -p ont -m /public/home/hpc_hn/ont-quickstart/input/120G/ont -o /public/home/hpc_hn/ont-quickstart/input/120G/output
[INFO] BAM FILE PATH: /public/home/hpc_hn/ont-quickstart/input/120G/hg003_120G.bam
[INFO] REFERENCE FILE PATH: /public/home/hpc_hn/ont-quickstart/input/120G/GCA_000001405.15_GRCh38_no_alt_plus_hs38d1_analysis_set.fna
[INFO] MODEL PATH: /public/home/hpc_hn/ont-quickstart/input/120G/ont
[INFO] OUTPUT FOLDER: /public/home/hpc_hn/ont-quickstart/input/120G/output
[INFO] PLATFORM: ont
[INFO] THREADS: 2
[INFO] BED FILE PATH: EMPTY
[INFO] VCF FILE PATH: EMPTY
[INFO] CONTIGS: EMPTY
[INFO] SAMTOOLS PATH: samtools
[INFO] PYTHON PATH: python3
[INFO] PYPY PATH: pypy3
[INFO] PARALLEL PATH: parallel
[INFO] WHATSHAP PATH: whatshap
[INFO] CHUNK SIZE: 5000000
[INFO] CHUNK NUM: 0
[INFO] FULL ALIGN PROPORTION: 0.3
[INFO] FULL ALIGN RERFERENCE PROPORTION: 0.3
[INFO] USER DEFINED SNP THRESHOLD: 0.0
[INFO] USER DEFINED INDEL THRESHOLD: 0.0
[INFO] ENABLE FILEUP ONLY CALLING: False
[INFO] ENABLE FAST MODE CALLING: False
[INFO] ENABLE PRINTING REFERENCE CALLS: False
[INFO] ENABLE OUTPUT GVCF: False
[INFO] ENABLE HAPLOID PRECISE MODE: False
[INFO] ENABLE HAPLOID SENSITIVE MODE: False
[INFO] ENABLE INCLUDE ALL CTGS CALLING: False
[INFO] ENABLE NO PHASING FOR FULL ALIGNMENT: False

+ /opt/bin/scripts/clair3.sh --bam_fn /public/home/hpc_hn/ont-quickstart/input/120G/hg003_120G.bam --ref_fn /public/home/hpc_hn/ont-quickstart/input/120G/GCA_000001405.15_GRCh38_no_alt_plus_hs38d1_analysis_set.fna --threads 2 --model_path /public/home/hpc_hn/ont-quickstart/input/120G/ont --platform ont --output /public/home/hpc_hn/ont-quickstart/input/120G/output --bed_fn=EMPTY --vcf_fn=EMPTY --ctg_name=EMPTY --sample_name=EMPTY --chunk_num=0 --chunk_size=5000000 --samtools=samtools --python=python3 --pypy=pypy3 --parallel=parallel --whatshap=whatshap --qual=0 --var_pct_full=0.3 --ref_pct_full=0.3 --snp_min_af=0.0 --indel_min_af=0.0 --pileup_only=False --gvcf=False --fast_mode=False --print_ref_calls=False --haploid_precise=False --haploid_sensitive=False --include_all_ctgs=False --no_phasing_for_fa=False
[INFO] Check envrionment variables
[INFO] --include_all_ctgs not enabled, use chr{1..22,X,Y} and {1..22,X,Y} by default
[INFO] Call variant in contigs: chr1 chr2 chr3 chr4 chr5 chr6 chr7 chr8 chr9 chr10 chr11 chr12 chr13 chr14 chr15 chr16 chr17 chr18 chr19 chr20 chr21 chr22 chrX chrY
[INFO] Chunk number for each contig: 50 49 40 39 37 35 32 30 28 27 28 27 23 22 21 19 17 17 12 13 10 11 32 12
[INFO] 1/7 Calling variants using pileup model
[INFO] Delay 7 seconds before starting variant calling ...
taskset: failed to set pid 0's affinity: Invalid argument
[mpileup] 1 samples in 1 input files
Traceback (most recent call last):
  File "/opt/bin/clair3/../clair3.py", line 89, in <module>
    main()
  File "/opt/bin/clair3/../clair3.py", line 83, in main
    submodule.main()
  File "/opt/bin/preprocess/CreateTensorPileup.py", line 550, in main
    CreateTensorPileup(args)
  File "/opt/bin/preprocess/CreateTensorPileup.py", line 414, in CreateTensorPileup
    tensor_can_fp.stdin.write(l)
BrokenPipeError: [Errno 32] Broken pipe
@aquaskyline
Copy link
Member

aquaskyline commented May 18, 2021

Seems the taskset command is missing in your running environment, not sure if it's a problem of singularity or not. We are now looking into the problem and will turn back to you with a solution asap.

@aquaskyline aquaskyline added the enhancement New feature or request label May 18, 2021
@huangnengCSU
Copy link
Author

@aquaskyline
I have checked the environment and the taskset version is util-linux 2.23.2. And I installed Clair3 using conda and ran the command, it outputs the same error.

bash ~/tools/Clair3/run_clair3.sh -b `pwd`/hg003_120G.bam -f `pwd`/GCA_000001405.15_GRCh38_no_alt_plus_hs38d1_analysis_set.fna -m /public/home/hpc_hn/tools/Clair3/models/ont/ -t 4 -p ont -o `pwd`/clair3_output

[INFO] BAM FILE PATH: /public/home/hpc_hn/ont-quickstart/input/120G/hg003_120G.bam
[INFO] REFERENCE FILE PATH: /public/home/hpc_hn/ont-quickstart/input/120G/GCA_000001405.15_GRCh38_no_alt_plus_hs38d1_analysis_set.fna
[INFO] MODEL PATH: /public/home/hpc_hn/tools/Clair3/models/ont/
[INFO] OUTPUT FOLDER: /public/home/hpc_hn/ont-quickstart/input/120G/clair3_output
[INFO] PLATFORM: ont
[INFO] THREADS: 4
[INFO] BED FILE PATH: EMPTY
[INFO] VCF FILE PATH: EMPTY
[INFO] CONTIGS: EMPTY
[INFO] SAMTOOLS PATH: samtools
[INFO] PYTHON PATH: python3
[INFO] PYPY PATH: pypy3
[INFO] PARALLEL PATH: parallel
[INFO] WHATSHAP PATH: whatshap
[INFO] CHUNK SIZE: 5000000
[INFO] CHUNK NUM: 0
[INFO] FULL ALIGN PROPORTION: 0.3
[INFO] FULL ALIGN RERFERENCE PROPORTION: 0.3
[INFO] USER DEFINED SNP THRESHOLD: 0.0
[INFO] USER DEFINED INDEL THRESHOLD: 0.0
[INFO] ENABLE FILEUP ONLY CALLING: False
[INFO] ENABLE FAST MODE CALLING: False
[INFO] ENABLE PRINTING REFERENCE CALLS: False
[INFO] ENABLE OUTPUT GVCF: False
[INFO] ENABLE HAPLOID PRECISE MODE: False
[INFO] ENABLE HAPLOID SENSITIVE MODE: False
[INFO] ENABLE INCLUDE ALL CTGS CALLING: False
[INFO] ENABLE NO PHASING FOR FULL ALIGNMENT: False

+ /public/home/hpc_hn/tools/Clair3/scripts/clair3.sh --bam_fn /public/home/hpc_hn/ont-quickstart/input/120G/hg003_120G.bam --ref_fn /public/home/hpc_hn/ont-quickstart/input/120G/GCA_000001405.15_GRCh38_no_alt_plus_hs38d1_analysis_set.fna --threads 4 --model_path /public/home/hpc_hn/tools/Clair3/models/ont/ --platform ont --output /public/home/hpc_hn/ont-quickstart/input/120G/clair3_output --bed_fn=EMPTY --vcf_fn=EMPTY --ctg_name=EMPTY --sample_name=EMPTY --chunk_num=0 --chunk_size=5000000 --samtools=samtools --python=python3 --pypy=pypy3 --parallel=parallel --whatshap=whatshap --qual=0 --var_pct_full=0.3 --ref_pct_full=0.3 --snp_min_af=0.0 --indel_min_af=0.0 --pileup_only=False --gvcf=False --fast_mode=False --print_ref_calls=False --haploid_precise=False --haploid_sensitive=False --include_all_ctgs=False --no_phasing_for_fa=False
[INFO] Check envrionment variables
[INFO] --include_all_ctgs not enabled, use chr{1..22,X,Y} and {1..22,X,Y} by default
[INFO] Call variant in contigs: chr1 chr2 chr3 chr4 chr5 chr6 chr7 chr8 chr9 chr10 chr11 chr12 chr13 chr14 chr15 chr16 chr17 chr18 chr19 chr20 chr21 chr22 chrX chrY
[INFO] Chunk number for each contig: 50 49 40 39 37 35 32 30 28 27 28 27 23 22 21 19 17 17 12 13 10 11 32 12
[INFO] Create folder /public/home/hpc_hn/ont-quickstart/input/120G/clair3_output/log
[INFO] Create folder /public/home/hpc_hn/ont-quickstart/input/120G/clair3_output/tmp
[INFO] Create folder /public/home/hpc_hn/ont-quickstart/input/120G/clair3_output/tmp/pileup_output
[INFO] Create folder /public/home/hpc_hn/ont-quickstart/input/120G/clair3_output/tmp/merge_output
[INFO] Create folder /public/home/hpc_hn/ont-quickstart/input/120G/clair3_output/tmp/phase_output
[INFO] Create folder /public/home/hpc_hn/ont-quickstart/input/120G/clair3_output/tmp/gvcf_tmp_output
[INFO] Create folder /public/home/hpc_hn/ont-quickstart/input/120G/clair3_output/tmp/full_alignment_output
[INFO] Create folder /public/home/hpc_hn/ont-quickstart/input/120G/clair3_output/tmp/phase_output/phase_vcf
[INFO] Create folder /public/home/hpc_hn/ont-quickstart/input/120G/clair3_output/tmp/phase_output/phase_bam
[INFO] Create folder /public/home/hpc_hn/ont-quickstart/input/120G/clair3_output/tmp/full_alignment_output/candidate_bed
[INFO] 1/7 Calling variants using pileup model
[INFO] Delay 0 seconds before starting variant calling ...
taskset: failed to set pid 0's affinity: Invalid argument
call_variant.py exited with exceptions. Exiting...
[INFO] Delay 2 seconds before starting variant calling ...
taskset: failed to set pid 0's affinity: Invalid argument
call_variant.py exited with exceptions. Exiting...

@aquaskyline
Copy link
Member

aquaskyline commented May 18, 2021

The error was caused because taskset is asking for CPU cores that were made invisible to it by singularity. Here is a similar issue with more detailed explanations util-linux/util-linux#413. We are fixing the problem and will make a singularity image available asap.

@aquaskyline
Copy link
Member

taskset problem fixed, and a singularity image is provided (see README.md) in v0.1-r1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants