Question: The bcftools/htslib VCF commands - Download and installation
0
gravatar for chengyi31000
24 months ago by
chengyi3100010
chengyi3100010 wrote:

I have much VCF files of sequencing data. (one sample one VCF) And I want to merge it together.I find that vcftools can do this,

perl vcf-merge /home/chung/seqdataQC/NGS2015011B_S1.genome.vcf.gz \
    /home/chung/seqdataQC/NGS2015011D_S1.genome.vcf.gz \
    /home/chung/seqdataQC/NGS2015011E_S1.genome.vcf.gz \
    | gzip -c > /home/chung/seqdataQC/out.vcf.gz
------------------------------------------------------------------------

but I got error as following:

Can't locate Vcf.pm in @INC (@INC contains: /usr/local/lib64/perl5/site_perl /usr/local/lib64/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at vcf-merge line 9.

BEGIN failed--compilation aborted at vcf-merge line 9.

then I find bcftools can also do this, but I have problem installation it,

git clone [--branch=name] git://github.com/samtools/htslib.git htslib
git clone git://github.com/samtools/bcftools.git bcftools
========================================================================

Cloning into 'bcftools'...
fatal: unable to access 'https://github.com/samtools/bcftools.git/': Could not resolve proxy: proxyServer; Unknown error

Please help me solve these problem thank you

sequencing vcftools bcftools • 1.2k views
ADD COMMENTlink modified 24 months ago by aham40 • written 24 months ago by chengyi3100010
1

Works fine for me. Do you use a proxy server to connect to the Internet?

ADD REPLYlink written 24 months ago by RamRS20k

i have try using this git config --global http.proxy "" but did not work

ADD REPLYlink written 24 months ago by chengyi3100010
0
gravatar for aham
24 months ago by
aham40
aham40 wrote:

For 'perl vcf-merge' error, the possible reason is export the PATH and PERL5LIB, every time you start using vcftools.
export PERL5LIB=/home/tools/vcftools_0.1.12a/perl
export PATH=$PATH:/home/tools/vcftools_0.1.12a/bin/

ADD COMMENTlink written 24 months ago by aham40

I have try again, but it has new error as following how can I deal with it?

sh: tabix: command not found
which: no tabix in (/opt/jdk1.8.0_101/bin:/opt/R-3.3.1/bin/:/opt/plink-1.07-\
x86_64:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/chung/.local/bin:\
/home/chung/bin:/path_to_directory_with_tabix:/home/tools/vcftools_0.1.12a/bin/\
::/home/tools/vcftools_0.1.12a/bin/)

The command "tabix" not found, please add it to your PATH

 at /usr/lib64/perl5/Vcf.pm line 172.
        Vcf::throw('Vcf4_1=HASH(0x19f63b0)', 'The command "tabix" not found, please add it to your PATH\x{a}') called at /usr/lib64/perl5/Vcf.pm line 2672
        VcfReader::get_chromosomes('Vcf4_1=HASH(0x19f63b0)') called at vcf-merge line 197
        main::init_cols('HASH(0x1de2488)', 'Vcf4_2=HASH(0x19f6038)') called at vcf-merge line 279
        main::merge_vcf_files('HASH(0x1de2488)') called at vcf-merge line 12

```

ADD REPLYlink modified 24 months ago by RamRS20k • written 24 months ago by chengyi3100010

While export, have you changed "/home/tools/vcftools_0.1.12a" to your actual path and version of vcftools? I can see in the error it is showing same path as I pasted. Please export with correct path and version of your vcftools. Also you can place/copy the 'tabix' command in '/usr/local/bin/' directory.

ADD REPLYlink written 24 months ago by aham40

when using my path it would have the following error how can I deal with it? [chung@1gIBMgX365073 bin]$ export PERL5LIB= /home/chung/vcftools_0.1.13/perl -bash: export: /home/chung/vcftools_0.1.13/perl': not a valid identifier [chung@1gIBMgX365073 bin]$ export PATH=$PATH: /home/chung/vcftools_0.1.13/bin/ -bash: export:/home/chung/vcftools_0.1.13/bin/': not a valid identifier

ADD REPLYlink written 24 months ago by chengyi3100010

WHERE is the "tabix" command ???

ADD REPLYlink written 24 months ago by chengyi3100010

Sounds like make was not performed after downloading vcftools. Type make and press enter in your vcftools_0.1.13/ directory. After the make, export PATH and PERL5LIB:

export PERL5LIB=/home/chung/vcftools_0.1.13/perl     
export PATH=$PATH:/home/chung/vcftools_0.1.13/bin/

Hopefully it should work.

For tabix, download htslib-1.4 from here. tabix and bgzip are parts of htslib, and these are required for working with vcftools, bcftools.

ADD REPLYlink modified 24 months ago by RamRS20k • written 24 months ago by aham40

Thank you ! I will try it.

ADD REPLYlink written 24 months ago by chengyi3100010
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1141 users visited in the last hour