2017-02-21 140 views
2

我從EMBL運行Perl腳本(在這裏找到https://github.com/EMBL-EBI-GCA/reseqtrack/blob/master/scripts/variation_data/calculate_allele_frq_from_vcf.pl)在Ubuntu 16.10下,我已經安裝了Vcftools和Tabix,並且都已經過測試,可以相應地工作。我用下面的命令執行該腳本:Perl腳本無法訪問Tabix文件夾

perl /home/[user]/calculate_allele_frq_from_vcf.pl \ 
-vcf /home/[user]/share/1000genomesPhase3VCFFiles/ALL.chr1.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz \ 
-sample_panel /home/[user]/share/1000genomesPhase3VCFFiles/integrated_call_samples_v3.20130502.ALL.panel \ 
-out_dir /home/[user]/Desktop/AlleleFrequency \ 
-tabix /home/[user]/tabix-0.2.6 \ 
-vcftools_dir /home/[user]/vcftools_0.1.13 \ 
-region 1:1-10000 \ 
-pop CEU,FIN \ 

這將返回以下錯誤

Smartmatch is experimental at /home/[user]/calculate_allele_frq_from_vcf.pl line 133. 
Smartmatch is experimental at /home/[user]/calculate_allele_frq_from_vcf.pl line 144. 
sh: 1: /home/[user]/tabix-0.2.6: Permission denied 
Broken VCF header, no column names? 
at /home/[user]/vcftools_0.1.13/perl/Vcf.pm line 172. 
    Vcf::throw(Vcf4_2=HASH(0x55761601d320), "Broken VCF header, no column names?") called at /home/[user]/vcftools_0.1.13/perl/Vcf.pm line 866 
    VcfReader::_read_column_names(Vcf4_2=HASH(0x55761601d320)) called at /home/[user]/vcftools_0.1.13/perl/Vcf.pm line 601 
    VcfReader::parse_header(Vcf4_2=HASH(0x55761601d320)) called at /home/[user]/vcftools_0.1.13/perl/vcf-subset line 121 
    main::vcf_subset(HASH(0x557615b24558)) called at /home/[user]/vcftools_0.1.13/perl/vcf-subset line 12 
Broken VCF header, no column names? 
at /home/[user]/vcftools_0.1.13/perl/Vcf.pm line 172. 
    Vcf::throw(Vcf4_2=HASH(0x55fa53436f60), "Broken VCF header, no column names?") called at /home/[user]/vcftools_0.1.13/perl/Vcf.pm line 866 
    VcfReader::_read_column_names(Vcf4_2=HASH(0x55fa53436f60)) called at /home/[user]/vcftools_0.1.13/perl/Vcf.pm line 601 
    VcfReader::parse_header(Vcf4_2=HASH(0x55fa53436f60)) called at /home/[user]/vcftools_0.1.13/perl/fill-an-ac line 45 
    main::fill_an_ac(undef) called at /home/[user]/vcftools_0.1.13/perl/fill-an-ac line 9 
sh: 1: /home/[user]/tabix-0.2.6: Permission denied 
Broken VCF header, no column names? 
at /home/[user]/vcftools_0.1.13/perl/Vcf.pm line 172. 
    Vcf::throw(Vcf4_2=HASH(0x5607d059a190), "Broken VCF header, no column names?") called at /home/[user]/vcftools_0.1.13/perl/Vcf.pm line 866 
    VcfReader::_read_column_names(Vcf4_2=HASH(0x5607d059a190)) called at /home/[user]/vcftools_0.1.13/perl/Vcf.pm line 601 
    VcfReader::parse_header(Vcf4_2=HASH(0x5607d059a190)) called at /home/[user]/vcftools_0.1.13/perl/vcf-subset line 121 
    main::vcf_subset(HASH(0x5607d00a1558)) called at /home/[user]/vcftools_0.1.13/perl/vcf-subset line 12 
Broken VCF header, no column names? 
at /home/[user]/vcftools_0.1.13/perl/Vcf.pm line 172. 
    Vcf::throw(Vcf4_2=HASH(0x556b8e952110), "Broken VCF header, no column names?") called at /home/[user]/vcftools_0.1.13/perl/Vcf.pm line 866 
    VcfReader::_read_column_names(Vcf4_2=HASH(0x556b8e952110)) called at /home/[user]/vcftools_0.1.13/perl/Vcf.pm line 601 
    VcfReader::parse_header(Vcf4_2=HASH(0x556b8e952110)) called at /home/[user]/vcftools_0.1.13/perl/fill-an-ac line 45 
    main::fill_an_ac(undef) called at /home/[user]/vcftools_0.1.13/perl/fill-an-ac line 9 
/home/[user]/Desktop/AlleleFrequency/calculated_fra.process3085.1.1-10000.CEU_FIN 

看來,劇本沒有權限訪問TABIX出於某種原因。我已經爲執行該腳本的用戶提供了文件夾完整的讀/寫權限(我)。有任何想法嗎?

+2

與實際問題無關,但您應該讓腳本的作者知道'Smartmatch在......警告處是試驗性的。如果腳本仍然保留,作者可能會想知道,通過找到避免使用'~~'的替代構造來解決這個警告是明智的。 – DavidO

+2

交叉發送[PerlMonks](http://www.perlmonks.org/?node_id=1182443)。 – choroba

回答

4

您將-tabix設置爲/home/[user]/tabix-0.2.6,但該代碼似乎需要指向可執行文件的路徑,而不是頂層目錄。將/bin/tabix添加到路徑應該可能解決問題。

+0

良好的通話。我想你應該在PM上發佈這個。 ......沒關係,我看你和它聯繫在一起。 – stevieb

+0

謝謝choroba,你的回答是正確的,除了/ bin /部分,tabix可執行文件位於基本文件夾中。因此正確的路徑是'/ home/[user] /tabix-0.2.6/tabix)' – Svencken