Samtools fails to open the h19.fasta file downloaded from the GATK resource bundle FTP. How to fix the problem? Thanks a lot!
I do not encounter this error unless the fasta file is not in the path I specified. I suspect your path is incorrect to the fasta file. Make sure you have the correct path specified.
What exactly are you trying to do? Can you post the exact command you ran?
~/samtools-1.2/bin/samtools faidx -t ~/h19.fasta
This is the command I ran. The result is the failure of opening the h19.fasta file.
I am still not sure what you mean by "failure of opening the hg19.fasta file". Are you getting an error message when you run the command, or are you trying to view the fasta file yourself? If you are trying to view the fasta file, what is the command you ran?
"failure of opening the hg19.fasta file" is the error message. Do you meet the similar situlation?
I downloaded hg19.fasta already indexed from from the GATK resource bundle FTP and I tried to build index again but faidx command doesn't work on hg19.fasta reference and I have the following error:
[fai_build] fail to open the FASTA file path_to/ucsc.hg19.fasta
Do you have any idea? Thank you for your help,
In the hg19.fasta, there are chrUn_gl000211....chrUn_gl000249 and chr1_gl000191_random.....chr21_gl000210_random. What are they. Do you have these in your fasta file?
You know, the same command on reference chr1.fa (from hg19) and it does work.
The contigs with chrUn are "unplaced" contigs, meaning we do not know which chromosome they belong to or where in the genome they map to.
The contigs with _random are contigs that we know which chromosome they map to, but we do not know the exact location they map to.
I hope this helps, but those extra contigs should not affect the opening of the file.
Hi @Sheila ,
I have the same problem as @cailei . This is my output error:
I tried to use samtools faidx on chr1.fa, it works perfectly. I tried also to use it on a truncated ucsc.hg19.fasta (chr 1-8) and it works perfectly as well. My path is correct, it is the same for chr1.fa reference. Do you have any idea?
You should ask the developers of samtools for help.