On 18 Nov 2016, at 08:04, 陈然 <[email protected]> wrote:
> I met a problem while running samtools faidx command. It shows like:
>  
> $ cd /biotool/samtools-1.3.1
> $ ./samtools faidx /data/hg19.fasta
> [fai_build] fail to open the FASTA file /data/hg19.fasta
> Could not build fai index /data/hg19.fasta.fai
>  
> I tried 3 reference genomes respectively: hg19.fasta, ucsc.hg19.fasta and 
> hg19.fa. They all show error messages like above.

It is unfortunate that the error messages do not show the underlying operating 
system error.  Also there are two files in play so in some cases it can be 
unclear which one the error relates to.  However the "fail to open the FASTA 
file" message almost certainly does simply mean that opening /data/hg19.fasta 
failed.  Are you sure that file path is correct, and do you have read 
permission there?  We should improve the error messages here, but you could run 
samtools under strace:

        strace -e open ./samtools faidx /data/hg19.fasta

and the last line of the additional logging should explain why it couldn't open 
/data/hg19.fasta.

    John

-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 

------------------------------------------------------------------------------
_______________________________________________
Samtools-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/samtools-help

Reply via email to