Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • FastqToSam Picard tool error

    Hi all,

    I've been running into a problem with the FastqToSam Picard tool:

    My run command is: java -Xmx4g -jar /n/sw/picard-tools-1.98//FastqToSam.jar FASTQ=file.R1.fastq.gz FASTQ2=file.R2.fastq.gz SAMPLE_NAME=2a OUTPUT=text.bam

    The error I get is: Exception in thread "main" net.sf.picard.PicardException: Missing sequence line at line 54573 in fastq /path/file.R2.fastq.gz

    Anyone know what's going on?

  • #2
    Is there something wrong with the format of the fastq file at the line indicated by the error message?

    Comment


    • #3
      Yes, I just checked that.
      It seems that there is no read2 sequence on that line, although read1 exists.

      Should I delete those lines in the R1 and R2 fastq files?

      PS: This is what R2 looks like around the line that is giving the error:
      ////////<//E//////<///<//<//E////<//<///////////////////<///
      @NS500422:212:HJG22BGXX:1:11101:1063:7774 2:N:0:TAGGCATG

      +

      (No sequence and no quality)

      Comment


      • #4
        Is it possible that your R1/R2 files have got out of sync? Just deleting those lines may not be enough. You should use repair.sh from BBMap to check and repair the files.

        Comment


        • #5
          You can get rid of that with BBMap's reformat program:

          reformat.sh in=file.R#.fastq.gz out=reformatted.fq.gz minlen=1

          Alternately, you can output directly as sam (or if samtools is installed, as bam):

          reformat.sh in=file.R#.fastq.gz out=reformatted.bam minlen=1

          The "minlen=1" flag will throw away 0-length reads.

          Comment


          • #6
            OK, but what about the corresponding read1?
            For example if line 2 of file.R2 has read length = 0, but line 2 of file.R1 has read length >0 ?

            Comment


            • #7
              Reformat always keeps pairs together, to maintain consistency. So, both of them will be discarded.

              Comment


              • #8
                Thank you so much Brian! This seems to have solved the problem.

                Comment

                Latest Articles

                Collapse

                • seqadmin
                  Strategies for Sequencing Challenging Samples
                  by seqadmin


                  Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                  03-22-2024, 06:39 AM
                • seqadmin
                  Techniques and Challenges in Conservation Genomics
                  by seqadmin



                  The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

                  Avian Conservation
                  Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
                  03-08-2024, 10:41 AM

                ad_right_rmr

                Collapse

                News

                Collapse

                Topics Statistics Last Post
                Started by seqadmin, Yesterday, 06:37 PM
                0 responses
                11 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, Yesterday, 06:07 PM
                0 responses
                10 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 03-22-2024, 10:03 AM
                0 responses
                51 views
                0 likes
                Last Post seqadmin  
                Started by seqadmin, 03-21-2024, 07:32 AM
                0 responses
                67 views
                0 likes
                Last Post seqadmin  
                Working...
                X