Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • peromhc
    Senior Member
    • Sep 2009
    • 108

    samtools pileup error @ [fai_build_core]

    Hello,

    I am trying to use samtools pile up for SNP detection.

    I am getting this error with samtools pileup:

    [fai_build_core] line length exceeds 65535 in sequence tucosnp

    'tucosnp' is what I used as my ref sequence to build a bowtie index to which I aligned ~100million Illumina reads. 'tucosnp' is not a whole genome, but instead the product of concatenation of all my contigs generated from a de novo ABySS assembly. The reference is one big fasta file of about 150million bases.

    I'm not sure what I should do here... Splitting up the ref sequence into files of 65,000 bases seems absurd. Maybe I am missing something silly here..

    in $samtools pileup -f ref.fasta aln.sorted.bam

    I assume ref.fasta refers to the reference sequence (reference genome), but maybe I am wrong..

    Any help appreciated!
  • kmcarr
    Senior Member
    • May 2008
    • 1181

    #2
    It doesn't look like samtools is complaining that the sequence is too long; it says that the line is too long. When you concatenated your contigs into your fasta file did your wrap the sequence into multiple lines or write it as a single, ginormous line? It could also be an line break issue of you created the fasta file on one type of system (Mac, Linux, Win) and are running samtools on a different type.

    Comment

    • Mansequencer
      Member
      • Jul 2010
      • 16

      #3
      Hi peromhc,
      I am getting the same error in samtools faidx command ([fai_build_core] line length exceeds 65535 in sequence). Looked at all the scaffolds in my fasta file and nothing seems out of place. Could you please tell how you resolved your issue.
      Thanks,

      Comment

      • nilshomer
        Nils Homer
        • Nov 2008
        • 1283

        #4
        Originally posted by Mansequencer View Post
        Hi peromhc,
        I am getting the same error in samtools faidx command ([fai_build_core] line length exceeds 65535 in sequence). Looked at all the scaffolds in my fasta file and nothing seems out of place. Could you please tell how you resolved your issue.
        Thanks,
        What is the length of your longest line?

        Comment

        • brentp
          Member
          • Apr 2010
          • 72

          #5
          if you're on linux, a quick way to fix is to do:
          fold some.fasta > some.folded.fasta
          which will wrap any lines longer than 80 (or you can specify a length on the command-line).

          Comment

          • Mansequencer
            Member
            • Jul 2010
            • 16

            #6
            Hi Brentp,
            Thanks for your advice. It worked.

            Comment

            • Mamoon Rashid
              Junior Member
              • Feb 2011
              • 8

              #7
              I faced the same problem during "samtools faidx".
              [fai_build_core] line length exceeds 65535 in sequence 'Chromosome1'.
              I realised all bases (~4MB) are in one line. BWA index this without any problem. Then i used Linux "fold" command. AFter that samtools gives me following error--
              [fai_build_core] different line length in sequence 'Chromosome1'.
              In fact i had a reference containing two chromosomes, and i wanted to concatenate these two before indexing. Ultimately i solved this issue as follow--
              1. Removed the fasta header of the second chromosome (file1)
              2. seqret file1 file2
              This file2 is properly handled by samtools faidx.
              PS: Each line in fasta file should be equal in length in order to faidx work AND a single string must not greater than 65535 character.
              Curious to know other's comment.
              Thanks

              Comment

              Latest Articles

              Collapse

              • SEQadmin2
                Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
                by SEQadmin2


                Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

                The systematic characterization of the human proteome has
                ...
                07-20-2026, 11:48 AM
              • SEQadmin2
                Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
                by SEQadmin2



                Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
                ...
                07-09-2026, 11:10 AM
              • SEQadmin2
                Cancer Drug Resistance: The Lingering Barrier to Rising Survival
                by SEQadmin2



                Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

                There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
                07-08-2026, 05:17 AM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by SEQadmin2, 07-24-2026, 12:17 PM
              0 responses
              25 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-23-2026, 11:41 AM
              0 responses
              20 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-20-2026, 11:10 AM
              0 responses
              28 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-13-2026, 10:26 AM
              0 responses
              38 views
              0 reactions
              Last Post SEQadmin2  
              Working...