Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • all_your_base
    Member
    • Mar 2012
    • 40

    #1

    Fastx giving error for Illumina data

    Hi,

    I'm trying to do some quality scoring/trimming on some Illumina, SE RNAseq data, but keep getting an unusual error message from Fastx. The reads are 36bp long, and I suspect that these use the older Illumina quality scores instead of today's ASCII-33, which may be the problem.


    Here is the command and its output:

    fastx_quality_stats -Q33 -i myInput.fastq -o myOutput.fastq.stats
    fastx_quality_stats: Invalid input: expecting FASTQ prefix character '@' on line 32868957. Is this a valid FASTQ file?


    This line in question is the last line of the file. I tried paring back the read file to make sure the last read wasn't truncated or something, but I still get the same error.


    If I run the command without the "-Q33" I get the following:

    fastx_quality_stats: Invalid quality score value (char '#' ord 35 quality value -29) on line 4


    I'm eager to try suggestions, so please let me know ! thanks
  • Wallysb01
    Senior Member
    • Feb 2011
    • 286

    #2
    is it just the lack of a space between the -Q and the 33?

    Comment

    • all_your_base
      Member
      • Mar 2012
      • 40

      #3
      Thanks for the suggestion! Actually, -Q33 works just fine. Turns out each read file ended with a newline character which was responsible for confusing fastx.

      Solved!

      Comment

      • Phoenix
        Junior Member
        • Aug 2013
        • 6

        #4
        Hi all_your_base,
        I'm extremely new to Linux and working with NGS data and I'm trying to get my hands wet! Like you I'm getting the "expecting FASTQ prefix character '@' on line 62049. Is this a valid FASTQ file?" error when using fastx. How did you solve the problem?

        Comment

        • GenoMax
          Senior Member
          • Feb 2008
          • 7142

          #5
          This error may be related to the file format differences between windows/unix.

          Since ubuntu is likely the most popular *nix people use, here is a link on how to do the conversion: http://ubuntugenius.wordpress.com/20...uxunix-format/

          You may need to install one of the two programs the link references by doing

          Code:
          $ sudo apt-get install flip (or fromdos)

          Comment

          • Phoenix
            Junior Member
            • Aug 2013
            • 6

            #6
            Thanks for the response! I installed 'flip' and did the conversion with the following:
            sudo apt-get install flip
            flip -u coralbacteria.fastq

            I then tried the following:
            fastx_quality_stats -i coralbacteria.fastq -o coralbacteria_stats.txt

            but i got:
            fastx_quality_stats: Invalid input: expecting FASTQ prefix character '@' on line 62049. Is this a valid FASTQ file?

            Comment

            • mcnelson.phd
              Senior Member
              • Jul 2011
              • 162

              #7
              Hi Phoenix,

              Since you're still getting the same error it's most likely not a problem with having windows line encodings in your fastq file.

              What you might want to try is
              Code:
              awk "NR==62049{print;exit}" coralbacteria.fastq
              This will print out line 62049, and you can check to see if it looks like a real fastq sequence header line. To compare, you can try
              Code:
              head -n 1 coralbacteria.fastq
              which will print the first line of your file which appears to be a valid fastq sequence header since fastx didn't raise an issue till line 62049.

              Additionally, you might want to check how many lines you have in your file using
              Code:
              wc -l coralbacteria.fastq
              Divide the number by 4 and it should equal the number of sequences that you have. If you don't already know how many sequences you have, try
              Code:
              grep -c '^@' coralbacteria.fastq
              Only problem you might have with that last command is if you have a quality score line that begins with an @, which I believe is Q30 so it probably isn't that uncommon.

              Comment

              • GenoMax
                Senior Member
                • Feb 2008
                • 7142

                #8
                One additional thing to try is to use a script posted by Simon Andrews (post #8) in this thread to do a basic check on your sequence file to see if there are any odd problems with it.

                Comment

                • Phoenix
                  Junior Member
                  • Aug 2013
                  • 6

                  #9
                  wc -l coralbacteria.fastq = 62049
                  grep -c '^@' coralbacteria.fastq = 15512.25

                  this suggested there was a extra line.

                  awk "NR==62049{print;exit}" coralbacteria.fastq = "a blank line"

                  So, to remove line 62049 I used the following:
                  sed -i 62049d coralbacteria.fastq

                  and fastx now runs like a charm!!

                  Cheers mate!!!

                  Comment

                  Latest Articles

                  Collapse

                  • SEQadmin2
                    Beyond CRISPR/Cas9: Understand, Choose, and Use the Right Genome Editing Tool
                    by SEQadmin2



                    CRISPR/Cas9 sparked the gene editing revolution for both research and therapeutics.1 But this system still showed severe issues that limited its applications. The most prominent were the heavy reliance on PAM sequences, delivery limitations, double-stranded breaks that prompt unintended edits and cell death, and editing inefficiency (both in targeting and in knock-in reliability).

                    Despite this, “CRISPR helped turn genome editing from a specialized technique into
                    ...
                    07-31-2026, 11:01 AM
                  • 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

                  ad_right_rmr

                  Collapse

                  News

                  Collapse

                  Topics Statistics Last Post
                  Started by SEQadmin2, 08-06-2026, 07:41 AM
                  0 responses
                  15 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 08-03-2026, 10:13 AM
                  0 responses
                  31 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 07-31-2026, 02:55 AM
                  0 responses
                  41 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 07-24-2026, 12:17 PM
                  0 responses
                  26 views
                  0 reactions
                  Last Post SEQadmin2  
                  Working...