Advertisement
jhangyu

Setting up Ensembl-VEP (avoid system Perl!)

Nov 20th, 2017
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.37 KB | None | 0 0
  1. #DO NOT use cpan to install Bio::Perl !!!
  2. #You will be irritated by the conflicts of different perl dependency in different modules!
  3. #We can use apt-get/aptitude to install Perlbrew
  4. sudo aptitude install perlbrew
  5.  
  6. #init the perlbrew
  7. perlbrew init
  8.  
  9. #Add the perlbrew setting into bash environment
  10. source ~/perl5/perlbrew/etc/bashrc
  11. #Logout and re-login to bash is needed to let the environments setting to take effect
  12.  
  13. #List the available perl version to install in perlbrew
  14. perlbrew available
  15.  
  16. #I choose version perl-5.27.5 to install
  17. perlbrew install 5.27.5
  18. #It will take about 20~40mins
  19. #Fail on install 5.18.4
  20.  
  21. #Switch to perl-5.27.5 from system perl
  22. perlbrew use perl-5.27.5
  23.  
  24. #Make sure perl has been switched from system Perl to perl-5.27.5 in perlbrew environment
  25. perlbrew info
  26.  
  27. #Install cpanm, a installer of perl modules
  28. perlbrew install-cpanm
  29.  
  30. #Use cpanm to install DBI, DBD::mysql, Bio::Perl, the "-v" option is to make sure is there anything goes wrong during install process
  31. cpanm -v DBI
  32. cpanm -v DBD::mysql
  33. cpanm -v Bio::Perl
  34.  
  35. #Check if all the modules which Ensembl-VEP needed are installed
  36. perlbrew list-modules
  37.  
  38. #Install Ensembl-VEP form conda if you haven't install
  39. conda install ensembl-vep
  40.  
  41. #Set-up Ensembl-VEP
  42. vep_install -a cf -s oreochromis_niloticus  -c /data/vep --CONVERT
  43.  
  44. #We have to install Bio::DB::HTS modules =__=", and I've figure out the install way
  45.  
  46. #First, point out the HTSLib path
  47. export HTSLIB_DIR=/data/jhangyu/anaconda/pkgs/htslib-1.6-0/lib/
  48.  
  49. #And install the zlib
  50. sudo apt-get install zlib1g-dev
  51.  
  52. #Finally we can install the Bio::DB::HTS
  53. cpanm -v Bio::DB::HTS
  54.  
  55. #We are great to GO!!
  56.  
  57.  
  58. #####Ensembl-VEP Setting#####
  59.  
  60. #Install the VEP, Set-up the cache for oreochromis_niloticus
  61. vep_install -a cf -s oreochromis_niloticus  -c /data/vep --CONVERT
  62.  
  63.  
  64. #Parepare the GFF file
  65. #Pack the GFF
  66. grep -v "#" tilapia_20171005_with_yp_genes.gff3 | sort -k1,1 -k4,4n -k5,5n -t$'\t' | bgzip -c > rtilapia_20171005_with_yp_genes.gff.gz
  67. #Index the GFF
  68. tabix -p gff tilapia_20171005_with_yp_genes.gff.gz
  69.  
  70. #Prepare the Chromosome file
  71. bgzip /data/tilapia_source_file/tilapia.fa
  72.  
  73. #Run!!
  74. vep --species "oreochromis_niloticus" -i /data/fastq/Gong/NT1_HISAT2_output.vcf -gff /data/tilapia_source_file/tilapia_20171005_with_yp_genes.gff.gz -fasta /data/tilapia_source_file/tilapia.fa.gz --offline --dir "/data/vep/" --dir_cache "/data/vep/"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement