Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • labrat73
    Member
    • Nov 2010
    • 12

    #31
    Originally posted by Xi Wang View Post
    You can use the script below (name it qseq2fastq.pl and replace the former one):

    Code:
    #!/usr/bin/perl
    
    use warnings;
    use strict;
    
    while (<>) {
    	chomp;
    	my @parts = split /\t/;
    	print "@","$parts[0]:$parts[2]:$parts[3]:$parts[4]:$parts[5]#$parts[6]/$parts[7]\n";
    	print "$parts[8]\n";
    	print "+","$parts[0]:$parts[2]:$parts[3]:$parts[4]:$parts[5]#$parts[6]/$parts[7]\n";
    	print "$parts[9]\n";
    }
    Greetings Xi Wang,

    I have tried to use this script to convert from minimal fastq format to one in which the read name is listed before the base qualities. Here is my command line:

    $ perl qseq2fastq.pl sequence.fastq > test.fastq

    However at each attempt, I get an empty output file and the "use of uninitialized value in concatenation (.) or string" message in the terminal. Please excuse my ignorance as I have only very limited knowledge of perl scripts. I would appreciate it very much if you could explain what I am doing wrong and give me step-by-step instructions on how to run this script.

    Many thanks!

    Comment

    • sklages
      Senior Member
      • May 2008
      • 628

      #32
      Originally posted by labrat73 View Post
      Greetings Xi Wang,

      I have tried to use this script to convert from minimal fastq format to one in which the read name is listed before the base qualities. Here is my command line:

      $ perl qseq2fastq.pl sequence.fastq > test.fastq

      However at each attempt, I get an empty output file and the "use of uninitialized value in concatenation (.) or string" message in the terminal. Please excuse my ignorance as I have only very limited knowledge of perl scripts. I would appreciate it very much if you could explain what I am doing wrong and give me step-by-step instructions on how to run this script.

      Many thanks!
      You try to convert fastq to fastq; that's not the intention of the script. The above script converts qseq format to fastq.

      Comment

      • labrat73
        Member
        • Nov 2010
        • 12

        #33
        Originally posted by sklages View Post
        You try to convert fastq to fastq; that's not the intention of the script. The above script converts qseq format to fastq.
        sklages-

        thanks so much for your reply. i'm a bit confused because my file has the fastq extension and it looks like this:

        @SRR101483.1 SCS_0014:6:1:1063:16736/1
        GCGTAGGCTCTATCCCTAGAATGCAAAGGTGGTTCAACATACACAGATCAATAAATGTGATTCAC
        +
        DDDBDCC=D-5AA<B--CAAC5?A5@CC-=AA>>5CC:5=?:A5AC:C?D:C:>5?==@A@

        when i try to run it, though, i keep getting an error. i compared it to other files that i've run and that's when i noticed that in other files, the title name appears again after the "+", immediately before the base qualities. i'm trying to convert or edit this file so that it looks like this:

        @SRR101483.1 SCS_0014:6:1:1063:16736/1
        GCGTAGGCTCTATCCCTAGAATGCAAAGGTGGTTCAACATACACAGATCAATAAATGTGATTCAC
        +SRR101483.1 SCS_0014:6:1:1063:16736/1
        DDDBDCC=D-5AA<B--CAAC5?A5@CC-=AA>>5CC:5=?:A5AC:C?D:C:>5?==@A@

        i hope this makes sense and appreciate any advice you could offer.

        best-

        labrat73

        Comment

        • maubp
          Peter (Biopython etc)
          • Jul 2009
          • 1544

          #34
          Use [ code ] and [ /code ] tags to prevent the forum messing up the display of examples.

          Your files is already FASTQ format - without the redundant optional repeated identifier on the plus lines. You don't need to make that change.

          As sklages said earlier, the script this thread is about converting from the Illumina qseq format into FASTQ.

          Comment

          • arcolombo698
            Senior Member
            • Nov 2013
            • 142

            #35
            fastq validator

            has anyone tried using this to test?

            I have a very similar problem here where my .txt is in this format
            where there is no line break after the '+'... however this is still in fastq format because the '+' line is optional... however some people here were still getting errors in the format i have posted below

            has anyone used http://genome.sph.umich.edu/wiki/FastQValidator ?


            @HWI-ST604_0134:4:1101:1391:1882#0/1
            NATAGTGCTTTAGCATCATATCTAAGGCTGTTCGTCCTACATTGTTGAGGAAACAACTATGACCTCCCTTGGGTCGGTTGCTATGCAA AGCAATGCTAACA
            +HWI-ST604_0134:4:1101:1391:1882#0/1
            BUXRMZ[Z[[cccccccccccccccccccccccccccccc\cccccccccc_cccUYcccccccaccUYccccc_ccc__a\cac\_V __^X^^^\^^[^\
            @HWI-ST604_0134:4:1101:1493:1886#0/1
            NTAGATAATGATGCCACTGTTACAACTCTGTGCTTTGGGGTACCTAACAAGTCTCCCTCAGTGCCTCTCTGATTTGTAGCTAGTCAAT AGAATGAATAAAG
            +HWI-ST604_0134:4:1101:1493:1886#0/1
            BUXYX[[Z[[cccccc_cccccccc_ccccccccccc\ccZ____ccc_ccccccccccc[____ccccc_[cc_c_ccc_c_c_cc_ \_BBBBBBBBBBB

            Comment

            • sklages
              Senior Member
              • May 2008
              • 628

              #36
              Originally posted by arcolombo698 View Post
              has anyone tried using this to test?

              I have a very similar problem here where my .txt is in this format
              where there is no line break after the '+'... however this is still in fastq format because the '+' line is optional... however some people here were still getting errors in the format i have posted below

              has anyone used http://genome.sph.umich.edu/wiki/FastQValidator ?


              @HWI-ST604_0134:4:1101:1391:1882#0/1
              NATAGTGCTTTAGCATCATATCTAAGGCTGTTCGTCCTACATTGTTGAGGAAACAACTATGACCTCCCTTGGGTCGGTTGCTATGCAA AGCAATGCTAACA
              +HWI-ST604_0134:4:1101:1391:1882#0/1
              BUXRMZ[Z[[cccccccccccccccccccccccccccccc\cccccccccc_cccUYcccccccaccUYccccc_ccc__a\cac\_V __^X^^^\^^[^\
              @HWI-ST604_0134:4:1101:1493:1886#0/1
              NTAGATAATGATGCCACTGTTACAACTCTGTGCTTTGGGGTACCTAACAAGTCTCCCTCAGTGCCTCTCTGATTTGTAGCTAGTCAAT AGAATGAATAAAG
              +HWI-ST604_0134:4:1101:1493:1886#0/1
              BUXYX[[Z[[cccccc_cccccccc_ccccccccccc\ccZ____ccc_ccccccccccc[____ccccc_[cc_c_ccc_c_c_cc_ \_BBBBBBBBBBB
              I don't get it. There is a "linebreak" (newline) after your '+' line. So this is normal fastq format.

              Btw, the '+' line is *not* optional, its content is! There must always be at least the '+' sign as header for the quality line. But it is optional to write any information after that (in the same line).

              Comment

              • Brian Bushnell
                Super Moderator
                • Jan 2014
                • 2709

                #37
                The problem I see is that bases and qualities both have a spaces in them, but otherwise it looks fine.

                Comment

                • sklages
                  Senior Member
                  • May 2008
                  • 628

                  #38
                  Originally posted by Brian Bushnell View Post
                  The problem I see is that bases and qualities both have a spaces in them, but otherwise it looks fine.
                  You're right, maybe a copy&paste issue ..?

                  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
                  • 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

                  ad_right_rmr

                  Collapse

                  News

                  Collapse

                  Topics Statistics Last Post
                  Started by SEQadmin2, 08-06-2026, 07:41 AM
                  0 responses
                  13 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 08-03-2026, 10:13 AM
                  0 responses
                  30 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 07-31-2026, 02:55 AM
                  0 responses
                  40 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...