Skip to content

[fai_build_core] different line length in sequence  #1387

@moldach

Description

@moldach

Are you using the latest version of samtools and HTSlib? If not, please specify.

(run samtools --version)

I'm running the latest version of samtools and htslib:

$ samtools --version
samtools 1.3.1
Using htslib 1.3.1

Please describe your environment.

  • OS (run uname -sr on Linux/Mac OS or wmic os get Caption, Version on Windows)
  • machine architecture (run uname -m on Linux/Mac OS or wmic os get OSArchitecture on Windows)
  • compiler (run gcc --version or clang --version)
$  uname -sr
Linux 4.18.0-193.28.1.el8_2.x86_64
$ gcc --version
gcc (GCC) 4.9.2

Please specify the steps taken to generate the issue, the command you are running and the relevant output.

I'm trying to add a bacterial decoy sequence to a reference genome and index it using faidx (like described in Samson et al., 2020 but running into an error with samtools faidx when attempting this with reference genomes recommended by Heng Li:

First download the Synthetic bacterial decoy from Genbank (MT169739.1) and then the reference genome(s). Next concatenate them and then try to index with samtools faidx:

$ wget ftp://ftp-trace.ncbi.nih.gov/1000genomes/ftp/technical/reference/human_g1k_v37.fasta.gz
$ bgzip -d human_g1k_v37.fasta.gz
$ cat sequence.fasta >> human_g1k_v37.fasta
$ samtools faidx human_g1k_v37.fasta
[fai_build_core] different line length in sequence 'GL000192.1'.
Could not build fai index human_g1k_v37.fasta.fai

$ wget ftp://ftp-trace.ncbi.nih.gov/1000genomes/ftp/technical/reference/phase2_reference_assembly_sequence/hs37d5.fa.gz
$ bgzip -d hs37d5.fa.gz
$ cat sequence.fasta >> hs37d5.fa
$ samtools faidx hs37d5.fa
[fai_build_core] different line length in sequence 'hs37d5'.
Could not build fai index hs37d5.fa.fai

However, using bwa-mem2 index successfully creates the .fai for human_g1k_v37.fasta but not hs37d5.fa

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions