Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • abyss
    Member
    • Jan 2013
    • 17

    How to pair mates after de-barcoding by fastx BarCode splitter?

    I have been having some issues doing a paired end analysis simply due to the way I am processing things.

    I currently use custom illumina adaptors that have in-line barcodes i.e. the first 7 nucleotides sequenced in the run (either 1st read or paired end read)

    Briefly, I have designed a customized protocol which ligates a different barcode to each end of an insert. i.e. in a paired end sequence the two barcodes will be different at either end.

    After de-barcoding these split as different files. Even though the files can be combined after debarcoding there are still issues.

    Since the sequence of a barcode may not be distinguished by fastx BC splitter as a case (read) to case (read) basis, it will definitely mess up the order of the reads, such that read1 does not align with its mate in the read2 fastq file.

    I still want to conduct a paired end analysis and was wondering if there is a way of re pairing the reads after de-barcoding.
  • Brian Bushnell
    Super Moderator
    • Jan 2014
    • 2709

    #2
    I wrote a tool for exactly this purpose, repair.sh. It will work as long as you have sufficient memory to store all the reads.

    That said, my normal recommendation is to not use fastx, but I don't know of another tool that replicates this functionality.

    Comment

    • abyss
      Member
      • Jan 2013
      • 17

      #3
      Originally posted by Brian Bushnell View Post
      I wrote a tool for exactly this purpose, repair.sh. It will work as long as you have sufficient memory to store all the reads.

      That said, my normal recommendation is to not use fastx, but I don't know of another tool that replicates this functionality.
      Dear Brian,
      I could not get the script to run.
      It gives the following error;
      Error: could not find or load main class jgi.SplitPairsAndsingles

      I downloaded the latest version (v33.89) as well as one version earlier (v33.73b).

      Is the script 'SplitPairsAndSingles' missing, or am I messing up somewhere?

      Comment

      • Brian Bushnell
        Super Moderator
        • Jan 2014
        • 2709

        #4
        That's strange. I just downloaded it myself, and bbmap/current/jgi/SplitPairsAndSingles.class is present. Can you copy your exact command line and the complete error message?

        Also, after extracting, did you move any of the files around? You can execute the shellscripts from wherever you want, but they have to stay in their original location in /bbmap/. In other words, if the shellscripts are here:
        /path/bbmap/*sh

        The Java code must be here:
        /path/bbmap/current/

        It's also possible that you have some stuff in an environment variable that is causing a problem. Try this:

        echo $JAVA_OPTIONS

        ...and see if that prints anything.

        Comment

        • SES
          Senior Member
          • Mar 2010
          • 275

          #5
          You may want to try Pairfq for another solution. It works with multi-line FASTA/Q and the files can be compressed (gzip or bzip2). The specific command you want is "pairfq makepairs" and there is more information about the usage on the wiki.

          There is also standalone script called "pairfq_lite.pl" in the "scripts" directory that has no dependencies (except Perl). If you are trying to pair a very large number of reads (>20m), I recommend you follow the full install instructions and run pairfq with the "--index" option, or interleave your reads prior to trimming. Both of these options will drastically reduce the memory usage.

          Comment

          • abyss
            Member
            • Jan 2013
            • 17

            #6
            Thanks for the help.
            My friend actually wrote a script which hopefully is helpful to others.
            The script determines barcodes that are inline and 5' of the sequence.
            It takes the raw forward read and the mate read fastq files as input.
            It determines the barcode from the read file and puts the read and its mate in order in two files read1 and read2 (according to the barcode). Thus, it preserves the order and de-barcodes simultaneously.

            Barcode file should be tab delimited, eg

            BC1 AGTCGAG
            BC2 GCTGACG
            ... .....


            usage of this perl script is
            perl [Script path]/5'bc_splitter_for_paired_end_sequence.pl -b [Barcode Filepath] -l [Barcode Length] -m [Allowed number of mismatches] -o [output suffix.fastq] -1 [READ1 Filepath] -2 [READ 2 filepath]

            Hope this helps someone.
            Attached Files

            Comment

            • SES
              Senior Member
              • Mar 2010
              • 275

              #7
              Originally posted by abyss View Post
              Thanks for the help.
              My friend actually wrote a script which hopefully is helpful to others.
              The script determines barcodes that are inline and 5' of the sequence.
              It takes the raw forward read and the mate read fastq files as input.
              It determines the barcode from the read file and puts the read and its mate in order in two files read1 and read2 (according to the barcode). Thus, it preserves the order and de-barcodes simultaneously.
              Note that this script is for a different task than what was mentioned in the original post. Here, the reads must be in order (and must be 4-line fastq) and the output is the de-barcoded reads. This wouldn't work for the general task of repairing paired-end files, as was mentioned above, but glad you found a solution.
              Last edited by SES; 11-13-2014, 02:13 PM.

              Comment

              • abyss
                Member
                • Jan 2013
                • 17

                #8
                I agree, the script preserves the order of the read and the mate from the original fastq files while de-barcoding rather than re-order the read and the mate after de-barcoding. But I will definitely take a look into the solution that you sent. Might be useful for other purposes. Thanks for posting.

                Comment

                Latest Articles

                Collapse

                • 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
                • GATTACAT
                  Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                  by GATTACAT
                  Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
                  07-01-2026, 11:43 AM

                ad_right_rmr

                Collapse

                News

                Collapse

                Topics Statistics Last Post
                Started by SEQadmin2, 07-13-2026, 10:26 AM
                0 responses
                28 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 07-09-2026, 10:04 AM
                0 responses
                37 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 07-08-2026, 10:08 AM
                0 responses
                25 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 07-07-2026, 11:05 AM
                0 responses
                35 views
                0 reactions
                Last Post SEQadmin2  
                Working...