Code Monkey home page Code Monkey logo

vcf2maf-docker's Introduction

vcf2maf-vep

This Dockerfile is loosely based on this gist and can be used to create a Docker image with all of the necessary dependencies for vcf2maf to run with Ensemble v107. You just need to provide (1) the VEP 107 cache (instructions for grabbing it with rsync below) and (2) the genomic FASTA that you aligned to (for the NF-OSI pipeline, we currently use the GATK GRCh38 build, which can be acquired from iGenomes (instructions for grabbing it with the AWS CLI below).

The Docker repository for this is: https://hub.docker.com/r/nfosi/vcf2maf

Currently, this image uses a custom fork of vcf2maf to address a small incompatibility with VEP v107. When mskcc/vcf2maf#322 is resolved, we can switch back to the real release of vcf2maf.

## Need to have rsync and the aws-cliv2 installed.

## Get VEP 107 database. 
rsync -avr --progress rsync://ftp.ensembl.org/ensembl/pub/release-107/variation/indexed_vep_cache/homo_sapiens_vep_107_GRCh38.tar.gz $HOME/.vep/
tar -zxf $HOME/.vep/homo_sapiens_vep_107_GRCh38.tar.gz -C $HOME/.vep/

# alternatively, do (ftp can have faster transfer):
# wget ftp://ftp.ensembl.org/pub/release-107/variation/indexed_vep_cache/homo_sapiens_vep_107_GRCh38.tar.gz

## Get GATK GRCh38 genome (or whatever genome you aligned to if not this one...)
aws s3 --no-sign-request --region eu-west-1 sync s3://ngi-igenomes/igenomes/Homo_sapiens/GATK/GRCh38/ $HOME/Homo_sapiens_GATK_GRCh38/

## Get vcfs. Place in $HOME/vcfs

gunzip $HOME/vcfs/*

docker run -v $HOME/vcfs:/workdir/vcfs:rw -v $HOME/.vep:/workdir/vep:ro -v $HOME/Homo_sapiens_GATK_GRCh38/Sequence/WholeGenomeFasta:/workdir/fasta:ro -v $HOME/mafs:/workdir/mafs:rw -it --entrypoint /bin/bash nfosi/vcf2maf

cd /nf-osi-vcf2maf-*

##test

perl vcf2maf.pl --input-vcf /workdir/vcfs/28cNF.Strelka.filtered.vcf --output-maf /workdir/test.vep.maf --ref-fasta /workdir/fasta/Homo_sapiens_assembly38.fasta --vep-path /root/miniconda3/envs/vcf2maf/bin --vep-data /workdir/vep --ncbi-build GRCh38

Example loop to run in docker container:


for i in /workdir/vcfs/*.vcf; do
	echo $i 
	ic=$(basename ${i})
    ic=${ic%.Strelka.filtered.vcf}  ##change this to trim to your sample ID as necessary

    echo $ic

    perl vcf2maf.pl --input-vcf $i --output-maf /workdir/${ic}.vep.maf --ref-fasta /workdir/fasta/Homo_sapiens_assembly38.fasta --vep-path /root/miniconda3/envs/vcf2maf/bin --vep-data /workdir/vep --ncbi-build GRCh38 --tumor-id $ic
done


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.