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
                    Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
                    by SEQadmin2



                    Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

                    Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
                    ...
                    10-14-2026, 09:55 AM
                  • SEQadmin2
                    New Genomics Technologies Take Aim at Long-Standing Limits
                    by SEQadmin2


                    Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

                    We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
                    ...
                    09-28-2026, 10:25 AM

                  ad_right_rmr

                  Collapse

                  News

                  Collapse

                  Topics Statistics Last Post
                  Started by SEQadmin2, 10-22-2026, 11:13 AM
                  0 responses
                  53 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 10-22-2026, 10:48 AM
                  0 responses
                  40 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 10-15-2026, 10:52 AM
                  0 responses
                  46 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 10-14-2026, 05:39 AM
                  0 responses
                  46 views
                  0 reactions
                  Last Post SEQadmin2  
                  Working...