Samtools fails to open the h19.fasta file downloaded from the GATK resource bundle FTP.

caileicailei ShanghaiMember

Samtools fails to open the h19.fasta file downloaded from the GATK resource bundle FTP. How to fix the problem? Thanks a lot!

Best Answer

Answers

  • SheilaSheila Broad InstituteMember, Broadie, Moderator admin

    @cailei
    Hi,

    What exactly are you trying to do? Can you post the exact command you ran?

    Thanks,
    Sheila

  • caileicailei ShanghaiMember

    ~/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.

  • SheilaSheila Broad InstituteMember, Broadie, Moderator admin

    @cailei
    Hi,

    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?

    Thanks,
    Sheila

  • caileicailei ShanghaiMember

    Dear Sheila,

    "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,

  • caileicailei ShanghaiMember

    Dear Sheila,

    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.

  • SheilaSheila Broad InstituteMember, Broadie, Moderator admin

    @cailei
    Hi,

    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.

    -Sheila

  • MatteodiggMatteodigg ItalyMember

    Hi @Sheila ,
    I have the same problem as @cailei . This is my output error:

    [fai_build] fail to open the FASTA file path_to/ucsc.hg19.fasta

    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?

    Thanks,

    Matteo

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    You should ask the developers of samtools for help.

Sign In or Register to comment.