Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Recreating TCGA FASTQ file from BAM and unaligned files - How to randomize reads?

    Hi fellow colleagues, I have been looking around the forum and google searching and it would seem my issue is a little obscure.

    I am performing in-silico analysis of raw level 1 TCGA sequence reads and was hoping to generate "pseudo"-simulated FASTQ files. In the sense, that from the BAM file and unaligned FASTQ file from the same individual, I would like to recreate the full FASTQ file to replicate the TCGA pipeline and then test on some bespoke pipelines I am trying to get a handle on.

    What I have done so far is:

    1. use samtools bamshuf to randomise the BAM file.
    2. convert the randomised BAM file to FASTQ.

    This is where I am stuck because if I catenate this FASTQ file to the unaligned FASTQ files all I would get is the unaligned reads stacked right after all those within the BAM file.

    Is there a tool out there that can randomize the order of sequence reads in a FASTQ file? And it would be for paired end data as well, hoping to preserve the paired ends at the same time?

    Apologies if I had not refined my searches and there is something obvious available. I am hoping there is something short of learning a programming language and writing the script from scratch!!!

    Cheers

    Nick

  • #2
    BBmap can do that :
    I haven't used it but it includes a tool to reorder reads while keeping pairs together
    Code:
    shuffle.sh in=R1.fastq in2=R2.fastq out=R1_rand.fastq out2=R2_rand.fastq
    Last edited by Michael.Ante; 09-22-2015, 12:04 AM. Reason: Typo

    Comment


    • #3
      Out of curiosity, in what context(s) does the order of reads in a FASTQ file matter? I could imagine in clustering or something like that...but most mappers treat reads independently right?

      Comment


      • #4
        Read order does matter for many de novo assemblers, and also for things like k-mer based normalisation.

        Comment


        • #5
          Originally posted by fanli View Post
          Out of curiosity, in what context(s) does the order of reads in a FASTQ file matter? I could imagine in clustering or something like that...but most mappers treat reads independently right?
          Also I was hoping to peform some saturation analysis so downsampling the FASTQ files and see what happens to the gene transcripts but also the unmapped stuff.

          Good to know it does have an affect on de-novo assembly, which is also something I would like to try out.

          cheers

          Nick

          Comment


          • #6
            Originally posted by Michael.Ante View Post
            BBmap can do that :
            I haven't used it but it includes a tool to reorder reads while keeping pairs together
            Code:
            shuffle.sh in=R1.fastq in2=R2.fastq out=R1_rand.fastq out2=R2_rand.fastq
            Thanks for that Micheal.Ante, this looks to be what I am looking for, fun times playing with it! cheers.

            Nick

            Comment

            Latest Articles

            Collapse

            • seqadmin
              Best Practices for Single-Cell Sequencing Analysis
              by seqadmin



              While isolating and preparing single cells for sequencing was historically the bottleneck, recent technological advancements have shifted the challenge to data analysis. This highlights the rapidly evolving nature of single-cell sequencing. The inherent complexity of single-cell analysis has intensified with the surge in data volume and the incorporation of diverse and more complex datasets. This article explores the challenges in analysis, examines common pitfalls, offers...
              Today, 07:15 AM
            • seqadmin
              Latest Developments in Precision Medicine
              by seqadmin



              Technological advances have led to drastic improvements in the field of precision medicine, enabling more personalized approaches to treatment. This article explores four leading groups that are overcoming many of the challenges of genomic profiling and precision medicine through their innovative platforms and technologies.

              Somatic Genomics
              “We have such a tremendous amount of genetic diversity that exists within each of us, and not just between us as individuals,”...
              05-24-2024, 01:16 PM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by seqadmin, Today, 08:18 AM
            0 responses
            10 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, Today, 08:04 AM
            0 responses
            12 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 06-03-2024, 06:55 AM
            0 responses
            13 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 05-30-2024, 03:16 PM
            0 responses
            27 views
            0 likes
            Last Post seqadmin  
            Working...
            X