Deepvariant variant calling by singularity
0
1
Entering edit mode
11 months ago

The code I run:

1. 
BIN_VERSION="1.5.0"

sudo apt -y update
sudo apt-get -y install docker.io
sudo docker pull google/deepvariant:"${BIN_VERSION}"

2.
# Pull the image
singularity pull docker://google/deepvariant:"${BIN_VERSION}"

3. 
mkdir 04.deepvariant 
# Run singularity
singularity run -B /mountpoint/fastQ/:/input \
  deepvariant_1.5.0.sif \
  /opt/deepvariant/bin/run_deepvariant \
  --model_type WES \
  --ref $REF  \
  --reads 03.align/$FQ.align.sort.marked.bam \
  --output_vcf /input/04.deepvariant/$FQ.output.vcf.gz

It doesn't work. The message:

INFO: converting sif file to temporary sandbox. INFO: cleaning up image.

It prints all the flags related to /opt/deepvariant/bin/run_deepvariant.py Maybe some flags are wrong. I don't know if the output directory could be the root directory where my reads and reference are located.

deepvariant singularity conda docker • 1.9k views
ADD COMMENT
0
Entering edit mode

I moved my data (reference .fasta, .fai and .bam, .bai) inside the INPUT_DIR. Then edit the code following this instruction https://github.com/google/deepvariant/blob/r1.5/docs/deepvariant-quick-start.md:

PWD=/mountpoint/fastQ
INPUT_DIR="${PWD}/testdata_input"
mkdir -p ${INPUT_DIR}
OUTPUT_DIR="${PWD}/04.deepvariant_output"
mkdir -p "${OUTPUT_DIR}"

sudo docker run \
  -v "${INPUT_DIR}":"/input" \
  -v "${OUTPUT_DIR}":"/output" \
  google/deepvariant:"${BIN_VERSION}" \
  /opt/deepvariant/bin/run_deepvariant \
  --model_type=WES \
  --ref=/input/Homo_sapiens_assembly38.fasta \
  --reads=/input/$FQ.align.sort.marked.bam \
  --output_vcf=/output/$FQ.vcf.gz \
  --output_gvcf=/output/$FQ.g.vcf.gz

This the error message:

I0703 11:40:58.754097 140133281920832 make_examples_core.py:257] Overhead for preparing inputs: 6 seconds
I0703 11:40:58.768027 140133281920832 make_examples_core.py:257] 0 candidates (0 examples) [0.01s elapsed]
ADD REPLY
0
Entering edit mode

Have you tried to build the container first and got the .sif file?

ADD REPLY
0
Entering edit mode

Now I'm trying. By running:

singularity build --sandbox /mountpoint/fastQ/singularity_sandbox docker://google/deepvariant:"${BIN_VERSION}"

I got this ERROR:

Could not remove bundle: could not remove "/mountpoint/fastQ/build-temp-709555147": unlinkat /mountpoint/fastQ/build-temp-709555147/rootfs/opt/licenses.zip: operation not permitted

I don't think is the solution. The image pull (the .sif file) from the Docker hub should be right.

ADD REPLY
0
Entering edit mode

What do you fin for build the container? As the command have I posted? Otherwise, do you suggest a tutorial?

ADD REPLY
0
Entering edit mode

Hi, sorry for late reply - what are you building this on is it a HPC?

When I built my sif container I did it in the login node of my HPC and loaded singularity and then ran singularity pull docker://google/deepvariant:1.3.0

ADD REPLY
0
Entering edit mode

No HPC, just my personal computer to test it. https://github.com/google/deepvariant/blob/r1.5/docs/deepvariant-quick-start.md This is the tutorial I've followed. I'm using conda package manager to install singularity I get a .sif file.

I get this output:

I0710 10:57:37.057581 140272616249152 make_examples_core.py:257] Overhead for preparing inputs: 18 seconds
I0710 10:57:37.079038 140272616249152 make_examples_core.py:257] 0 candidates (0 examples) [0.02s elapsed] 

All flags are right, I hope.

ADD REPLY
0
Entering edit mode

Your output should be in /mountpoint/fastQ/04.deepvariant/ outside of the Singularity image, is it not there?

are $REF and $FQ set to something? what does echo $REF and echo $FQ say?

ADD REPLY
0
Entering edit mode

$FQ is just the ID sample. $REF is the path of my reference .fasta file. I already edited --output_vcf with output directory as you suggested, but it doesn't work as well.

singularity run -B /mountpoint/fastQ/:/input \
deepvariant_1.5.0.sif \
/opt/deepvariant/bin/run_deepvariant \
  --model_type=WES \
  --ref=/input/references/Homo_sapiens/GATK/GRCh38/Sequence/WholeGenomeFasta/Homo_sapiens_assembly38.fasta  \
  --reads=/input/03.align/$FQ.align.sort.marked.bam \
  --output_vcf=/mountpoint/fastQ/04.deepvariant/$FQ.output.vcf.gz
ADD REPLY
0
Entering edit mode

Have you tried using the full file name to see if that works? Feel free to email me HousemanA@cardiff.ac.uk

ADD REPLY
0
Entering edit mode

I am having a similar issue was this ever resolved? Getting this error: I0922 22:22:08.794076 140356687390528 make_examples_core.py:257] Overhead for preparing inputs: 0 seconds I0922 22:22:08.795082 140356687390528 make_examples_core.py:257] 0 candidates (0 examples) [0.00s elapsed]

I'm pretty sure all the inputs are correct as I've bound each one individually, but the error still persists.

ADD REPLY

Login before adding your answer.

Traffic: 1409 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6